Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

FM : SUBTRACT_TIME_FROM_DATE not giving result

Hi Experts,

i need to subtract certain no of days from a given date . i am using the FM :SUBTRACT_TIME_FROM_DATE.

but this is returing the output as 00/00/0000.

My code is as follows:

data : gv_erdate type sy-datum.

l_lndat = 08142008

l_days = can have values 0,1,2...etc

gv_erdate

CALL FUNCTION 'SUBTRACT_TIME_FROM_DATE'

EXPORTING

I_IDATE = l_lndat

I_TIME = l_days

I_IPRKZ = 'D' (also tried with 1,2)

  • I_RDMHD =

IMPORTING

O_IDATE = gv_erdate

EXCEPTIONS

INVALID_PERIOD = 1

INVALID_ROUND_UP_RULE = 2

INTERNAL_ERROR = 3

OTHERS = 4

gv_erdate is 00000000.

Can some please help me.

thanks

Dan

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question