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 add current date to one year

Former Member
0 Kudos

Hi,

How to add current date to one year?

Regards

Srinu

6 REPLIES 6

Former Member
0 Kudos

Hi,

Use FM RP_CALC_DATE_IN_INTERVAL.


CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
    EXPORTING
      date      = sy-datum
      days      = '00'
      months    = '00'
      signum    = '+'
      years     = '01'
    IMPORTING
      calc_date = v_new_date.

Cheers,

Vikram

0 Kudos

Hi,

'RP_CALC_DATE_IN_INTERVAL' FM is not there in Function builder.

Regards

Srinu

0 Kudos

Hi,

All this function module (RP_CALC_DATE_IN_INTERVAL) does is take the year part of the date and add (in this example) 1 to it. It then merges that back with the month and day of the current date.

You could do the same in a simple piece of code if the function is not available.

Regards,

Nick

Former Member
0 Kudos

DATA : new_date TYPE sy-datum.

CALL FUNCTION 'MONTH_PLUS_DETERMINE'
  EXPORTING
    months  = '12'
    olddate = sy-datum
  IMPORTING
    newdate = new_date.

WRITE 😕 new_date.

0 Kudos

Hi,

I am working on CRM , 'MONTH_PLUS_DETERMINE' there is no function module in Function builder.

Regards

Srinu

Former Member
0 Kudos

Search the SCN ..as there are lot many threads you can find on the Date functionality.

Reported!!!