Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Authority check using object 'P_ORGINCON'

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor

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

1 REPLY 1

raymond_giuseppi
Active Contributor

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