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

Function Module to find 3 months Old Date

Former Member
0 Likes
2,344

Is there any function module to find out 3 months old date for a todays date....Pls Help me......

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,545

Hi,

use function module : J_1H_CAL_DATE_IN_INTERVAL

use code as below :

data : date type sy-datum, out_date type sy-datum.

date = '20070702'.

CALL FUNCTION 'J_1H_CAL_DATE_IN_INTERVAL'

EXPORTING

date = date

days = '00'

months = '03'

SIGNUM = '-'

years = '00'

IMPORTING

CALC_DATE = out_date.

write 😕 out_date.

Sandeep Kaushik

Message was edited by:

Sandeep Kaushik

7 REPLIES 7
Read only

Former Member
0 Likes
1,545

Hi

Check the fun module

<b>CCM_GOBACK_MONTHS

Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
1,545

Hi,

try this CALL FUNCTION 'MONTH_PLUS_DETERMINE'

(Or)

RP_CALC_DATE_IN_INTERVAL.

<b>Reward points</b>

Regards

Read only

Former Member
0 Likes
1,545

CCM_GO_BACK_MONTHS

regards,

Omkar.

Message was edited by:

Omkaram Yanamala

Read only

Former Member
0 Likes
1,545

Hi Wood,

Check this Link,

https://forums.sdn.sap.com/click.jspa?searchID=3584656&messageID=2480568

Thanks,

Reward If Helpful.

Read only

Former Member
0 Likes
1,545

data:

find_date like sy-datum.

CALL FUNCTION 'MONTH_PLUS_DETERMINE'

EXPORTING

MONTHS = -3

OLDDATE = sy-datum

IMPORTING

NEWDATE = find_date

.

write sy-datum.

write find_date.

Read only

Former Member
0 Likes
1,546

Hi,

use function module : J_1H_CAL_DATE_IN_INTERVAL

use code as below :

data : date type sy-datum, out_date type sy-datum.

date = '20070702'.

CALL FUNCTION 'J_1H_CAL_DATE_IN_INTERVAL'

EXPORTING

date = date

days = '00'

months = '03'

SIGNUM = '-'

years = '00'

IMPORTING

CALC_DATE = out_date.

write 😕 out_date.

Sandeep Kaushik

Message was edited by:

Sandeep Kaushik

Read only

Former Member
0 Likes
1,545

Hi,

Try using this FM:

'RP_CALC_DATE_IN_INTERVAL'

call function 'RP_CALC_DATE_IN_INTERVAL'

exporting

date = v_date "input ddmmccyy

days = '90'

months = '00'

signum = '-'

years = '00'

importing

calc_date = v_date

exceptions

others = 1.

PS:REWARD POINTS IF HELPFUL!!!

Regards,

Krithiga