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: 

calculate 6 months prior

Former Member
0 Kudos

Hello,

I have a date ls_datum. I need a date 6 months prior to ls_datum (ls_datum - 6 months).

Any ideas please.....

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Back in my 46c days, I was kind of partial to the RE_ADD_MONTH_TO_DATE function, you can just pass a negative number to go back.

Regards,

Rich Heilman

2 REPLIES 2

former_member156446
Active Contributor
0 Kudos

Hi Raju

check this FM


IF pa_older = 'X'.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = ls_datum
days = '00'
months = '06'
signum = '-'
years = '00'
IMPORTING
calc_date = ls_datum_6.
ENDIF.

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Jan 31, 2008 4:59 PM

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Back in my 46c days, I was kind of partial to the RE_ADD_MONTH_TO_DATE function, you can just pass a negative number to go back.

Regards,

Rich Heilman