‎2007 May 31 8:00 PM
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
‎2007 May 31 8:07 PM
‎2007 May 31 8:10 PM
Hi,
I need the authorization code for a particular table.
Regards,
sudhir.
‎2007 May 31 8:17 PM
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
‎2007 May 31 8:09 PM
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
‎2007 May 31 8:15 PM
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