cancel
Showing results for 
Search instead for 
Did you mean: 

Partner role delete

Former Member
0 Kudos

Hi guy,

I have the need that a partner role is not allowed in a special sales order.

My first idea was to solve it with a partner schema.

But that is not possible, 'cause of the following problem;

If the sales order type XX, was created without a reference, the partner role is allowed.

If the sales order type XX, was created with a reference to a sales order type XY it is also allowed.

But it is not allowed, if the sales order type XX was created with a reference to a sales order type YY oder with a reference to sales order type XY, which was created with reference to type YY.

=>As the role is allowed generally, but not if there is any reference to a special type, the schema don't work.

So I would like to delete the partnerrole in a USEREXIT and send a mail or message to the user.

Does someone know a suitable exit or badi ?

Greatings Manuel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try the userexit MV45AFZZ.

Regards

Rasheed

Former Member
0 Kudos

Hi Rasheed,

I tried USEREXIT_SAVE_DOCUMENT_PREPARE in MV45AFZZ (because the MOVE_FIELD_TO_VBAK AND MOVE_FIELD_TO_VBAP isn't processed after a change of partners).

My coding:

...(check if partnerrole is forbidden)

delete xvbpa with where parvw = 'ZZ'.

...

When I debug the behaviour it is deleting the entry in xvbpa, but after saving the partnerrole does still exist.

Where is my failure ??

Greatings

Manuel

Answers (0)