Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Date FM

former_member2382
Active Participant
0 Likes
743

Hi All,

I am looking for a FM which should give me previous date after importing current date and Number of days( Range 1 to 365). Can you please let me know?

This is urgent.

Regards,

Md.

Edited by: Alvaro Tejada Galindo on Feb 21, 2008 10:38 AM

6 REPLIES 6
Read only

Former Member
0 Likes
707

Hi,

use the foll FM HR_SEN_CALE_DAYS_DATE

 Import parameters               Value

 ID_DATE                         21.02.2008
 ID_OPERATOR                     -
 IS_DURATION                         0.0000     0.0000      365.0000


 Export parameters               Value

 ED_DATE                         22.02.2007

Cheers,

jose

Read only

Former Member
0 Likes
707

Hi,

Could you please re-frame your question or give an example on what you are expecting?

Regards,

Yellappa.

Read only

Former Member
0 Likes
707

Hi,

You don't need a function module for this, you can do it in one line of ABAP;


NEW_DATE = CURRENT_DATE - DAYS.

Where NEW_DATE and CURRENT_DATE ate date type variables.

Regards,

Nick

Read only

Former Member
0 Likes
707

hope these function modules help you

HR_HK_DIFF_BT_2_DATES

diff between two dates

SD_DATETIME_DIFFERENCE

-difference in days and time for two dates

RP_CALC_DATE_IN_INTERNAL

RE_ADD_MONTH_TO_DATE ADD OR SUBSTRACTS MONTHS TO FROM DATE

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Feb 21, 2008 10:38 AM

Read only

Former Member
0 Likes
707

Hi,

You can use FM RP_CALC_DATE_IN_INTERVAL.

If you wish to get previous spcify the days with -ve sign.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
707

Use FM RP_CALC_DATE_IN_INTERVAL


For previous date,
Pass date as today's date
        no. of days as 1
        sign as '-'.


To get the next day's date,

Pass date as todays date
        no of days as 1
         sign as '+'

Hope this helps.

<REMOVED BY MODERATOR>

Thanks,

Balaji

Edited by: Alvaro Tejada Galindo on Feb 21, 2008 10:39 AM