PO re-price issue in BAPI_PO_CHANGE


BAPI_PO_CHANGE is used for re-pricing the Purchase Order. The calculation type CALCTYPE should be set to ‘B’ (meaning ‘Carry out new pricing’) and PRICEDATE should be set to ‘3’ (meaning ‘Current Date’).

Code snippet


 Issue with re-pricing

The above code should work fine. But, if the re-pricing does not happen with the current date info, instead the re-pricing is being done based on PO creation date, then you need to check the configuration (shown below).

Root Cause
There is a configuration setting which should be changed.

SPRO — Material Management->Purchasing–>Purchase Order–>Define Screen Layout at Document Level–>ME21N–>Quantity and Price–>Field (Pricing date control).

Here we can set, whether the Pricing data control fields can be entered and changed by user or not. The Opt. entry check box should be checked in order for the BAPI to work. Even for manual re-pricing this Opt. entry check box should be checked.

Correct configuration setting


With the above setting, the PO T-code looks like below. Check the Pr.Date Cat and Price Date is available in Condition Control Tab. This is the correct configuration for BAPI to work. Even for manual re-pricing to take place for current date, these two fields should be visible.

Point to Remember
Next time, the Bapi ‘BAPI_PO_CHANGE’, is not re-pricing the PO correctly, in stead of wasting time in debugging, look for the above said configuration and explain the root cause.

If you want to get such practical issues and resolutions straight to your inbox, please SUBSCRIBE. We respect your privacy and take protecting it seriously.

If you liked this post, please hit the share button at the left side of your screen.

Image source : www.hawkeyerecruitment.com


Please enter your comment!
Please enter your name here