EIM161 Exercises
EIM161 Exercises
DATA SERVICES
EIM161
Exercises
Teched 2011, Bangalore
2
This exercise is about reading SAP Financial data into a SQL Server database for whatever reason, maybe
for a reporting application. At first we will use the SAP provided Extractor 0FI_GL4, the same one used by
SAP BW. Then we will assume that this Extractor does not provide us with the data we need and build our
own ABAP program to read the data from the BSEG & BKPF table the way we want it to look like.
Login
Start SAP Business Objects DataServices Designer, Login into the Central Management Server using the
user “Administrator” and the password “abcd1234”. When you click on “Log On” a list of available
repositories is shown at the bottom, pick the “DS40_Local” one and click on “Okay” to start the application.
Definition
For better understanding, let us use the terms
Project Hierarchy: Just an organizational screen of the current opened project
Object Library: A window to the repository – all objects can be found there
Workspace: The area where we draw everything
3
Conditional
Depending on the value of the global variable two different dataflows should be executed, so we add a
“Conditional” object from the right hand tool palette onto the job‟s workspace. One click on the icon of the
palette selects the object, the second click in the workspace places it there.
To go into the “Conditional” or any other object in the workspace you can either doubleclick its body or click
on the object name like a hyperlink.
7
Configure Query
We close the Extractor window and back in the dataflow a doubleclick on the query allows us to configure
this transform. As we have connected the query object with a target table already, it is obvious for the
transform what columns to output – the columns of the target table – and therefore all the output columns are
present already. Our task is to map the left hand columns to the corresponding output columns by a simple
drag and drop operation from left to right one column at a time.
The Mapping tab below the input/output pane shows the mapping formula for the currently selected output
column in case a manual edit of the formula is required or comments should be added.
9
Configure Loader
Closing the Query window we can now open the dataflow‟s target object. It is a relational table we want to
load, so the loader presents all the options (see the Options tab) you would expect. Our dataflow should do a
fresh load, so it is a good idea to delete the entire table contents first, the “Delete data before loading” flag
should be checked.
(Tip: When you range select multiple columns on the left side and drop them onto the Query node of the right
hand side, all columns of same name with no mapping get that column as input and columns of different
name are added to the output schema)
Job is running
When you click on okay, the signal is sent to the jobserver – installed on your laptop as well – and we get the
log file created by the jobserver shown in Designer. In the trace log we can see the job step executed at the
moment, by clicking on the second icon at the top you can switch to the monitor and in case of an error the
third icon word turn red and we could view the error log then.
Monitor Log
The monitor log lets us see how many rows have been processed by each thread. The number of threads
created does not have to correspond with the number of objects in the dataflow, there is a fancy optimizer
trying to collapse and distribute all across the entire CPUs for maximum throughput.
Last time we executed the job, the dataflow took 180 seconds and loaded 413‟536 rows.
14