Skip to Content
0

Authority check using object 'P_ORGINCON'

Nov 24, 2016 at 05:43 PM

116

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Raymond Giuseppi
Nov 25, 2016 at 07:04 AM
1

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

Share
10 |10000 characters needed characters left characters exceeded