Skip to Content
author's profile photo Former Member
Former Member

ABAP routine for loading data of current month in InfoPackage

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 14, 2008 at 09:50 AM

    Hi,

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

    Regards,

    Siva

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 14, 2008 at 10:05 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.