on 08-18-2016 11:30 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.