2006 Sep 25 2:09 PM
Hi folks....
there is a BAPIRLCORQ structure which has relcode_01 to 08 fields and i want 2 pick two release codes beginng frm last release code. Frnds i need the logic for this...vales r there in relcode_01 and relcode_02 but we hav keep on checking from last i.e relcode_08.so plzz let me know the logic...
see we hav to Check from rel_8 and check the corresponding fields i.e 7 and see if values r present in both then we hav to pick them or else we hav check rel_8 and rel_6 and also rel_7 and rel_6 so we hav to go sequentially from down to rel_1 and where we get two consecutive values we hav to stop and pick those values.so hav u got my point frnd..if no then let me know.
looking for ur reply.
Hi folks....
there is a BAPIRLCORQ structure which has relcode_01 to 08 fields and i want 2 pick two release codes beginng frm last release code. Frnds i need the logic for this...vales r there in relcode_01 and relcode_02 but we hav keep on checking from last i.e relcode_08.so plzz let me know the logic...
see we hav to Check from rel_8 and check the corresponding fields i.e 7 and see if values r present in both then we hav to pick them or else we hav check rel_8 and rel_6 and also rel_7 and rel_6 so we hav to go sequentially from down to rel_1 and where we get two consecutive values we hav to stop and pick those values.so hav u got my point frnd..if no then let me know.
looking for ur reply.
2006 Sep 25 2:13 PM
What should be the sequence of read ?/
8 and 7
8 and 6
8 and 5
....
7 and 6
7 and 5
Do varying lrc from itab-relcode8 next itab-relcode7.
if lrc is not initial and l1 = 0.
l1 = 9 - sy-index.
ltemp = l1.
endif.
if l1 > 0 and l1 <> ltemp and lrc is not initial.
l2 = 9 - sy-index.
endif.
if l1 > 0 and l2 > 0.
exit.
endif.
enddo.
Here l1 and l2 are the two release code values with consecutive data.
Message was edited by: Anurag Bankley
2006 Sep 25 2:15 PM
2006 Sep 25 2:25 PM
Hi,
For this you can maintain 2 loops one within other.
do 7 times.
var1 = sy-index.
do 7 times.
var2 = sy-index.
concatenate 'relcode_' var1 to text1.
assigne ( text1 ) to <field_sym1>.
concatenate 'relcode_' var2 to text1.
assigne ( text1 ) to <field_sym2>.
if not <field_sym1> is initial and
not <field_sym2> is initial.
v_check = '1'.
exit.
endif.
enddo.
if v_check = '1'.
exit.
endif.
clear v_check.
enddo.
check this out.
Regards,
Suman
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |