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

what are the parameters for the FM

hi can any one help me how to use this FM HR_ECM_GET_NUMBER_OF_MONTHS

Edited by: kopparapu suresh on Jun 16, 2008 11:15 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 09:20 AM

    hi see this..

    report .

    parameters: p_sdate type sy-datum,

    p_edate type sy-datum.

    data: l_days type i,

    l_months type i,

    l_years type i.

    CALL FUNCTION 'HR_SGPBS_YRS_MTHS_DAYS'

    EXPORTING

    BEG_DA = p_sdate

    END_DA = p_edate

    IMPORTING

    NO_DAY = l_days

    NO_MONTH = l_months

    NO_YEAR = l_years .

    write:/ 'Days = ', l_days.

    write:/ 'Months = ', l_months.

    write:/ 'Years = ', l_years.

    or see this..

    REPORT ZDATEDIFF.

    DATA: EDAYS LIKE VTBBEWE-ATAGE,

    EMONTHS LIKE VTBBEWE-ATAGE,

    EYEARS LIKE VTBBEWE-ATAGE.

    PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,

    TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.

    call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'

    exporting

    i_date_from = FROMDATE

    i_date_to = TODATE

    • I_FLG_SEPARATE = ' '

    IMPORTING

    E_DAYS = EDAYS

    E_MONTHS = EMONTHS

    E_YEARS = EYEARS.

    WRITE:/ 'Difference in Days ', EDAYS.

    WRITE:/ 'Difference in Months ', EMONTHS.

    WRITE:/ 'Difference in Years ', EYEARS.

    INITIALIZATION.

    FROMDATE = SY-DATUM - 60.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 16, 2008 at 09:18 AM

    Hi

    It gives the difference between two dates...

    see the below example.....

    CALL FUNCTION 'HR_SGPBS_YRS_MTHS_DAYS'

    EXPORTING

    BEG_DA = '20080101'

    END_DA = '20080416'

    IMPORTING

    NO_DAY = v_days

    NO_MONTH = v_months

    NO_YEAR = v_years

    NO_CAL_DAY = v_all_days.

    write:/ 'Days = ', v_days.

    write:/ 'Months = ', v_months.

    write:/ 'Years = ', v_years.

    write:/ 'All days = ', v_all_days.

    u get the differences as above....,

    days, months , years..

    Reward points if useful...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 09:19 AM

    Hi,

    If u go and check in SE37 for the FM ''HR_ECM_GET_NUMBER_OF_MONTHS"

    You will find all the parameters required for this as given below:

    Local interface:

    " IMPORTING

    " VALUE(BEGDA) TYPE DATUM

    " VALUE(ENDDA) TYPE DATUM

    " VALUE(DAYS_MIN) TYPE ECM_DYPRO DEFAULT 0

    " VALUE(MESSAGE_HANDLER) TYPE REF TO IF_HRPA_MESSAGE_HANDLER

    " EXPORTING

    " VALUE(MONTHS) TYPE P

    " VALUE(IS_OK) TYPE BOOLE_D

    • to use this u need pass the begin and end date and excute, its period between the dates wil be calcuted and returned in the exporting paramter months*

    reward points.

    Regards,

    mansi.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 09:21 AM

    this will get the difference in no. of months ..

    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.