Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to retrive data....

Former Member
0 Likes
510

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.

3 REPLIES 3
Read only

Former Member
0 Likes
474

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

Read only

0 Likes
474

8 and 7

8 and 6

like this...

so plz reply

Read only

Former Member
0 Likes
474

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