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

sy-tabix

Former Member
0 Likes
571

one can set the value of sy-tabix dynamically(in a program) or not?

one can set the value of sy-tabix dynamically(in a program) or not?

3 REPLIES 3
Read only

Former Member
0 Likes
548

YES IT IS POSSIBLE TO DO IT.

example

read table p_it_history with key ebeln = wa_final-ebeln

ebelp = wa_final-ebelp

binary search transporting no fields.

loop at p_it_history into wa_history from sy-tabix

where ebeln = wa_final-ebeln

and ebelp = wa_final-ebelp.

wa_final-bewtp = wa_history-bewtp.

wa_final-bwart = wa_history-bwart.

wa_final-belnr = wa_history-belnr.

wa_final-buzei = wa_history-buzei.

wa_final-budat = wa_history-budat.

wa_final-bpmng = wa_history-bpmng.

wa_final-wrbtr = wa_history-wrbtr.

wa_final-shkzg = wa_history-shkzg.

wa_final-vgabe = wa_history-vgabe.

append wa_final to p_it_final.

plz reawrd if useful

keep rockin

vivek

Read only

0 Likes
548

but in the program code given by you,sy-tabix will adjust to a system value. according to me,for example in your program,only one record will be read and that should be the very first record.is not it?

if,say i have set sy-tabix = 5 just above the loop statement ,then is it that 5th record will be stored in the work area mentioned????

plz clarify.

Read only

0 Likes
548

but in the program code given by you,sy-tabix will adjust to a system value. according to me,for example in your program,only one record will be read and that should be the very first record.is not it?

if,say i have set sy-tabix = 5 just above the loop statement ,then is it that 5th record will be stored in the work area mentioned????

plz clarify.