cancel
Showing results for 
Search instead for 
Did you mean: 

Open PO quantity and scheduling aggerment for a vendor

pritam_baboo
Participant
0 Kudos
165

Hi All,

I want to validate weather a vendor has any open PO, if any open PO is there then we should not allow to create any PO for that vendor. For this we are using BADi 'ME_PROCESS_PO_CUST'. I have searched the forum and know that we can get this details against vendor in ME2L tcode. But how to use it in BADi. Is there any function module or any table where we can calculate open PO against particular vendor. Any suggestion is appreciated, Kindly help.

raymond_giuseppi
Active Contributor

For performance you could rely on flag EKPO-ELIKZ Delivery Completed indicator to find open PO (item) for vendor (or vendor + material) join with EKKO for vendor or use a sub-select.

Comparing PO Ordered quantity and Delivered quantity could cause performance problem in an interactve transaction such as ME21n (table EKKO + EKPO vs EKBE)

Accepted Solutions (0)

Answers (1)

Answers (1)

Prasoon
Active Contributor
0 Kudos

Hi,

I would suggest to check the below options:

1. If you are using automatic delivery complete indicator at GR and dont want to compare the open quantity and PO quantity, you may simply pass the material code, plant & vendor (and any other) combination to WB2_V_EKKO_EKPO2 table and check whether there is any entry with ELIKZ=blank and trigger the message from the exit/BAdi.

2. If you want to compare the open quantity and PO quantity, you may get the list of PO's for the material and use the FM: BAPI_PO_ GETDETAIL, which can give you the PO order quantity and the structure PO_ITEM_HISTORY_TOTALS can provide you the total of received quantity. You can find the difference, which will give you the open quantity and you may compare the same with PO qty. But this may affect performance.

3. You may use the SUBMIT option to pass the material, plant and vendor (and any other) combination along with selection parameter to the ME2N related program from the exit/BAdI and do the validation accordingly.

Regards,