Skip to Content
avatar image
Former Member

Partner role delete

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jan 26, 2009 at 11:53 AM

    Hi,

    Try the userexit MV45AFZZ.

    Regards

    Rasheed

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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