on 04-10-2007 12:06 PM
Hi, we're trying to add weeks into a CALWEEK date. If we try to make a simple addition, to a CALWEEK it seems that the result is ok. But at the end of the year there is some problems. It continues adding and adding weeks (for example 70.2007). Is there any function that add weeks and add the year when the week is the last one?
Thanks in advance.
Best Regards,
Mónica
Hello Monica,
I did not try to search for the function module but here's an algorithm that will solve your problem:
1) Convert the calweek into a date using function module WEEK_GET_FIRST_DAY
2) Add 7 x the number of days to the date in #1 (note: dates are integers so you can just add using the normal abap +)
3) Convert the date from #2 into week using DATE_GET_WEEK
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, we are trying to use this in a Routine of ABAP.
Thanks in advance.
Best Regards,
Mónica Padilla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
is this in a routine or ABAP code or is it in a macro function?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.