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 OBJECT

Former Member
0 Likes
652

Hi ABAP Guns,

I have requirment, i have 4 radio buttons which leads to enter or retrivew data from the database. My requirment is when i click on one button, it should check for authorization for tht particular table.

Can one give code for this.

Thanks In Advance

Sudhir

5 REPLIES 5
Read only

former_member194669
Active Contributor
0 Likes
606

check the demo program

DEMO_SEL_SCREEN_USER_COMMAND

aRs

Read only

0 Likes
606

Hi,

I need the authorization code for a particular table.

Regards,

sudhir.

Read only

0 Likes
606

Hi

There isn't an authorization object for the tables, so there's any particular authorization code.

If you've one I believe it's a custom one, so u should ask to your basis or u manage the profile which the authorization object is.

Try to run the trx SU21.

Max

Read only

Former Member
0 Likes
606

Hi

PARAMETERS: P1 RADIOBUTTON GROUP R1,
            P2 RADIOBUTTON GROUP R1,
            P3 RADIOBUTTON GROUP R1,
            P4 RADIOBUTTON GROUP R1.

DATA: AUTH_VALUE LIKE TDDAT-CCLASS.

AT SELECTION-SCREEN.

  CASE 'X'.
    WHEN P1. AUTH_VALUE = 'TAB1'.
    WHEN P2. AUTH_VALUE = 'TAB2'.
    WHEN P3. AUTH_VALUE = 'TAB3'.
    WHEN P4. AUTH_VALUE = 'TAB4'.
  ENDCASE.

  AUTHORITY-CHECK OBJECT 'S_TABU_DIS'
      ID 'DICBERCLS' FIELD AUTH_VALUE
      ID 'ACTVT'     FIELD '03'.

  IF SY-SUBRC <> 0.
*---> Error message: no authorization for table....
  ENDIF.

In my sample I used the authorization group usually used for trx SM30, in this way you don't have to create an custom authorization object.

If in the profile user the authorition object S_TABU_DIS has always the value *, I think you need to create a custom one.

Max

Read only

former_member194669
Active Contributor
0 Likes
606

Hi,

Are you looking for check if a user has authorization to maintain/display a particular table?


AUTHORITY-CHECK OBJECT 'S_DEVELOP'
         ID 'DEVCLASS' FIELD '__________'
         ID 'OBJTYPE' FIELD '__________'
         ID 'OBJNAME' FIELD '__________'
         ID 'P_GROUP' FIELD '__________'
         ID 'ACTVT' FIELD '__________'.

aRs