cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic date change in Infopackage with routine

Former Member
0 Kudos

Hello all,

I have created info packages that I need to run every month. In the date field under data selection CALMONTH I have specified Current month then in next infopackage M+1, M+2 and so on till M+6 and then data load in weeks so i have defined data selection in CALWEEK as Current week then in next infopackage W+1, W+2 till W+20.

But it is too difficult to manage and change dates every month so i want to automate these dates by writing routine for CALMONTH and CALWEEK which will be rolling.

After going through previous threads i find out we can do this with below code but as i am not comfortable with technical part anybody who have worked or created this kind of routine kindly help me in writing this.

data: lv_datum_l like sy-datum,

lv_datum_h like sy-datum. 

concatenate sy-datum(6) '01' into lv_datum_l.

call function ' SLS_MISC_GET_LAST_DAY_OF_MONTH'  (This function module will pull out last day of the month)

Regards,

Ankit Bassi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos


Hi All,

Anyone who can throw some light on this???

satish_waghmare3
Active Contributor
0 Kudos

Hi Ankit,

You can write the ABAP Routine in Data Selection Tab in your infopackage for the field CALWEEK or CALMONTH.

I suggest you can make use of TVARVC variable as well.  Reading the from and to date details from particular TVARVC variable for data selection.

Your ABAP colleague should be able to help you.

Please check.

Thank you

Satish Waghmare