cancel
Showing results for 
Search instead for 
Did you mean: 

Delta logic for FM based data source

venkat_korivi
Participant
0 Kudos

Dear Experts,

I have searched many threats for creating generic data source based on Function module logic and I have one major doubt in that.

1.Do we need to write delta logic also in Function module.what will happen if we add delta field in FM.

2.While creating datasource based on FM(delta logic also maintained) do we maintain again generic delta in data source like safety interval's.if yes, why we need to maintain 2times.

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You have to maintain generic delta and field name in Data source so that system can understand which field from your DS structure will be delta relevant. Suppose you want Changed date to work as delta field you need to define this while configuring generic delta in DS. This field will work as a selection criteria and the values will be passed by extractor.

For ex you did a delta on 10th and requested a fresh delta on 15th , During run time the extractor will pass a date range of 10th - 15th to delta relevant field as selection criteria.

Now you have to fetch the records using the selection criteria in the FM code with a Select statement.Before writing the select you should transport the selection criteria from delta field to a range table, this is compulsory from Abap perspective.

Moreover there are other important steps like checking DS , opening the cursor , increment the data package etc that must be performed in FM code .

I suggest go through documents on FM extractors for fundamentals.

Thanks

venkat_korivi
Participant
0 Kudos

Hi Nayad Hussain,

Thanks for your reply..!

Do we need to write delta logic in FM also.. if yes, then how system will be understand if i maintain date field as a "CALDAY" while creating genetic data source.

Example:

We have two date fields ERDAT and AEDAT in one of my requirement which has to be performed via FM logic... in this case we written the delta logic in FM.

Now based on which field do we need to maintain for delta load while creating generic data source.

Thanks

Former Member
0 Kudos

Hi Chinna

You have two date fields ERDAT and AEDAT. In FM when you configure generic delta on CALDAY you can chose only one field as delta relevant from these two. Suppose you kept AEDAT while maintaining DS in RSO2.

System will pass delta selection to AEDAT during run time of extractor.Suppose delta selection passed was 10 - 15 August

Now while selecting the records in FM code you should fetch all  created or changed   records that lies within delta selection.

Therefore select should be like below

Select a  b  c from Table where AEDAT in "delta selection" or ERDAT in "delta selection".

A prerequisite for writing the select statement would be to store "delta selection" sitting in field AEDAT ( delivered by extractor) in a range table.

Go through RSAX_BIW_GET_DATA  for sample code.

Former Member
0 Kudos

Hi Chinna

Fuction moduel  sap has provided RSAX_BIW_GET_DATA_SIMPLE. This fuction moduel we can use for the full and delta load .

Now RSAX_BIW_GET_DATA  obsolete.