Technology Blog Posts by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
89,548

Introduction

This document details about generic extraction based on function module.

Scenario

We go for Generic Extraction when the standard extractors doesn’t support the customer requirements. There are 3 types of generic extractors

1)Based on View/table

2)Based on Infoset Query

3)Based on Function Module

Business Scenario

We go for generic extraction based on a function module when we have to incorporate some logic to extract values.  For this we have to use ABAP coding.  In this document, I would like to discuss a business scenario in HR module.  There is a standard SAP table PA0041 – HR Master Record: Infotype 0041 (Date Specifications).  This table has values in the format (DAR01,DAT01 till DAR12, DAT12).  Sample format is given below.

We need it in the format (Sample given below).

ECC Side

1.  We need to create a structure based on PA0041 table fields.

2. There are 2 function modules which we can use in this scenario in the function group RSAX.

RSAX_BIW_GET_DATA_SIMPLE                                                       RSAX_BIW_GET_DATA

Extraction Method:     F2- Function Module ( Simple Interface).               F1- Function Module ( Complex Interface).

Data Load:                Full Load preferable.                                            Delta Load Preferable.

RSO2 Settings:         No effect of delta settings                                    Standard delta settings.

Here we need to copy and modify RSAX_BIW_GET_DATA_SIMPLE. First copy the Function Group, Change name and assign it to your Function Group.

For this Goto TCode-SE80

Copy only the required function module.

3)  Now change this function module in TCode SE37.

Go to the ‘Tables’ tab and associate E_T_DATA with your structure (which you created for extraction).

The E_T_DATA is the internal table used to contain the data you extracted from OLTP system, which is then passed to the BW system.

Go to Source code tab and enter the code.

Now save and activate the function module.  Activate the function group in SE80.

4) Create the Generic datasource in RSO2.

Give the function module name and extract structure name.

5) Generate the Datasource.  Check in RSA6.

6) Check your datasource in RSA3.

Here go to ALV Grid and check whether data is getting populated as required.

BI Side

1) Select the application component and replicate metadata.

2) Create an InfoPackage and extract the records to PSA.

3) Create InfoObjects.

4) Insert this InfoObject as Infoprovider to make it a datatarget.

5) Create transformation and DTP and fetch this records to this Characteristic InfoObject.

Go to contents and check the data.

Since time-dependency is enabled, 0DATETO and 0DATEFROM will be automatically added by the system of which 0DATETO will be a primary key.

If you need to have this InfoObject in report then you need to create a DSO or an InfoCube on top of this InfoObject and fetch that in the BEx Query Designer.

I understand that there are other documents available on this topic and that the logic is the same but this is a real-time scenario in which we worked on and I

hope somebody will benefit from it. 

20 Comments
former_member182470
Active Contributor
0 Kudos

Hi Anjali,

Your presentation is good. But, these type of documents(standard documents) which are already available in SCN since long time. I suggest you to create documents on which you came across any difficult real time scenarios. These documents will really help our SAP BI Consultants in their endeavors.

Regards,

Suman

Former Member
0 Kudos

Thanks Suman!! 

The document got published automatically while I was working on it.  I have mentioned my thoughts on publishing the document at the end.  Thanks again for those valuable comments.

Regards,

Anjali

RenjithKumar
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Anjali,

Very nice article. The flow is good.

I would also suggest to write an article to handle delta scenarios in Function module based extraction.

Regards

P Renjith kumar

Former Member
0 Kudos

Thanks Renjith !!

Have followed all your white papers on LO extraction...so getting you to comment is an honor.   Thanks for taking time out to go through this document.

Will surely try to write up on deltas on FM scenario.

Regards,

Anjali

former_member182516
Active Contributor
0 Kudos

Anjali ...

Really nice Blog with good explanation ...

Regards

Prashanth K

Former Member
0 Kudos

Thanks Prasanth!

Former Member
0 Kudos

Hi Anjali,

Based on this article, I had a doubt long time and now time to ask as I saw this point in this article.

I see your generic datasource "ZPA0041DA" under your "SAP" tree structure.

**********************************************

5) Generate the Datasource.  Check in RSA6.

**********************************************

Is this behavior only for Function module or below types also?

1)Based on View/table

2)Based on Infoset Query

Please let me know if any already written document to showup datasource under "SAP" node or provide your valuable inputs...

Thanks,

Srinivas

Former Member
0 Kudos

Hi Srinivas,

RSA6 holds all the active datasources in the activated state.  This includes SAP delivered datasources which are activated in RSA5 as well as custom datasources. Yes it includes all types of Generic DataSources.  I have an image but somehow the insert image is disabled.

Regards,

Anjali

Former Member
0 Kudos

Hi Anjali,

Really nice blog Anjali and the flow very nice.

Thanks & Regards,

AjithKumar.

Former Member
0 Kudos

Thanks Ajith :smile:

Former Member
0 Kudos

Good one !

Former Member
0 Kudos

Hi Anjali,

Good explanation. Thank a lot for this valuable document. :smile:

Thank you,

Sopharo

Former Member
0 Kudos

Thanks Todor and Sopharo!

RamanKorrapati
Active Contributor
0 Kudos

Good presentation and very useful article. Thanks for making and sharing.

Raman

Former Member
0 Kudos

can u show the flow with fm for delta too??

Former Member
0 Kudos

Hi Anjali,

Was going through you document.

Nicely written and well explained. I found the ENDCASE, CLOSE CURSOR missing and a ENDIF statement without IF  in the logic. Kindly check and update it, also it would be nice if you explain the additional stuff in the ABAP code like usage of Cursor Statements etc, which will help folks to get a better understanding.

Appreciate your efforts here.

Thanks,

Vikrant

0 Kudos
Really Nice article. well explained.
robinson_muoz
Explorer
0 Kudos
Gracias.Excelente ayuda!

 
0 Kudos
Hello Anjali,

Plz give me solution on delta update concept.

Actually i m fetching data according to date (ERDAT) from multiple tables.now i want to use delta update concept in RSO2. Should i use this ERDAT field for timestamp.

while using ERDAT field as a timestamp,in RSO2 i want fetch data according to date,but as a select-option its not showing in RSO2.
Former Member
0 Kudos
Hi Atul,

If a field is used as Delta-specific Timestamp field, then it wont be available as select-option. This field will be utilized by the external system when triggering the INIT/Delta load on extractor.
Usually for Delta-enabled data sources, the timestamp value will be maintained in a SAP standard table ROOSGENDLM whenever the job is triggered from the external system.

Fields DELTAID and REPEATID in ROOSGENDLM will hold the high and low values respectively.

INIT load: When External system runs the INIT load this ROOSGENDLM table will be updated with DELTAID as current date and time (based on timestamp type). REPEATID will be blank in this case.

Delta Load: ROOSGENDLM will be updated with the time interval as REPEATID as previous runs higher limit and DELTAID as current date and time.

So records will be fetched based on the Timestamp values.
Labels in this area