Hi
Say i am retrieving data from VBAK
select * from vbak
retrieving data from vbap
select * from vbap
retreiving from likp
select * from likp
retrieving from lips
select * from lips
retrieving from kna1
select * from kna1...
i want to pass all data to final internal table..
which table we loop first ....why is that so..
How read works on these tables??
Thanks in advance
First u have to loop at VBAK because it is the header table.Then within that loop u need to read the other internal tables.
READ can hold only one record at any point of time.
Like
loop at it_vbak.
.........
read table it_vbap with key vbeln = it_vbak-vbeln.
move corresponding fields to ur final internal table
...........
append it_final.
endloop.
hi RK,
u can use inner join for vbak, vbap, lips, likp with vbeln key.
select vbakfield vbapfields lipsfields likpfields into corresponding fields of itab from vbak inner join vbap on vbakvbeln = vbapvbeln inner join lips on vbakvbeln = lipsvbeln inner join likp on vbakvbeln = likpvbeln where ( ur conditions).
try to relate ur fields with KNA1 table fields and populate the final itab.
Regards
CNu
Add a comment