cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP routine for loading data of current month in InfoPackage

Former Member
0 Kudos

Hello experts,

I want to load data of current month. Therefore I implemented the following ABAP-Routine for field 0CALDAY in the InfoPackage's data selection:

data: lv_datum_l like sy-datum,

lv_datum_h like sy-datum.

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

call function 'RP_LAST_DAY_OF_MONTHS'

exporting

day_in = sy-datum

importing

last_day_of_month = lv_datum_h.

l_t_range-sign = 'I'.

l_t_range-option = 'BT'.

l_t_range-low = lv_datum_l.

l_t_range-high = lv_datum_h.

But function 'RP_LAST_DAY_OF_MONTHS' cannot be found!

Any other suggestions for getting last day of current month?

regards

hiza

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you can use this FM SLS_MISC_GET_LAST_DAY_OF_MONTH to get the last day of the month..

Regards,

Siva

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Add this code. When u complete execution of this code, ZDATE will have ur month end date.

data : zdate_c(2) type c,

zyear_c(4) type c,

zmonth_c(2) type c.

data : zdate like sy-datum.

data : zday(2) type n.

zdate = sy-datum

zyear_c = zdate(4).

zmonth_c = zdate+4(2).

zdate_c = '01'.

concatenate zyear_c zmonth_c zdate_c into zdate.

CALL FUNCTION 'FIMA_END_OF_MONTH_DETERMINE'

EXPORTING

I_DATE = zdate

IMPORTING

E_DAYS_OF_MONTH = NO_OF_DAYS.

zday = NO_OF_DAYS.

concatenate zyear_c zmonth_c zday into zdate.