Académique Documents
Professionnel Documents
Culture Documents
This blog will describe a generic approach to integrate Excel-based reporting tools to SAP Data
Services. The benefit of this is that it allows the business user to invoke complex SAP Data
Services ETL processes from their familiar Excel-based reporting tools. This saves both time
and money by not requiring IT support to run SAP Data Services jobs and instead allowing
business users from finance and accounting to run jobs as needed. This can be particularly
useful for accountants during close, when they need to update the data more frequently.
This technique could be used for a variety of Excel-based reporting tools including SAPs BPC,
BusinessObjects Planning (SRC) and PeopleSofts NVision to name a few. An example will be
shown using Data Services to integrate with BusinessObjects Planning (SRC). Using this
approach the users were able to run a scheduled job from BusinessObjects Planning to invoke
a Data Services job, which then calls back to BusinessObjects Planning to load the table that
Data Services created.
BusinessObjects Planning Scheduler (Excel Based). End-user starts the process by running
a scheduled job.
BusinessObjects Planning: Loads the table that was prepared by Data Services.
Process is complete.
The first step of this process is to create a Data Services batch script that could be invoked from
an external application. This is done by going to the Data Services Management Console and
selecting Batch Job Configuration. Next select the Export Execution Command action. This
will create a .bat script on the Data Services server that can be executed to run the job.
The second step is to build a process which can call the Data Services script from an external
server or workstation. Since the external computer does not have the Data Services software
installed, it cannot directly execute the batch file. In order to do this without installing client
software on the computer, we utilized standard windows scheduling functionality to have the
process scheduled, which then calls the Data Services job at the specified time.
The last step is to set up an Excel macro which can execute a batch file to set up the remote
schedule. The Excel macro has logic to determine the current time and increment by 1 minute
so as to give a slight time delay when scheduling the job.
Description
/create
/sc ONCE
/tn SCHEDULE
/tr \\server\share\
/ru System
/s SERVER
/ST %1
Indicates the time in hh:mm 24 hour format. For example, to run the
job at 1:00 PM, use 13:00.admin this time is passed in from the Excel
Reporting tool.
Listed below is sample Excel logic that can be used to set the time ahead one minute. Additional logic
can be added as needed to accommodate other requirements.
Hour : (B2)
=IF(B3=0,HOUR(NOW())+1,HOUR(NOW()))
Minute: (B3)
=IF(MINUTE(NOW())=59,0,MINUTE(NOW())+1)
=B5&":"&B6
=IF(LEN(B2)=1,"0"&B2,B2)
=IF(LEN(B3)=1,"0"&B3,B3)
Listed below is sample Excel Macro logic that could be used to call the scheduled task. This Excel macro
could be invoked by any process with the reporting environment. For example, from BusinessObjects
Planning, it could be called by tying it to a batch report, which can then be scheduled. Other Excelbased reporting solutions have specific ways to expose macros, each of which can be used to call the
Data Services job. In this specific example, the date and time is passed through a parameter by using
the Cells() function, which takes the row and column in Excel to pass through. In this case there is logic
to skip the job on a specific day (Sunday). Other logic could be added as needed to schedule for
different combinations of day and time.
In this script the Job ID, Server Name and process id are passed in as parameters. The server name is
used to switch between different environments (Dev, Test, Prod). The process id is passed in to run a
specific batch run. The Job ID is passed in and corresponds to the job that is defined in Planning. A file
called SchedulerCLI.exe will need to be copied to the same directory as the batch file. It does not require
any other software installation.
In the example below, the Data Services job would run job id 7160, which would then complete the data
load process from BusinessObjects Planning to Data Services and finally back to BusinessObjects
Planning.
twitter @davidbathBI