Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Read statement with duplicate key fields


I have an internal table(EKBE) with 8 fields

ebeln ebelp vgabe gjahr belnr budat wrbtr refkey

populating the first 7 fields from EKBE table with VGABE = 2 and PO#, concatenating the WRBTR and GJAHR to get the Refkey and passing this to the 8th field.

Using this refkey, getting the document numbers from BKPF.

I am looping another internal table into a work area and reading the above internal table by passing the ebeln field and I am doing some calculations ,etc.

A custom table is getting updated from the above work area.

The issue is-

The internal table EKBE can have the same PO numbers with the same line item numbers but with different ref key's.

So, when I am reading the int. tab, it is reading only one record, since I have no other key's to read except EBELN. So for one PO# it is reading only 1 ref key, I cannot use the line item# as a key, as the line item#'s never match, even if they match they could be same PO# with same line item# and different ref key.

Any inputs highly appreciated.



Helpful Answer

Not what you were looking for? View more on this topic or Ask a question