on 2008 May 28 5:27 PM
Hello,
I have a DSO that contains 0FISCPER but no references at all to any calendar dates. I am using fiscal variant K0 and have added 0CALQUARTER to the InfoProvider. I now need to write a start/end routine to transform 0FISCPER to 0CALQUARTER. I have never written an ABAP routine outside of the 2 introductory ABAP classes I took several months ago. Can someone give me an example of what the start/end routine code should look like to accomplish this?
Thanks.
Derrick
Hi,
Try this:
This is with the assumption that your fiscal year is same as the calender year.
LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
IF <RESULT_FIELDS>-FISCPER(4)+3 = '1' OR '2' OR '3'.
<RESULT_FIELDS>-CALQUARTER = '1'.
ELSEIF <RESULT_FIELDS>-FISCPER(4)+3 = '4' OR '5' OR '6'.
<RESULT_FIELDS>-CALQUARTER = '2'.
ELSEIF <RESULT_FIELDS>-FISCPER(4)+3 = '7' OR '8' OR '9'.
<RESULT_FIELDS>-CALQUARTER = '3'.
ELSEIF <RESULT_FIELDS>-FISCPER(4)+3 = '10' OR '11' OR '12'.
<RESULT_FIELDS>-CALQUARTER = '4'.
ENDIF.
ENDLOOP.
There might be a function module that might calculate this automatically. Anyway, see if this code helps.
Please check the syntax.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
issue solved or not.....i know this is long back one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
59 | |
10 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.