cancel
Showing results for 
Search instead for 
Did you mean: 

Maitaining Last Run Date!

Former Member
0 Kudos

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!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi siggi,

Thanks a lot for ur help.

Can you give example for some timestamp field i can use...

like one dec15?

should i use timestamp field from roosprmsc?

Former Member
0 Kudos

San!, I don't know what source system you are on, but normally you can use any timestamp of data type dec15 (like dataelement RRDCTMSTVAL). Just add a field of such a type to your extract structure. The field is really only for getting the last run date/time into the fm.

regards

Siggi

Former Member
0 Kudos

HI Siggi,

thank a lot again,

Can you tell me which standard fm should i use as templete for like rsax* or RSVD_BW_GET_DELTA_DATA or FBIW_DATA_TRANSFER_AR_1 which implment Delta?

Former Member
0 Kudos

Hi,

the one I specified in my weblog! RSAX_BIW_GET_DATA_SIMPLE

Siggi

Message was edited by: Siegfried Szameitat

Former Member
0 Kudos

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