cancel
Showing results for 
Search instead for 
Did you mean: 

Update customer hierarchy in sales documents

0 Kudos

Hello,

Do you know a way to update the customer hierarchy in sales document by program ?

It seems not possible neither with BAPI_SALESORDER_CHANGE, nor with a batch input.

I noted that SAP forbade the modification in customizing, but I guess some of SAP users already had this requirement.

(I saw this thread Customer Hierarchy modifyable | SCN, but it's not answered)

Thanks !

Accepted Solutions (0)

Answers (2)

Answers (2)

VeselinaPeykova
Active Contributor
0 Kudos

Hello, could you please explain why you would need to change the customer hierarchy assignment directly in the sales document? What is the business process?

0 Kudos

Hi,

Customer hierarchy is used by our financial department to monitor the turnover for each customer group.

When a hierarchy is modified (what often occurs due to customer grouping/takeover...etc), we need to update the order book. If not, turnover is counted up on the former hierarchy for a while, as the orders can stay open for a long time (scheduling agreements for instance).

VeselinaPeykova
Active Contributor
0 Kudos

If you do not have any subsequent documents it is possible to re-trigger partner determination by changing the sold-to party and then changing it back.

I do not know how the business would like to report for order, which is partially delivered when the customer was assigned to one node and the rest was delivered when the customer is moved to a different node.

Have you considered to use an alternative criteria for reporting the grouping of customers - such as customer group 1-5? Or some modifiable partner function in the sales document? It is not as flexible as the customer hierarchy, but does not require risky developments to solve the issue.

0 Kudos

Thank you, change the sold-to party is a good idea, although the impacts are quite important (multiple redetermination such as ship-to, route, delivery date...)

VeselinaPeykova
Active Contributor
0 Kudos

Ship-to and route are not a big issue, you can choose not to redetermine the plant shipping point etc. (Suggestion: you can use one sold-to party for technical purposes and set the same partner functions, shipping conditions and so on as the customer you want to 'repair'. After you finish with the repair, you can block it so that nobody can use it for order entry.)

The confirmed quantities and dates can be a problem unfortunately. I guess you can extract the dates for the confirmed quantities and after you change back the sold-to party you can adjust them as they were. I hope you do not have a very big number of documents. This can be a very tedious task.

former_member200027
Active Participant
0 Kudos

Hello Remy Vasseur,

It is standard that customer hierarchy is not changeable in sales order.
Setting the partner as changeable is not possible. This is because of followng coding:


Program MV80P400
...
IF TPAR-HITYP NE SPACE.
  TPAER-PAPFL = SPACE.
  TPAER-AENDB = 'X'.
  TPAER-PARVW_HERK = SPACE.
ENDIF.
...

If the field TPAR-HITYP (Customer hierarchy type) is not blank, the field TPAER-PAPFL (partner is mandatory) is always set to 'space' and therefore you cannot maintain hierarchies manually in the sales order.

If you require this for your business needs, you need to develop your own report or modify standard coding.

Best regards,
Crystal Lin