Quantcast
Channel: SCN : Document List - SAP Business Warehouse
Viewing all articles
Browse latest Browse all 1574

function module based generic extractor

$
0
0

FM based extractor

 

Requirement: To create a generic function module based extractor on ECC R/3 side.

a: first, we need to create the structure and function module and

b: then create the data-source.

c: Test the extractor.

 

Step1: Create Extract Structure in T-code Se11.

Select radio-button : data-type: enter name and press create button.

Enter the fields and description you would like to have in your data-source.

These fields you can get from standard tables from which you want to retrieve the data.

 

slide14.png

 

slide15.png

 

se11_png.png

 

 

 

 

Step2: Create function module in t-code SE37.

The steps for function module are explained later in Step4.

Once we have the function module ready, we can go to Step3.

 

func module01.png

 

 

 

Step3: Enter details in RSO2 transaction: Application Component, function module, extract structure.

On BW side: The data-source will be visible in this application component

.

 

 

Rso2_02.png

Press the field list button(F7), next to change pencil button, to set the selection parameters for the extractor.

slide13.png

The fields list will be coming from extractor.

slide12.png

 

 

Step4_01: Function module: Enter values in Tabs: Import, Tables, Exceptions as shown. Make sure the checkbox are selected.

 

fm_import04.png

fm_tables05.png

fm_exceptions06.png

 

Step 4_02: Place the code in Source code tab.

fm_code07.png

I have taken field from these tables, which are linked by a key like company code, financial transaction number or deal number.

Tables: VTBFHA,VTB_ASGN_LIMIT,VTB_ASGN_POS,VTB_ASGN_RELAT,VTBFINKO.

 

 

I have attached the code later.

 

Step5: Test in RSA3. Give the extractor name and press enter.

 

 

rsa3_01.png

 

rsa3_02.png

We have got 21 records as our output.

 

slide16.png

 

Step6: Code Structure:

Steps

Part A

**1 - Tables and Internal tables declaration

Part B

**2 - Declare Output internal tables similar to Extract Structure

**3 - Declare selection screen and other counters

**4 - Capture Select ranges values

**5 - Capture Extractor

* Check DataSource validity

* Fill parameter buffer ranges for data extraction calls

Part C

**6 - Use Open Cursor for first and main select statement

**7 - Other Select Statements

**8 - Generate Output data

**9 Assign the final output internal table to E_T_DATA for result set

 

Sample code:

 

http://www.scribd.com/doc/151562270/Sample-Code-FM-Based-Extractor-Docx

 

 

Step7: BW-side: Replicate the data-sources for the ECC Source system.

You will find your newly created data-source in the list of application

component.We know the application component we have chosen is TR-CM.

 

Create info-package and you can do the first load till PSA.

 

 

**


Viewing all articles
Browse latest Browse all 1574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>