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

Perfomance Issue

Former Member
0 Likes
346

Hi ,

Suppose I have got an internal table itab with field F1,F2,F3,F4.

Suppose itab F1,F2,F3 are already filled up with data . I want to fill field F4 based on Field F3 from a different table .

Take the example of F3 containing Vendor No . I want to get the Vendor name from LFA1 .

i dont want to use the below statement in bold

<b>select lifnr name1 from lfa1 into itab_lfa1 for all entries in itab where lifnr = itab-f3.

loop at itab.

read table itab_lfa1 with key lifnr = itab-f3.

-


endloop.</b>

Is there any way to select the data other than looping the itab itself .

1 REPLY 1
Read only

Former Member
0 Likes
312

sort itab_lfa1 by lifnr.

loop at itab.

at new lifnr.

read table itab index sy-tabix

select lifnr name1 from lfa1 into itab_lfa1 for all entries in itab where lifnr = itab-f3.

endat.

endloop.

Make sure LIFNR is the first field though.