on 01-23-2006 10:35 AM
Hi,
we have a specific requirement of creating a Delta enabled Datasource using a Z Function Module, which will use Z control table for maintaining Deltas.
Any pointers to the same will be appreciated.
Regards,
San!
hi siggi,
i have created all this...but my problem is like this:
Through Z fm,for the first run, i have to filter the records based on some codition like vbreve-rrsta='z'.
going forward, i have to filter the records based on vbreve-erdat ( date on which record was created) with last_run_date( means last time when we run delta).
this code for this:
Select <Fields> from vbereve
Into g_internal table
where ( erdat = g_last_run_date and erzet > g_last_run_time)
or (erdat > g_last_run_date and erdat <G_current_date )
or (erdat=g_current_date and erzet LE to G_current_time)
And rrsta = z.
g_last_run_date= previous day run date & g_last_run_time have = previous day run time,
G_current_date= (sy_datum) current day run date & g_current_time = (sy_uzeit) current day run time,
have to be stored in a Ztable.
For the first run (initial value), set g_last_run_date = 01/1900**
can use help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi San!,
as you want to select via date and time, I would suggest to add a timestamp field to your extract structure and use it as the delta relevant field for the generic delta.
In the fm you can access it like this:
clear: g_last_run_date, g_last_run_time.
LOOP AT s_s_if-t_select INTO l_s_select.
CASE l_s_select-fieldnm.
WHEN 'your timestamp field'.
g_last_run_date = l_s_select-low(8).
g_last_run_time = l_s_select-low+8(6).
ENDCASE.
ENDLOOP.
This should do the job! You will get a value in the global variables after you initialized the delta.
regards
Siggi
Hi San!,
take a look at this: /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
Some additional info: When you create your extract structure, add a date field (if there isn't already one) and use that for the generic delta. From the initialization on you will get the date into the function module and it can be used to extract all delta relevant data within the fm.
regards
Siggi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.