Application Development 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: 

How to get the last date of that month after adding the two month.

Former Member
0 Kudos

Hi,

I have a requirement, My input is month/lastdate of the month/year after adding 2 months i want the same format mont+2/lastdate of the month/year.

Please let me know the exact FM for this.

I have check this FM RE_ADD_MONTH_TO_DATE.

Input:

Import parameters Value

MONTHS 02

OLDDATE 02/29/2008

Output:

Export parameters Value

NEWDATE 04/29/2008

But this wrong because i am expecting the last date of the April.

2) I have checked another FM that also also shows the wrong output: RP_CALC_DATE_IN_INTERVAL

Import parameters Value

DATE 12/31/2008

DAYS 00

MONTHS 02

SIGNUM +

YEARS 00

Export parameters Value

CALC_DATE 03/01/2009

Thanks In avance,

Thanks & Regards,

Venkata

2 REPLIES 2

Former Member
0 Kudos

Hi,

do the RE_ADD_MONTH_TO_DATE then

Plug the result date into FM RP_LAST_DAY_OF_MONTHS

Regards

Stu

Former Member
0 Kudos

Try using the FM, HR_PSD_DATES_ADD_MONTHS.

Thanks!