Skip to Content
0

How to Change the PO Line Item to Free Item using BAPI_PO_CHANGE

Aug 04, 2017 at 10:38 PM

219

avatar image
Former Member

Hi Expert,

Our Purchase Orders are created from a different SAP system. My system rec'd the PO data by IDOC and used a BAPI_PO_CREATE and CHANGE to receive, create/change the PO into my system. Recently, we ran into a problem when a PO was initially created with Invoice Receipt (ekpo-wepos = 'X'), then changed to Free_item from the interface. The BAPI_PO_CHANGE function doesn't clear the Invoice Receipt indicator. Instead it rejected the IDOC with error message 'NO Delivery Cost'.

Does BAPI_PO_CHANGE update the Invoice Receipt indicator based on Free Item? If not, how to change the PO? Note that we can not use transaction ME22x in my system.

Thank you

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Jürgen L
Aug 05, 2017 at 07:35 AM
0

Invoice Receipt (ekpo-wepos = 'X') - this is certainly wrong, this is the goods receipt indicator, the invoice receipt indicator is EKPO-REPOS

Have you tried in ME22N? Did you get the same error? I am asking this for testing to understand the reason easier, not for replacing or as work around.

You may get this error because you have delivery costs in your conditions, which is not allowed for free items. See this KBA 1842416 - Delivery costs can not be added for free of charge material

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 09, 2017 at 08:54 PM
0

We can't use ME22N because the PO is actually created in a different SAP system. Basically, my customers only have ME23n access. No manual changes to the PO is allowed in my system. My system receives the PO data via PO IDOC.

The source SAP System manually changed the PO ITEM in ME22n to free item, Net Price has changed to 0, and the invoice receipt, GR, GR Non valued flags are cleared. Once the PO is save in the source system, it generates a PO IDOC to send the update to my system.

When my system received the IDOC, the IDOC was rejected with 'Delivery Costs' error and can not update the PO/item to Free ITEM. My system uses the BAPI_PO_CHANGE function to process and update the PO. The BAPI checks the Net Price from the existing data in EKPO table in my system and not the IDOC; thus, rejects the update.

Is there a way to use BAPI_PO_CHANGE to update the PO/Item to Free Item? If not, is there a different BAPI can be used? Note that ME22n is not available to my customers.

Thank you


Show 1 Share
10 |10000 characters needed characters left characters exceeded

If have never said that you shall recommend ME22N to your customer.

I just meant to use it yourself for troubleshooting. And "no" , the BAPI does not do different things than the online transaction in this regard. Have you even looked into the KBA?

0