‎2008 May 13 9:18 AM
I need to use today's date as to dat
today's date = sy-datum.
How to get a date 12 months from today's date.
‎2008 May 13 9:20 AM
Hi,
Use FM:RP_CALC_DATE_INTERVAL
Check this Program.
DATA:date2 TYPE d.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = sy-datum
days = 0
months = 12
signum = '+' "For adding months +,For subtracting -
years = 0
IMPORTING
calc_date = date2
.
WRITE:date2.
‎2008 May 13 9:22 AM
hi,
do this way ..
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = date
days = '00'
months = '12'
signum = '+'
years = '00'
IMPORTING
calc_date = v_date. "<<< will have 12 months date..
‎2008 May 13 9:24 AM
hi check this..
parameters:p_date type sy-datum .
or check this..
report message-id zmsf.
DATA:
l_select_date LIKE workflds-gkday,
l_select_week LIKE scal-week.
pop up calendar.
CALL FUNCTION 'F4_DATE'
EXPORTING
date_for_first_month = sy-datum
IMPORTING
select_date = l_select_date
select_week = l_select_week
EXCEPTIONS
calendar_buffer_not_loadable = 1
date_after_range = 2
date_before_range = 3
date_invalid = 4
factory_calendar_not_found = 5
holiday_calendar_not_found = 6
parameter_conflict = 7
OTHERS = 8.
IF sy-subrc <> 0.
EXIT.
ENDIF.
Validate date - An invalid date is caused by using the cancel
button on the calendar
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
date = l_select_date
EXCEPTIONS
plausibility_check_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
User has cancelled the calendar
EXIT.
ENDIF.
regards,
venkat
‎2008 May 13 9:26 AM
hi
RP_CALC_DATE_INTERVAL this FM does not exist
try this
RP_CALC_DATE_IN_INTERVAL
cheers
snehi
‎2008 May 13 9:35 AM
Hi Chouhan,
You are right
The Function module Name is RP_CALC_DATE_IN_INTERVAL
But i have used the same function module in my program
‎2008 May 13 9:34 AM
Hi,
Use the FM
CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'
EXPORTING
MONTHS = '12'
OLDDATE = D_DATE_NM_FD
IMPORTING
NEWDATE = D_DATE_NM_FD.
and give number of months in input
reward point if found helpful
‎2008 May 13 9:37 AM
Hi,
Use the any of the function modules.
SG_PS_ADD_MONTH_TO_DATE
MONTH_PLUS_DETERMINE
BKK_ADD_MONTH_TO_DATE
RE_ADD_MONTH_TO_DATE
HR_PSD_DATES_ADD_MONTHS
HR_HCP_ADD_MONTH_TO_DATE
HR_JP_ADD_MONTH_TO_DATE
HR_BR_ADD_MONTH_TO_DATE
HR_PT_ADD_MONTH_TO_DATE