Skip to Content

Changing the sales document sales area, pricing procedure and sold to party by using bapi

Dec 28, 2017 at 11:24 AM


avatar image

Hi all

I have a requirement, where we want to change the sales area,pricing procedure,sold to party,payer, bill to party, ship to party.

I wrote a program by using BAPI_SALESORDER_GETDETAILSBOS and BAPI_SALESORDER_CHANGE. I am able to change sales area,payer,bill to party,ship to party.

But i am not able to change pricing procedure 'VBAK-KALSM' , infact i am not getting any field in bapi structure to pass pricing procedure and also am not able to change sold to party.when i am passing sold to party in partners its giving message like 'You can not change the entry in partner function AG'.

Please suggest a solution.


Naresh U

10 |10000 characters needed characters left characters exceeded

If you can't make the change manually by changing a sales order, you can't do it via a program. The sold-to party can't be changed on a sales order.


Thank you for your response Michelle. Sales area also we can not change by manually, but I am able to change it by BAPI then why can't change sold to party.


Michelle is correct, can't change Sold-to, as the message states.

As a solution I'd suggest sending this "requirement" to a _qualified_ SD specialist. This is not an ABAP issue, this is a bad business process.


In a standard system the rules whether sold-to party can be changed in a sales order are defined in mv45affe_feldauswahl_status.

To me it makes sense that pricing procedure is not meant to be changed directly via a bapi, because pricing procedure is determined indirectly via customizing (although it may be possible to redetermine pricing procedure via other means).

Based on your explanation, what the business asks does not sound logical - pricing and document treatment depend a lot on the pricing procedure and the partners used. What is the point in creating an order if you are going to change all partners and pricing in a subsequent step? If you cannot tell when you create an order what the customer is supposed to pay, if you do not know if the customer is trustworthy and if you have no information where the customer is located you cannot determine when you should deliver and if you should fulfill the order at all I really cannot see how such document adds value to the business process. Adding to this also a change of the sales area makes me think that probably the whole idea - creating an order, then performing such drastic changes is not very well thought out and that there might be better ways to approach the problem.

I would strongly advise that the business case is discussed with a solution architect and a knowledgeable business process expert.

* Please Login or Register to Answer, Follow or Comment.

0 Answers