‎2007 Sep 05 12:41 PM
Hi,
i want to add days to particular date. for example i have date 23 i need to add days to this 23 (ie 23 days) in scripts. plz let me know any function module is there or not ? if not how to achieve this thru code.
Thanks & Regards
Munna
‎2007 Sep 05 3:19 PM
Hi Syed,
You this can be achived by coding in Print program. create a variable & in this variable concatenate 23 & days. And pass this variable in the script. Or if you are already passing the 23 to script the after the 23 you can simply write the DAYS after the variable (in which value 23 is passed).
Reward points if helpful answer.
Asvhender
‎2007 Sep 05 2:50 PM
DATA: LF_DATE TYPE D.
LF_DATE = '20070905'.
ADD 23 TO LF_DATE.
WRITE LF_DATE DD/MM/YYYY.
Result: 28.09.2007 (in your local date format)
Is that what you're looking for?
‎2007 Sep 05 2:59 PM
Hi,
actually i am looking for requireent to add text days after date.
suppose date is 23 i need to add text days after 23 final out put i need is 23 days.
Thanks & Regareds
Munna
‎2007 Sep 05 3:19 PM
Hi Syed,
You this can be achived by coding in Print program. create a variable & in this variable concatenate 23 & days. And pass this variable in the script. Or if you are already passing the 23 to script the after the 23 you can simply write the DAYS after the variable (in which value 23 is passed).
Reward points if helpful answer.
Asvhender
‎2007 Sep 06 5:19 AM
Hi Munna,
Date format stores in SAP by default YYYYMMDD.
If you want get the date declare variable and get the DD values to use.
day+6(2).
Regards,
Ameer Baba.
‎2007 Sep 06 6:26 AM
Hi syed,
you can use this function module "RP_CALC_DATE_IN_INTERVAL" to add days or month or years to a given date.
Eg:to add 23 days and 1 month to a date
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = ws_date
days = 23
months = 1
signum = '+'
years = 0
IMPORTING
calc_date = ws_eddate.
Regards,
Sheron