11-24-2016 5:43 PM
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
11-25-2016 7: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
11-25-2016 7: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