‎2008 Nov 22 7:56 AM
Hello all,
I want to determine date in this fashion.
if date is 12.07.2008 what is the date after 113 days? or
if date is 24.03.2007 what is the date after 21 days ...for me the date and the no.of days for which i need to determine the date are not constant.
Is there any func. module so determine dates like this.Hope i explained it clearly.
with regards,
sandeep akella.
‎2008 Nov 22 8:06 AM
see the following example .
report zdates.
parameters:p_date type sy-datum ,
p_days type T5A4A-DLYDY,
p_month type T5A4A-DLYMO,
p_year type T5A4A-DLYYR .
skip.
parameters:add type T5A4A-SPLIT radiobutton group g1 ,
sub type T5A4A-SPLIT radiobutton group g1.
data: calc_date type sy-datum,
days type T5A4A-DLYDY,
months type T5A4A-DLYMO,
years type T5A4A-DLYYR ,
sign type T5A4A-SPLIT .
if add = 'X'.
sign = '+'.
else.
sign = '-'.
endif .
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = p_date
days = p_days
months = p_month
SIGNUM = sign
years = p_year
IMPORTING
CALC_DATE = CALC_DATE
.
write:/ calc_date .
‎2008 Nov 22 8:06 AM
see the following example .
report zdates.
parameters:p_date type sy-datum ,
p_days type T5A4A-DLYDY,
p_month type T5A4A-DLYMO,
p_year type T5A4A-DLYYR .
skip.
parameters:add type T5A4A-SPLIT radiobutton group g1 ,
sub type T5A4A-SPLIT radiobutton group g1.
data: calc_date type sy-datum,
days type T5A4A-DLYDY,
months type T5A4A-DLYMO,
years type T5A4A-DLYYR ,
sign type T5A4A-SPLIT .
if add = 'X'.
sign = '+'.
else.
sign = '-'.
endif .
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = p_date
days = p_days
months = p_month
SIGNUM = sign
years = p_year
IMPORTING
CALC_DATE = CALC_DATE
.
write:/ calc_date .
‎2008 Nov 22 8:15 AM
Hi,
Try like this...
PARAMETER : da TYPE dats,
da1(4).
da = da + da1.
write da.
Regards
Debarshi
‎2008 Nov 22 8:47 AM
Sandeep please search before posting the question.as I'm watching since last two weeks you always land with easy finding questions.
Please understand,if i hurt you than i'm sorry.
https://www.sdn.sap.com/irj/scn/advancedsearch?query=dayaddto+date&cat=sdn_all
‎2008 Nov 22 8:54 AM