Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

EKKO - EKPO - EKET

TuncayKaraca
Active Contributor
0 Kudos

Hi,

I was writing a report that selects data EKKO (Purchase Order), EKPO (Purchase Order Items) and EKET (Purchase Order Delivery Schedule). I needed to get BANFN field (Purchase Requisition) number which is related to the PO.

Both EKPO and EKET tables have BANFN fields. Firstly I selected BANFN from EKPO table, but later I noticed that for some PO BANFN is empty, but EKET includes proper BANFN number. So What is the issue hear? I will get the BANFN from EKET table, but am I going to do correct thing?

Thank you,

7 REPLIES 7

Former Member
0 Kudos

EKPO is the PO item table and its not necessary that the PO needs to be created with ref to a Purchase req. So, when it is created with ref to Req then you have the BANFN field in the EKPO table.

However, I would expect that if EKET has the Req data then EKPO also should have.

Regards,

Ravi

Note : Please mark all the helpful answers

0 Kudos

Ravikumar,

"However, I would expect that if EKET has the Req data then EKPO also should have."

I thought like above that but I have an example right now: EKET has the Req. number, but EKPO-BANFN (Req.) is empty.

ferry_lianto
Active Contributor
0 Kudos

Hi,

Have you looked table EBAN?

Regards,

Ferry Lianto

former_member181962
Active Contributor
0 Kudos

Hi Tuncay,

To get the BANFN value, ity is better to hit the EBAN table instead of the EKET table.

select BANFN

from EBAN

WHERE EBELN = EKPO-EBELN

AND EBELP = EKPO-EBELP.

rEGARDS,

RAVI

0 Kudos

Okay I can hit EBAN table since EBAN is the table for Purc.Req.

My reports lists the EKKO, EKPO and EKET records. And you know there are one-to-many relationship between those tables. What I mean is one EKPO record can have more than one records in EKET table. So since I listed EKET records, I was wondering each EKET record can have different Purch. Req. number for one EKPO record. If it does, I think it is better to use EKET table.

What do you think?

Thanks,

0 Kudos

Hi Tuncay,

Let us assume that you have multiple records in EKET for an item in EKPO. Then even hitting EBAN will result you in mutiple records. This way you can be sure that if at all there exist a purchase requistion for a PO Item, you will not miss it(What you pass is EBELN and EBELP which are the key in ekpo-no chance of having empty entries).

Where as , as per your logic, there may be a chance of missing the BANFNs if it is not maintained in EKPO.

Regards,

Ravi

jeff_t
Explorer

Hi Tuncay,

Many years later I had a similar question, relating to some very old POs in our SAP system. That is, why does the requisition number appear in the item overview of Me23n, yet EKPO-BANFN is still blank (req no. is filled only in EKET-BANFN).

I found SAP Note 201004 which seems to provide an answer: "In the new enjoy transaction Me22n field EKPO-BANFN is filled. But in the old transaction Me22 it is not filled."

I proved this was so, using an old PO with 2 items. As an example, I modified the statistical delivery date on the schedule line of both items by:

1st item: Using new transactoin Me22n

2nd item: Using old transaction Me22.

Result: EKPO-BANFN is now filled in with Req number for only the 1st item.

Cheers,

Jeff