To define row-level security using a custom security exit

  1. Execute transaction /CRYSTAL/RLS.
  2. In the Table name field, type the name of the data table whose rows you want to secure.

    For this example, type PA0000 to secure the rows in that table.

  3. Click Create.

    The Authorization entries screen appears.

    This screen lists the authorization entries (if any) that are currently applied to the table.

  4. Click Custom exit.

    The Edit custom function security exit mappings window appears.

  5. In the Function name field, type the name of the function that you want to use to secure the table, and then click Transfer.

    For this example, type HR_CHECK_AUTHORITY_INFTY.

  6. For each necessary parameter, specify a value or field to map to that parameter.

    In this example make the entries listed in the table below:

    Imported parameter name

    Field name

    INFTY

    '0000'

    PERNR

    =PERNR

    SUBTY

    =SUBTY

  7. Click Save.

    You are returned to the Authorization entries screen, which now indicates that there is an active custom security exit for this table.

    When a user attempts to access a table secured by a custom security exit, the driver checks the appropriate field(s) in the table. The field values you mapped are passed as parameters to the function you selected, in this example HR_CHECK_AUTHORITY_INFTY. When authorization restrictions are combined with the values you mapped, the authorization restrictions filters the results first, and then the mapped values further filter the results.