‎2008 Jan 10 6:10 AM
Dear all,
I am doing something like this
LOOP AT IT_RESB INTO WA_RESB.
READ TABLE IT_EBAN INTO WA_EBAN WITH KEY MATNR = WA_RESB-MATNR.
no resb has multiple entries of the same material.
so the read statment will pick up the first entry that it gets even though the same material if repeated thrice it has 3 different quantities.so my first quantity is repeated everywhere.
What other key can i use betewwn these two tables?
BANFN does not get updated in RESB,else problem would have been solved.plz tell me how to loop
‎2008 Jan 10 6:16 AM
Hi,
Use one more loop statement instead of READ.
LOOP AT IT_RESB INTO WA_RESB.
LOOP AT IT_EBAN INTO WA_EBAN WHERE MATNR = WA_RESB-MATNR.
(If u want to sum the quantity, do it. All the 3 qty records will be considered.)
sum = sum + wa_eban-qty.
ENDLOOP.
(do the required process with the summed qty)
ENDLOOP.
Edited by: Ramesh Hirial on Jan 10, 2008 3:17 PM
‎2008 Jan 10 6:16 AM
Hi,
Use one more loop statement instead of READ.
LOOP AT IT_RESB INTO WA_RESB.
LOOP AT IT_EBAN INTO WA_EBAN WHERE MATNR = WA_RESB-MATNR.
(If u want to sum the quantity, do it. All the 3 qty records will be considered.)
sum = sum + wa_eban-qty.
ENDLOOP.
(do the required process with the summed qty)
ENDLOOP.
Edited by: Ramesh Hirial on Jan 10, 2008 3:17 PM
‎2008 Jan 10 6:21 AM
Hi Rahul,
Try this.
After using this quantity before the Endloop statement Delete that record from the Internal table. Now each time u can get different quantity.
awrd points if helpful
Bhupal