Application Development 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: 

for all entries

Former Member
0 Kudos

Can i use five join statement or else shall v go to for all entries which is efficient and send the coding for for all entries

thanks for replying all

2 REPLIES 2

Former Member
0 Kudos

Data : begin of itab,

vbeln like vbrk-vbeln,

end of itab

data : i_vbrp like vbrp occurs 0 with header line.

select vbeln into itab from vbrk.

select * from vbrp into i_vbrp

for all entries in itab

where vbrp~vbeln = itab-vbeln.

Former Member
0 Kudos

Hi Ramesh,

Join is more efficient when you join 2 to 3 tables.

But for 5 tables, its not advisable to use join, its better to use FOR ALL ENTRIES.

Ex:

SELECT qmnum

FROM QMEL

INTO TABLE it_qmel.

if sy-subrc eq 0.

select qmnum manum

into table it_qmsm

from qmsm

for all entries in it_qmel

where qmnum = it_qmel-qmnum.

endif.