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 to go back years

Former Member
0 Likes
827

i'm looking for a function module which will go a certain years back,

suppose in the input field i'll give a date like 06.12.2007 & i want to get 12 years back date,so i'll give 12 in the input field & i'll have the output 01.12.1995.

thanks in advance........

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
721

Use this FM

CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'

EXPORTING

date = w_edate

days = '00'

months = '00'

signum = '-'

years = '03'

IMPORTING

calc_date = w_edate.

Regards,

Sai Ramesh

4 REPLIES 4
Read only

Former Member
0 Likes
721

Hi Sarkar,

Use the FM /SAPHT/DRM_CALC_DATE

For eg:

Import parameters Value

DATE 06/12/2007

DAYS 00

MONTHS 00

SIGN -

YEARS 12

Export parameters Value

CALC_DATE 06/12/1995

Regards

Raj

Read only

former_member386202
Active Contributor
0 Likes
721

Hi,

try these Fms

HRAR_SUBTRACT_MONTH_TO_DATE

OI00 Oil cross application function modules

OIL_DATE_SUBTRACT_MONTH date subtract month

OIUPR_SKF_SUBMISSION SKF Submission

OIUPR_DATE_SUBTRACT_MONTH date sub month

OIUP_ADMIN_WORKBENCH PDM Administrators workbench

OIUP_SPLIT_DATE_SUB_ONE_MONTH Subtract 1 month from split date

Regards,

Prashant

Read only

Former Member
0 Likes
722

Use this FM

CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'

EXPORTING

date = w_edate

days = '00'

months = '00'

signum = '-'

years = '03'

IMPORTING

calc_date = w_edate.

Regards,

Sai Ramesh

Read only

Former Member
0 Likes
721

Hi,

Use FM <b>RP_CALC_DATE_IN_INTERVAL</b> to get Date as needed by you.

Reward if helpful.

Thanks,

Lalit