2008 Jul 08 7:54 AM
Hi all,
In my report program by selecting a radio button and execute it,
it will take to TMG of a table.
Now what i want is, this radio button should be visible only to some set of users and for all others it should not be visible.
(or)
Only for those set of users it should take to the TMG and for others it should display the message as 'You are not authorized to view the table' or they can allowed in only display mode.
Pls provide any suggestion on this.
2008 Jul 08 8:01 AM
Hi,
this is pretty simple,
see first u need an authorization object which can be attached into a user profile who has to be given access to this radio button.
If you dont have and existing one use SU21 to create a new one.
then in the
AT SELECTION-SCREEN OUTPUT.
AUTHORITY-CHECK OBJECT 'OBJECT_NAME'
ID 'AUTHORIZATION_FIELD_NAME' FIELD 'value_which_is_required_for_authorization'.
if sy-subrc ne 0. "This means hide the readio button.
loop at screen.
if screen-name = 'FIELD_NAME'.
screen-input = 0.
screen-visible = 0.
modify screen.
endif.
endloop.
endif.
reward points if this helps
Hi all,
In my report program by selecting a radio button and execute it,
it will take to TMG of a table.
Now what i want is, this radio button should be visible only to some set of users and for all others it should not be visible.
(or)
Only for those set of users it should take to the TMG and for others it should display the message as 'You are not authorized to view the table' or they can allowed in only display mode.
Pls provide any suggestion on this.
2008 Jul 08 7:58 AM
hi,
use som logic like this at the position u want to display it.
if sy-uname <> 'abc'.
message 'You are not authorized to view the table' type 'E'.
endif.
2008 Jul 08 7:59 AM
HI
store all teh entries in a internal to whom you wanto provide authorization and then check each time whena value is entered .
hope it gave u an Idea
Regards
Pavan
2008 Jul 08 8:01 AM
Hi,
this is pretty simple,
see first u need an authorization object which can be attached into a user profile who has to be given access to this radio button.
If you dont have and existing one use SU21 to create a new one.
then in the
AT SELECTION-SCREEN OUTPUT.
AUTHORITY-CHECK OBJECT 'OBJECT_NAME'
ID 'AUTHORIZATION_FIELD_NAME' FIELD 'value_which_is_required_for_authorization'.
if sy-subrc ne 0. "This means hide the readio button.
loop at screen.
if screen-name = 'FIELD_NAME'.
screen-input = 0.
screen-visible = 0.
modify screen.
endif.
endloop.
endif.
reward points if this helps
2008 Jul 08 8:09 AM
In the TMG, environment->modifications->events
U can put ur code there for restricting anything..
2008 Jul 08 8:12 AM
Hi,
try this short example:
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 06(30) T_BUT1.
PARAMETERS: P_BUT1 RADIOBUTTON GROUP PRI1.
SELECTION-SCREEN: END OF LINE.
*
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 06(30) T_BUT2.
PARAMETERS: P_BUT2 RADIOBUTTON GROUP PRI1.
SELECTION-SCREEN: END OF LINE.
*
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 06(30) T_BUT3.
PARAMETERS: P_BUT3 RADIOBUTTON GROUP PRI1 MODIF ID DS0.
SELECTION-SCREEN: END OF LINE.
*
************************************************************************
AT SELECTION-SCREEN OUTPUT.
*
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'DS0'.
IF P_BUT3 = ' ' AND SY-UNAME <> 'TEST01'.
SCREEN-INPUT = '0'.
SCREEN-INVISIBLE = '1'.
T_BUT3 = SPACE.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
*
************************************************************************
INITIALIZATION.
*
T_BUT1 = '1. Button'.
T_BUT2 = '2. Button'.
T_BUT3 = '3. Button'.
*
************************************************************************
START-OF-SELECTION.
*
BREAK-POINT.
*
END-OF-SELECTION.
Hope it helps.
regards, Dieter
2008 Jul 08 8:13 AM
Hi
Go through the link Given Below :
http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbaccb35c111d1829f0000e829fbfe/content.htm
Hope it will helpful to you.
Rewards Points if useful.
Thanks & regards
Nikunj shah
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |