FM : SUBTRACT_TIME_FROM_DATE not giving result
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
CALL FUNCTION 'SUBTRACT_TIME_FROM_DATE'
I_IDATE = l_lndat
I_TIME = l_days
I_IPRKZ = 'D' (also tried with 1,2)
O_IDATE = gv_erdate
INVALID_PERIOD = 1
INVALID_ROUND_UP_RULE = 2
INTERNAL_ERROR = 3
OTHERS = 4
gv_erdate is 00000000.
Can some please help me.