Skip to Content
Former Member
Jan 28, 2007 at 02:17 AM

How to drop the reversed GRs while selecting from EKBE ?



I have a requirement to select only GR which are not reversed. Suppose we have a PO with 2 items with 3000 quantity each. First time user did GR (using MIGO) with quantity 1000 for each item by mistake. So the user comes back to MIGO, reverse it and do a GR again for 1100 each item. If you look at EKBE for this PO, you will see three lines for each item. First line will be GR(moment type 101) with quantity 1000, 2nd line will be reverse of it ( with moment type 102), with quantity 1000 and the 3rd line will the new GR(moment type 101) with quantity 1100. Now in my requirement is to select this new GRs from EKBE for each item. I am using a select..for all entries of ts_ekpo (assume that this table is filled already with right PO items) internal table into another internal table ts_ekbe. So I am selecting total 6 lines, 3 lines for each item. I don't want to select the reversed lines. Will there be any flag in EKBE table to identify that the line is reversed or that the line is new GR line ? If you need more clarity please let me know. Your help will be appriciated.

Thank you,