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

General

Former Member
0 Likes
1,209

good mornning to all viwers.thanks in advance and reward also.

Q1. i want to functionlity of this function module

'RP_CALC_DATE_IN_INTERVAL'

how is it work, please explain me with example.

regard : deep

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,185

this Is a Function module that calculates days added to a date.

for ex. 7 days added to 20071203 = 20071210.

data: w_date like sy-datum.

data: new_date like sy-datum.

CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'

EXPORTING

DATE = w_date

DAYS = 0

MONTHS = 3

SIGNUM = '+'

YEARS = 0

IMPORTING

CALC_DATE = new_date

EXCEPTIONS

OTHERS = 1.

8 REPLIES 8
Read only

Former Member
0 Likes
1,185

Hi,

You can add or subtract days, months, or years using this function module..

I hope this solves your requirement.

data : wa_date type sy-datum.

call function 'RP_CALC_DATE_IN_INTERVAL'

exporting

date = sy-datum

days = 0

months = 1 -


> give ur required month

years = 0

signum = '+'

importing

calc_date = wa_date.

write 😕 wa_date. -> new feature date

*Note

*signum = '+' "

*signum = '-' "

Reward if useful!

Read only

Former Member
0 Likes
1,185

Hi Deep,

This FM will calculate the future or past date based on the date difference you want. this FM is not released for customer so avoid using it.

Regards,

Atish

Read only

Former Member
0 Likes
1,185

Hi ,

With this FM you can get dates between two dates.

Used to Add/subtract years/months/days from a date.

Eg,

CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'

EXPORTING

DATE = DATE

DAYS = '01'

MONTHS = MONTHS

SIGNUM = '+'

YEARS = YEARS

IMPORTING

CALC_DATE = NEW_DATE.

Regards,

sathiya Ramasmay

Read only

former_member189059
Active Contributor
0 Likes
1,185

It seems simple enough

DATA -> your base date

SIGNUM -> Whether to add or subtract days / months / years ( either + or - )

DAYS -> days to be added / subtracted

MONTHS -> months to be added / subtracted

YEARS -> years to be added / subtracted

CALC_DATE -> output parameter -> resultant date

Read only

Former Member
0 Likes
1,185

hi..

use this FM.

data : wa_date type sy-datum.

call function 'RP_CALC_DATE_IN_INTERVAL'

exporting

date = sy-datum

days = 0 -


> <b>give ur required date</b>

months = 0 -


> <b>give ur required month</b>

years = 11 -


> <b>give ur required years</b>

signum = '-'

importing

calc_date = wa_date.

write 😕 wa_date. -> new minised date

*Note

*signum = '+' "

*signum = '-' "

<b>Reward points if useful</b>

Regards

Ashu

Read only

Former Member
0 Likes
1,186

this Is a Function module that calculates days added to a date.

for ex. 7 days added to 20071203 = 20071210.

data: w_date like sy-datum.

data: new_date like sy-datum.

CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'

EXPORTING

DATE = w_date

DAYS = 0

MONTHS = 3

SIGNUM = '+'

YEARS = 0

IMPORTING

CALC_DATE = new_date

EXCEPTIONS

OTHERS = 1.

Read only

Former Member
0 Likes
1,185

Hi,

This FM calculates the date according to the input you give to the FM

EG.

DATE 25.07.2006

DAYS 30

MONTHS 01

SIGNUM +

YEARS 00

it would calculate the date 1 month + 30 days after 25.07.2006

out would be :24.09.2006

Regards,

Himanshu

Read only

Former Member
0 Likes
1,185

hi,

this month gives the information how many months added/subtracted

for eample :

days : no days added/suntracted

years: no years added/subtracted

signum: use '-' or '+'

i hope u clear the point.

thanks,

maheedhar.t