on 09-17-2013 9:20 AM
Hi Experts,
I am adding days in date in transformation routine, its showing invalid output in some cases. Code is like
ZDate = ZDate + ZDays
If date is like 17-09-2013 and if I add 10 days the result is 27-09-2013 but if I add 180 days to it than it shows invalid date output. Any date where year is changing it gives an invalid output.
any thoughts?
regards.
Hi Ray,
I think your code needs to be adjusted so that if the case is like 180 days the Zdate calculation should go beyond the current year.
Definition of Zdata might need to be checked in code.
Br,
Arpit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I got the function moduel for your requirement
DATE_CREATE
DATUM_EIN--Pass your date field in this parameter
ANZAHL_KALTAGE--pass your days in this parameter.
DATUM_AUS--Will give you the date after adding the days.
This also considers the leap year and all.
Hope this helps.
Regards,
AL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
If you add 180 days to 17-09-2013 then technically it becomes 197-09-2013, which is definitely invalid format.
I feel your code has to be modified in such a way the date jumps to the 180th date of next year from 17-09-2013. So you have to take care of Calday and calyear and Dec/Jan logic.
Please take an ABAPer help.
Regards,
Suman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
How you have defined zdate..
Define it as of type 0calday so that it automatically does all the conversions.
Data:Zdate type /BI0/OICALDAY.
Give a try and also share the code with us.
Regards,
AL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.