Skip to Content

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.

/wp-content/uploads/2013/02/slide14_212995.png

/wp-content/uploads/2013/02/slide15_213008.png

/wp-content/uploads/2013/02/se11_png_212973.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.

/wp-content/uploads/2013/02/slide13_212994.png

The fields list will be coming from extractor.

/wp-content/uploads/2013/02/slide12_212993.png

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

/wp-content/uploads/2013/02/fm_import04_198405.png

/wp-content/uploads/2013/02/fm_tables05_198406.png

/wp-content/uploads/2013/02/fm_exceptions06_198410.png

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

/wp-content/uploads/2013/02/fm_code07_198411.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.

/wp-content/uploads/2013/02/rsa3_01_198424.png

/wp-content/uploads/2013/02/rsa3_02_198425.png

We have got 21 records as our output.

/wp-content/uploads/2013/02/slide16_213009.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.

**

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Former Member

    Thanks a lot, it’s really helpful.
    However it seems that your code allow to only load  1 datapakid. I assume it’s because your datasource doesn’t have to get a lot of records.
    How to handle it with many datapakids ?
    Is your code complete ?  I don’t find any statement to close the cursor.

    (0) 

Leave a Reply