on 04-11-2014 7:25 PM
Hello Experts
I want to write end routine to load 0COMP_CODE based on calmonth and 0COUNTRY as below.
IF calmonth is between jan 2014 to jun 2014 then it will return company code based on following conditions.
if 0country = AX1, AX2, AX3, AX4, AX5,AX6,GH6,BH6,KU9,BN8,TG9,RT5 ; 0COMP_CODE = C70
if 0country = TG9,RT5 ; 0COMP_CODE = J98
if 0country = GH7,YU9 ; 0COMP_CODE = C68
if 0country = KO8 ; 0COMP_CODE = I98
IF calmonth is between july 2014 to dec 2014 then it will return company code based on following conditions.
if 0country = AX1, AX2, AX3, AX4, AX5,AX6,GH6,BH6,KU9,BN8, ; 0COMP_CODE = C70
if 0country = GH7,YU9 ; 0COMP_CODE = C68
if 0country = KO8 ; 0COMP_CODE = I98
Please help.
Thanks & Regards
Anuja
I am providing a rough code for the same:
LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
IF <RESULT_FIELDS>-calmonth GE '201401'
and IF <RESULT_FIELDS>-calmonth LE '201406' .
If <RESULT_FIELDS>-country = 'AX1'
or
I<RESULT_FIELDS>-country = 'AX2'
or
<RESULT_FIELDS>-country = 'AX3'.
<RESULT_FIELDS>-comp_code= 'C70'.
endif.
endif.
Endloop.
Similarly you can write for other conditions.
Hope this gives an idea.
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 |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.