Skip to Content
0
Sep 27, 2017 at 05:54 PM

How I find out which field in AUTHORITY-CHECK failed

316 Views

Hello Community,

I have an authority object N_1PDS_DCM with several fields:

        AUTHORITY-CHECK OBJECT 'N_1PDS_DCM'
                 ID 'ACTVT'     FIELD '01'
                 ID 'N_EINRI'   FIELD '0104'
                 ID 'N_2MITARB' FIELD 'MAX'
                 ID 'N_2ORGDO'  FIELD 'CHIR'
                 ID 'N_2KAT'    FIELD 'CATEGORY'
                 ID 'N_2BRGR'   FIELD 'DOCT'.

With the sy-subrc I only get information that the user is not authorized and I can only show a message like "no authority to create anything". But what I need is to get information which field(s) actually fail(s). Because I would like to show the user a more detailed message with information where the lack of authorisation is, i.e. for CHIR (ID N_2ORGDO, organizational unit). Then the user couldchange the organizational unit and proceed forward.

Does anybody know a solution to get the field which failed by an authority-check, in order to create a more detailed message for the user?

Kind regards,
Andreas