+++> 8.Generic Extraction - Based on FM


                 
                                  This post explains creating a generic Data Source in SAP R/3 which uses a Function Module to extract data and this Data Source can be used in SAP BI/BW to extract data from R/3.
Function Module Extraction Steps:
1) Go to T-Code SE11
Check Data Type check box and enter ZFM_EXST_VBAK and press create button

2) A small window pop’s up select check box Structure and press Tick mark.


3) Maintain Structure Windo pop’s up give Short Description, then click on Components header, In Component and Component type give the extraction Structure necessary fields as shown. The Currency WEARK field and Quantity NETWR fields much be included with reference fields.

4) Now go Currency/quantity fields as shown.
NETWR Net value in document currency field must have reference field that in the base table. Enter Currency / Quantity field name as shown and activate it

5) Create Object Directory Entry Window pop’s up Give Package name as $temp, save it and press Local Object.

6) Inactive Objects for USER04, Local Objects with selected Object name is pop’s up Click Enter

7). Warning during Activation window pops up to check any Warning in the extraction Structure.

Now Go To T-Code: SE80, Select Function Group, Name RSAX.

9) Now Select RSAX Object Name Folder Right Click, press copy.

10) Now Give Name of a New Function Group Ex: ZZRSAX and press Enter. ( Function group for transporting the function module to other environment )

11) select only one needed Function module Ex: RSAX_BIW_GET_DATA_SIMPLE and press Enter

12) A small window pop’s up saying Copy Function Module Edit To with some name Ex: Z5_FM_RSAX_BIW_GET_DATA_SIMPLE and press Enter.

13) Now Go to T-Code SE37 and give Function module name Ex: Z5_FM_RSAX_BIW_GET_DATA_SIMPLE and press Create button

14) Below Screen pop’s up Check attributes as shown

15) You will not change Import, Export, Changing Tabs Now Change Tables Tab give Type spec LIKE and Associated Type ZFM_EXST_VBAK and short text as Extract Structure

16) Now go to Source Code to edit as shown in RED


17) Edit the Code RANGES and WHEN ‘xxxxx’. (Xxxxx Is the Name of Data Source given in RS02)

18) Change the Code as shown

19) Now SAVE, Activate the function module.
Goto SE80 select function group, activate function group
Note: With out activation of Function Group, you will not be able to create data source in RS02
20) Data Source Creation T-Code RSO2
Create Data Source, give Data Source name must be same as given in the source code of the function module. Ex ZFMEDS4 then press Create button

21) Change Data Source for Transaction data: ZFMEDS4 will pop’s up give Application Component related to table as SD and give Texts Short/Medium/Long description and press Function module button, you will see Extraction by Function Module gets Enabled to enter Function Module and Extract Structure name.

SAVE it and Check Extraction
22) Now go to T-code RSA3 Extractor Checker
Give Data Source name as ZFMEDS4 and click Extraction button.




SAP BW/BI side:

Step 1) go to T-Code: RSA1 , double Click Source System and then Select your Client System> it will take you to DataSources go to Over view, Application Component >Right Click > press Replicate Metadata.
Find your DataSource providing name as ZFMEDS4

Step 2) Now go Info provider create a Cube with info Object related to Function module Extraction Structure or Select SAP defined Objects related to Function Module Extraction Structure as shown. press Activate

Step 3) Using DTP we are sending to data through PSA to Data Target






.


******************************************
End