Custom Auth Objects

Often a security administrator comes across requirements where the existing authorization objects delivered by SAP is not enough. Mostly these come during custom developments through completely new programs or enhancements to existing SAP programs. In such situations, SAP provides us with the option of defining completely new authorization objects. The names of these customer specific objects should begin with Y or Z and can be created through the SU21 transaction. If required we can define new authorization fields as well through the transaction SU20.

In the example below, we are set to create a new authorization field and use it in a new authorization object. First we go into Su20 and select the create option from the toolbar. We create a new field “ZBOOLEAN” which takes two possible values ‘X’ and ‘ ‘. The possible values for a field are controlled by the definition of the data element specified in the ABAP dictionary, in this case which is BOOLE_D. We might create our own data elements as well through SE11 transaction. On saving the new field we are prompted for a package for our new development. Packages are dictionary objects to group similar objects for transporting across development, quality assurance and production systems. We if do not plan to transport the new field we can select the local object (package $TMP) from the options.

SU20 - Create Field - Initial Screen
SU20 - Create Field - Initial Screen
SU20 - Define Authorization Field
SU20 - Define Authorization Field

Once the authorization field is created, its time to include it in a custom authorization object through Su21. We select the authorization class of the object and select the crate option. (Su21 also allows us to create our own authorization classes. Its a good practice to create at least one Z or Y authorization class to include our custom authorization objects).

SU21 - Create Auth Objects - Initial Screen
SU21 - Create Auth Objects - Initial Screen

We define the authorization field(s) for the new authorization object. Like the SAP delivered objects we are limited to a maximum of ten fields for custom objects as well. We should create some object documentation as well for future reference. On saving the new object we are again prompted for a package and we have the option of specifying a particular package or creating the new development as a local object. Typically at this point, the security administrator will contact the ABAP programmer to include a check for the new object in his code.

SU21 - Create Object
SU21 - Create Object

3 thoughts on “Custom Auth Objects

  • September 30, 2014 at 2:40 am
    Permalink

    HI ANINDA
    WHAT IS THE DIFF B/W SU03 AND SU21?

    Reply
    • October 29, 2014 at 4:58 pm
      Permalink

      SU03 is meant for updating authorizations while SU21 is mean to update authrozation objects. Ideally you shouldn’t have to modify authorizations at all.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *