cancel
Showing results for 
Search instead for 
Did you mean: 

MAP update in PO at PGI

Former Member
0 Kudos

Hi All,

We have been trying to update Price in PO at the time of PGI using USEREXIT SAVE_DOCUMENT triggering BAPI_PO_CHANGE. It is failing because PO cannot be edited while PGI is under process/Outbound Delivery is being worked on.

Can anyone please suggest if there is any way to update the price in PO at PGI.

PS: We have MAP in the system which changes in the system, due to this PO is created as some different price and PGI postings happen at the MAP of that day which is most of the times different than price in PO.

Thanks in advance friends.

Manav

Accepted Solutions (0)

Answers (2)

Answers (2)

JL23
Active Contributor
0 Kudos

can you explain the background for this.

A Po is usually a document to an external vendor, the price in the PO is the price you have to pay to your vendor, so it is not logical to me to make this price equal to a moving average price, which is calculated by stock value + new receipt value divided by new total stock quantity. And even gets effected and adjusted if you have price differences when you post the invoice.

Why would you external price be equal to a MAP ?

and why are you doing PGI for a PO?

former_member182609
Active Contributor
0 Kudos

To update price in PO please put some delay to trigger user exit in program as soon as delivery pgi completed it will update the price accordingly.Check with your ABAP er is it possible to put delay.

JL23
Active Contributor
0 Kudos

the PO is locked when you edit the delivery (post goods issue to an inbound delivery), a delay would not help.

Former Member
0 Kudos

Apologies for conveying it wrong, this is not a PO but Intercompany STO which we are using to send goods from US to Canada. Just to reiterate the problem: STO got created today with Price as MAP as of today, PGI happens after delay of few days lets say 5 days - the postings for PGI will happen based on the MAP for that day. Now when PGR happens it will do postings based on price in STO resulting in different postings than PGI. So this is the reason we want to update the price in Intercompany STO when we do PGI.

I hope this details of the issue help. Appreciate all help on this issue.

Former Member
0 Kudos

@Sridhar: During PGI STO gets locked and you cannot change it in the background unfortunately.

former_member182609
Active Contributor
0 Kudos

Can you tell me is MAP changed every hour or once it daily.If it is daily case then create a custom program to update moving average price in all open POs.

Setup custom program as a background program to update MAP.

Former Member
0 Kudos

Well MAP changes often but not every hour for sure. The problem is if we create a batch job which updates all the Open STO's then MAP will get updated after PGI which is again an issue, as the MAP may change after PGI. That's why we want that update in price should happen as and when PGI happens so that their are no different prices in STO & PGI postings.

former_member182609
Active Contributor
0 Kudos

If you set upjob early morning in the day or the change of MAP change then it will not give any problem.As both PO and delivery will reflect same price.

JL23
Active Contributor
0 Kudos

The purchase order history (table EKBE) has the refrence from your STO to the goods issue material document, as well it has the amount and the quantity.

so it should be possible to update the price conditions at any time after a goods issue and before a receipt using the values from EKBE records only to calculate the MAP at time of goods issue and to update your price condition

Former Member
0 Kudos

@Jurgen: Can you please tell what approach should be taken to achieve this.

JL23
Active Contributor
0 Kudos

own report that loops thru EKBE and starts the BAPI for the update

Former Member
0 Kudos

Hi Jurgen,

I just checked with ABAPer and found out that SAP has blocked conditions update using BAPI_PO_CHANGE after PGI has been done.

Any other advice on this issue?

Thanks

Manav

Former Member
0 Kudos

We addressed the issue in following way:

Initiated Event whenever PGI is done. Used that Event to trigger User_Exit to update Conditions in PO and save it. Thus, we have PGI price in PO which is taken at the time of GR.

Thanks for all the feedback guys.