Skip to Content
0
Nov 24, 2016 at 05:43 PM

Authority check using object 'P_ORGINCON'

421 Views Last edit Nov 24, 2016 at 05:45 PM 3 rev

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