Skip to Content

How to get ACTVT value for authority-check

I would like to do an AUTHORITY-CHECK in a user exit which can be called during processing from either standard or custom transactions. How can I determine the current activity so that I can pass the correct value in ACTVT in the AUTHORITY-CHECK call?

Thanks,

.. Craig

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jun 28, 2010 at 02:55 PM

    Hi,

    The value of the field depends on the type activity that is performed on UI e.g., for create its 01, edit 02 and display 03 and so on. You can find more details of this inside the PFCG transaction when you open the auth-object.

    Basically the authority-check statement will depend on your business process i.e., what access you want to give your user and you'd have to determine the subsequent processing of the program in case the check passes or fails.

    Let me know if you need more help.

    Regards

    Prasenjit

    Add comment
    10|10000 characters needed characters exceeded

    • Brad:

      Table T180 looks like a good starting point. (Table T160 gives the same info but only for Purchasing transactions). I can translate the Transaction Type field in the table to an Activity and then base my check on that activity. These tables aren't a perfect solution because the table doesn't include all standard SAP transactions (eg. PK13/PK13N - Kanban Board transactions which trigger order creation) so I guess I'll have to use the table data when the transaction is present otherwise use the other methods.

      Thanks for all your help.

      .. Craig

  • avatar image
    Former Member
    Jun 25, 2010 at 04:47 PM

    Display your object in SU21...look at the authorization fields. You may see an permitted activities push button at the bottom of the screen....look there also. You may to discuss with your security person, in some cases, to be sure you've got the right check... I sometimes have my security person turn me "on" and "off" to be sure my check works.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 25, 2010 at 05:58 PM

    I'm sorry, BreakPoint, but you misunderstand my question. The user exit is triggered during Purchase Order processing from a number of programs (and transactions). For example, it may be triggered from transactions ME21 or ME21N or ME22 or ME22N, etc. At that point, we are not necessarily still in the originating program (eg. SAPMM06E for ME21) so I have look at the value SAPMM06E-ACTVT to find out what activity the user is attempting and pass this value in the AUTHORITY-CHECK call. I can hard code specific transaction/program values if I need to do so, but it would be more flexible if I didn't need to. Also, I have the calling transaction in SY-TCODE, but SYST doesn't always seem to have the program name that I need to find the right ACTVT value.

    .. Craig

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I'd export some values (like sy-tcode, etc.) to a memory id, then import where I needed to know what was being executed.

  • Jun 28, 2010 at 04:36 PM

    Which user exit is it? Is there maybe any value being passed from the caller that could be translated into an ACTVT value?

    Thomas

    Add comment
    10|10000 characters needed characters exceeded