Tuesday, April 17, 2012

Generic Data Sources - Part 1

Generic Data Source creation using View

Generic Data Sources in BI
We often need to built Generic Data Sources aka Custom Data Source s as  changes happen at source system level  which  includes building custom tables ( Z) part of Transaction Enhancement s. The business requirement would be bringing this info into BI part of regular Transaction data . Sometimes it is possible to enhance the current Data Sources to have these new fields and get the required result. But it is not always possible and end up building a generic data source.
The Generic data source can be built in couple of ways. Those would be
  1. From View
  2. From Function Module 
  3.  From  Query
A view can be built across all the tables from which the data is needed and this source is good for your extractor when there is no business rules to be applied for data extraction. You only need to make sure that there is a pointer to identify delta records if you want  Delta enabled Extractor .
The Function Module method is good if you have to do some kind of validation or apply rules while extracting the data  within source system and identify the delta etc .Also this method is useful when you have to get the data from more than one table and has different change time stamps . Example could be Purchase Order. While purchase order might have changed globally at one time and  a new  order line is added or modified at Item level .That means these tables would have two different  change timestamps. Another example would be pricing condition for orders.
The query method is used where there is a need to built an extractor based on the result of a report in this case Query. This query is executed based some conditions and the result could change every time which may have some calculations etc.

In this blog we  will  see how a generic extractor is built based on View.
For this am going to use Standard SAP  Tables EKKO , EKPO as basis for the view. 


  1. Built a view based on EKKO/EKPO. Will use AEDAT for delta purpose. 
  2. .       Go to Transaction RSO2  and give some name under  Transaction Data and enter CREATE.
  3. Enter Description and choose Application Area . Also give enter the view name created from step 1.
  4. You don’t need to choose the Extraction source as View Type is default. You can change the method by selecting the different one from the Tabs at right top corner.
  5. SAVE the work by click by choosing save button or from menu. Give appropriate package name on the prompt.
  6.  On the next screen you can choose selection criteria for you extractor if needed. After checking the boxes you need then Generate the data source from menu.
  7. Now you are ready with your first Generic Extractor to test unless you want to make this as Delta Enabled.
  8.  For Delta , choose the option Generic Delta from Tool Bar. This will take you to the options. Choose AEDAT field from Dropdown and  select Timestamp radio button option . Then click save. 
  9. You can test your extractor by selecting TEST. This will take you to Extractor Checker. By clicking Extraction button , you can test  and this will give result as pop up.
  10. Choose continue and select option ALV Grid to see the result set.

No comments:

Post a Comment