cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Date variable

Former Member
0 Kudos
679

Hello experts,

Can somebody help me with figuring out date variable, sy-datum - 35 days logic in selection-low. Is there a function to figure this? Thanks in advance.

KV

Accepted Solutions (1)

Accepted Solutions (1)

ferry_lianto
Active Contributor
0 Kudos

Hi Kanya,

You can use this FM <b>RP_CALC_DATE_IN_INTERVAL</b>.

call function 'RP_CALC_DATE_IN_INTERVAL'
         exporting
              date      = sy-datum
              days      = 35
              months    = 0
              signum    = '-'
              years     = 0
         importing
              calc_date = wa_date.

    s_date-sign   = 'I'.
    s_date-option = 'EQ'.
    s_date-low    = wa_date.
    append s_date.

Hope this will help.

Regards,

Ferry Lianto

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You don't need a function module.

data: new_date type sy-datum.

new_date = sy-datum - 35.

The system will handle this for you, just do the subtraction.

REgards,

Rich Heilman

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks a lot for helpful answers. Awarded points.

KV