‎2007 Apr 23 6:03 PM
Hi guys,
I created a z program with 8 tabs and i need to restrict some of them for an especific users.
So i created a authorization object (Z_HRCA) my problem is that i dont know how to restrict the tab with my A. Object.
any ideas?
tks in advance
‎2007 Apr 23 6:31 PM
Just do the authorization check in the PBO module of that particular tab which you want to restrict.
‎2007 Apr 23 6:31 PM
Just do the authorization check in the PBO module of that particular tab which you want to restrict.
‎2007 Apr 25 3:22 PM
Actually im doing that, but my problem is how to relate my authorization object with the tab, right now i defined a form that check the authority for the user, but the FM always return me "Not allowed"
here is the code
FORM CHECK_AUT.
data:
USER LIKE USR02-BNAME,
L_OBJECT LIKE UST12-OBJCT,
L_FIELD1 LIKE UST12-FIELD,
L_VALUE1 LIKE UST12-VON.
l_object = 'Z_HRCA'.
CALL FUNCTION 'AUTHORITY_CHECK'
EXPORTING
user = sy-uname
object = l_object
field1 = l_field1
value1 = l_value1
*field2 = l_field2
*value2 = l_value2
EXCEPTIONS
user_dont_exist = 1
user_is_authorized = 2
user_not_authorized = 3
user_is_locked = 4
OTHERS = 5.
IF sy-subrc <> 2.
MESSAGE i888(sabapdocu) WITH 'Falta autorización'.
FICHA1-ACTIVETAB = 'FICHA1_FC6'.
G_FICHA1-SUBSCREEN = '0007'.
ENDIF.
the object is in my user, but i dont know which parameters use in
field1 = l_field1
value1 = l_value1.
Message was edited by:
javier santana
‎2007 Apr 30 3:46 PM
How is authorization object defined? It should have some field that will take a value for identifying the tab. You can add ACTION field to the authorization object, set value 1 for tab 1, value 2 for tab 2 etc and in each tab PBO, check for authorization where field = ACTION and value = 1 or 2 or 3 based on which tab the user is on.
‎2007 Apr 30 3:49 PM