‎2007 Jan 27 9:19 AM
hi ,
while using
call function 'HR_PSD_DATES_ADD_MONTHS'
exporting
v_date = itab2-rrdate
v_months = 12
importing
e_date = var_wpsd
EXCEPTIONS
NOT_POSITIVE = 1
OTHERS = 2
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
var_wpsd is not giving correct value
it is declared of the type e_date
plz help its very very urgent
‎2007 Jan 27 9:26 AM
Hi,
In debug mode, check the format of itab2-rrdate, is it in teh form YYYYMMDD,
and also try giving 12 within quotes '12'.
Regards
Subramanian
‎2007 Jan 27 9:42 AM
‎2007 Jan 27 9:56 AM
‎2007 Jan 27 9:29 AM
i think this fm will give you the last day of month after addind with the date.
check this fm MONTH_PLUS_DETERMINE whether it solves your problem or not?
regards
shiba dutta
‎2007 Jan 27 9:35 AM
Hi,
You can also use 'MONTHS_PLUS_DETERMINE' to derive the date.
Pass positive value to add months and negative value to deduct months.
Regards
Subramanian
‎2007 Jan 27 9:38 AM
hi,
try this.
data : wa_date type sy-datum.
call function 'RP_CALC_DATE_IN_INTERVAL'
exporting
date = sy-datum
days = 0
months = 12 --------------------> give ur required month
years = 0
signum = '+'
importing
calc_date = wa_date.
write :/ wa_date. -> new date
Note
signum = '+' "
signum = '-' "
Regards
Anver