Skip to Content
avatar image
Former Member

AUTHORITY-CHECK for advertising material flag in change contact VAP2

I can't seem to find any specific instructions on implemention the AUTHORITY-CHECK function.

I have to add additional authorization to transaction vap2, program SAPMF02D - change contact person for customer.

The requirement is to check whether user has authority to change "Advertising Material" flag. I have created an authorization object in SAP FI authorization class

ZF_KNA1_AM with the following authorization fields:

ACTVT (possible activities are 01, 02, 03)

ZNMAIL (advertising material)

I guess the next step is actually inserting the authority check method into the program?

Where exactly do I insert the method to?

Could someone provide some instructions on this?

Thanks,

Sergiy

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 02, 2008 at 05:00 PM

    What you need to do is look for a user-exit or enhancement point (an appropriate correct one, if available) and then add your logic (authority-check) there.

    For information on the AUTHORITY-CHECK statement, just place your cursor on the statement in the editor and hit F1 on the keyboard (same as transaction ABAPDOCU for the ABAP keyword documentation).

    Note that as you are wanting to control the change of an existing contact, your object would perhaps require some value field of the record selected to be checked against a field value of the authorization object. Don't hardcode it!

    If you have not done this before, then it is advisable to get some help from an ABAPer who has, as it can be tricky...

    Cheers,

    Julius

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Glad to hear that. It looks like you did the right thing to let the standard system modify the standard screen depending on authority for a standard object. That way you will also have far fewer hassles at SP and release upgrades.

      >Perhaps the best first resort is to talk to a functional consultant together with someone who is familiar with your authorization concept to find out whether there is an option there without changing or adding code to complicate matters.

      In hindsight, it is a bit of an "Ahhh, yes!" moment reading that protecting field groups solved the problem... 😊