Application Development and Automation 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: 
Read only

authorization objects for TABSTRIP

Former Member
0 Likes
867

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
674

Just do the authorization check in the PBO module of that particular tab which you want to restrict.

4 REPLIES 4
Read only

Former Member
0 Likes
675

Just do the authorization check in the PBO module of that particular tab which you want to restrict.

Read only

0 Likes
674

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

Read only

0 Likes
674

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.

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
674

Hi

Check the Authorizations in PBO.

Regards,

Sreeram