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

Function Module

Hi Experts

I need function module for between two dates.

Example : If i gave from date 010420008

and To date 31052008

then i need to convert days only

Result = 61 days

if any body knows based on above functionalty then send immediatly that function module name.Its urgent requirement.

Regards,

Hari

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

11 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 06:41 AM

    USe functaion module 'HR_HK_DIFF_BT_2_DATES

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 08, 2008 at 06:42 AM

    hi,

    HR_HK_DIFF_BT_2_DATES

    regards,

    Peter

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 06:42 AM

    Hi,

    Use Function module RP_CALC_DATA_IN_INTERVAL

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 08, 2008 at 06:42 AM

    hi,

    HR_MX_INTERVAL_BETWEEN_DATES.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 06:43 AM

    Hi Prasad,

    Try this code :

    select-options:
      s_date for sy-datum.
    
    data :
      w_days type i.
    
    w_days = s_date-high - s_date-low.
    
      write :/ w_days.

    Regards,

    Swapna.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 06:43 AM

    hi,

    Use the FM 'HR_SGPBS_YRS_MTHS_DAYS'.

    Hope this will Help.

    Regards

    Sumit Agarwal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 06:43 AM

    Hiii!

    Use this function module

    HR_HK_DIFF_BT_2_DATES

    Regards

    Abhijeet

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 06:44 AM

    hi prasad,

    use this FM

    HR_HK_DIFF_BT_2_DATES

    C14B_DIFF_BT_2_DATES

    Regards,

    sandeep

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 06:44 AM

    Hi,

    refer to following

    • Type in two date and find the difference between the two dates in

    • days, months and years.

    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.

    Reward pts. if usefull.

    Regards,

    Dhan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 06:46 AM

    Hi,

    Use the FM '/SDF/CMO_DATETIME_DIFFERENCE'.

    Thanks.

    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.