cancel
Showing results for 
Search instead for 
Did you mean: 

partner validation in sales order header

Former Member
0 Kudos

Respected All

my client requirement is to restrict user to put agent on sales order header

scenario is like

we have an customer partner function like

SP--            100001

SH--           100001

BP--            100001

PY--            100001

VN( agent )--200001

VN( agent )--800001

and at sales order header these are coming by default but problem starts from here means user can change agent here and put any agent available in system,

so we want to restrict user to put only that agent which is available in partner function tab of XD03,means either they can use 200001 or 800001 in above example

here i am attaching two screenshot for your reference

Thanks

Abhi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

in program MV45AFZZ add some logic in user exits USEREXIT_SAVE_DOCUMENT_PREPARE or USEREXIT_MOVE_FIELD_TO_VBAK.

Regards,

JM

Former Member
0 Kudos

Hi

1. Create a new customer in XD01 for Partner Function VN for 200001 or 800001

2. Assign them to customers or change existing in XD02

Regards,

Umer

Former Member
0 Kudos

Hi joan

thanks for your reply i am working on it

will update after completion

Regards

Abhi

Answers (2)

Answers (2)

former_member183879
Active Contributor
0 Kudos

Hi,

In the partner determination procedure of the document (VOPA)

For partner function VN

The source field should have the value as C meaning that it should always be proposed from customer master

The sequence field should have the number immediately after the number for the sold to party partner function. This means that once the SP is decided, VN is decided from SP.

You can make the partner as Non Changeable. This anyway will propose you to select the correct VN in case there are multiple VNs in customer master.

I hope this will help. Test and update

former_member182378
Active Contributor
0 Kudos

Navaneetha,

Probably you are mixing fields Source and Origin; in partner procedure configuration.

As this requirement is to pick up agent from SP customer, both Source and Origin can be kept as blank. System picks up partner numbers (agent etc.) from SP as default.

TW

former_member182378
Active Contributor
0 Kudos

Abhi,

As Naveneetha mentioned, you can test after activating field "Not Modifiable" for partner VN, in the partner determination procedure (assigned at sales order header)

TW

moazzam_ali
Active Contributor
0 Kudos

Hi

Its better to create an authorization using this partner field and add authority-check logic in userexits mentioned by joan.

Thank$

former_member182378
Active Contributor
0 Kudos

Moazzam,

How would authorization help in this requirement?

The requirement is that any user should be able to change the agent to something that mentioned in the customer master.

TW

moazzam_ali
Active Contributor
0 Kudos

Hi TW

My bad. You are right. I have read requirement once again and came to know that OP wants to restrict as per customer master data. This could be done without using authorization object by just putting validation check in userexits. Thank you for the correction TW Typewriter.

Thank$