Skip to Content
author's profile photo Former Member
Former Member

How to drop the reversed GRs while selecting from EKBE ?

Hi,

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,

Surya.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2007 at 04:43 AM

    Hi Surya,

    If I'm not mistaken you can use MSEG-SMBLN field to identify that the line is reversed.

    Link between MSEG and EKBE is MSEG-MBLNR = EKBE-BELNR.

    Regards,

    Hendy

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Thanks for your replies on this. I started working on this issue again. I have got doubt when I looked at some of the fields of tables EKBE and MSEG. The fields LFBNR, and LFPOS are in both EKBE and MSEG tables. What are they for ? For cancelled GRs in MSEG these fields (LFBNR and LFPOS) have same value as fields SMBLN and SMBLP. If you look at EKBE these fields are filled as they are in MSEG. I am bit confused of this. Can any one clarify me?

      Thank you,

      Surya

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.