cancel
Showing results for 
Search instead for 
Did you mean: 

Partner determination when ship to party is changed

Former Member
0 Kudos

Hello All,

Requirement is partner determination should be triggered if ship to party is changed during order creation in VA01 ( different carrier partner for different ship tos and change from one ship to to another should redermine the partner).

Have two questions

1. Enhancement spot / exit ( EXIT_SAPMV45A_003 and ZXVVAU05 / or / EXIT_SAVE_DOCUMENT_PREPARE in MV45AFZZ)

2. The order is in creation VA01. User enter one ship to party and then material. Partner determination happend. At the last moment before save user changes the ship to party. How to capture the ship to party change event?

Thanks in advance.

Abhijit

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello T.W. and All,

Thanks for the posts.

The user wanted to see the new carrier determined before saving the document. So SAVE_DOCUMENT_PREPARE was ruled out.

We used USEREXIT_MOVE_FIELD_TO_VBAK in MV45AFZZ for capture the ship to party field change. Picked up carrier from partner table and updated the partner structure so the changed carrier is populated on enter before save.

former_member211108
Contributor
0 Kudos

Hello Abhijit,

From your post the requirement is not clear. Need to understand whether you wan to re-determine the partners at item level only or at header level.

If it is for header level then you can configure your system in SAP std without going for any enhancement. In Partner determination procedure configuration for sales order header, there are the fields: source or origin (not sure as not in front of the SAP system). By using these you can control the behaviour of partner determination.

Hope this will help you.

Thanks and Regards,

Atulkumar Dagade

former_member182378
Active Contributor
0 Kudos

Atul,

In your post, the comment about whether the requirement is for header level or for item level, in the sales order; is interesting!

I have checked only for header level, in the sales order.

When the ship to party customer is given in the sales order, the respective carrier is picked up and populated in the sales order.

But when the user changes the ship to party, then the respective carrier is not (changed) and populated, in the sales order.

In order for the system to pick up the respective Carrier partner, for the SH in the sales order, when the SH is changed in the sales order is the issue or business requirement.

Your point about the Source functionality is already incorporated. The carrier is coming from the SH customer because the source field in the partner procedure (which is assigned to the sales document type) has SH (not blank or not any other value).

former_member211108
Contributor
0 Kudos

Hello T. W.,

Thanks for your post. I misunderstood the requirement.

As per SAP std  partner determination will not be re triggered after you change the partners manually (except sold to party). Hence to achieve the  required functionality custom code will require in exit.

Thanks and Regards,

Atulkumar Dagade

Former Member
0 Kudos

Dear Abhijit,

Best option is to use FORM USEREXIT_SAVE_DOCUMENT_PREPARE in program MV45AFZZ. Do create a logic with the help of your ABAPER in order to redetermine the carrier partner if SH will be changed in the order and you'll be able to achieve the same. Thanks and have a good day.

former_member182378
Active Contributor
0 Kudos

Abhijit,

1. You can use this program and the userexit. Added: Program MV45AFZZ and USEREXIT_SAVE_DOCUMENT_PREPARE (I have added the program and userexit to make it very clear. In the previous version of my post, I meant the same program and userexit.)

As in the description, this userexit is used to do some checked and changes before document is saved.

2. Changes are registered in the change tables CDHDR and CDPOS.

Note: the changes done during the creation of the sales order, in other words in transaction code VA01 would not be registered in the change tables.

As VA01 is not change, it is creation.

What and why do you want to register? (as user is working with transaction code VA01)

Coming back to point 1, the logic set in the (above mentioned) userexit would "find" the "correct courier partner". So why and what changes do you want to check?

Message was edited by: T W - Added in blue color font