Skip to Content

Authority check using object 'P_ORGINCON'

Hi all,

I am using 'P_ORGINCON' for an authority check for User's Personnel area (PA0001-WERKS). The code is as follows. But it returns SY-SUBRC = 0 for all cases. Even if we give invalid PA, it returns success. Is my code ok? Or we need to pass any other parameters?

AUTHORITY-CHECK OBJECT 'P_ORGINCON'
ID 'INFTY' DUMMY
ID 'SUBTY' DUMMY
ID 'AUTHC' FIELD 'R'
ID 'PERSA' FIELD lx_p0001-werks
ID 'PERSG' DUMMY
ID 'PERSK' DUMMY
ID 'VDSK1' DUMMY
ID 'PROFL' DUMMY.

IF sy-subrc EQ 0.

ENDIF.

Please help.

Thanks,

Johann

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 25, 2016 at 07:04 AM

    There are many DUMMY values in this check, nevertheless, you should execute SU53, SU56 or a trace ST01 on authorization check to find which authorization was allowing the success. Maybe you have a generic authorization value '*' in some role/profile?

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded