‎2009 Mar 09 9:42 AM
hello frnds
i have a selection screen on it i have document number. Now the requirement is that besides document number....radiobuttons shuld b added which would b according to USERID, as per the authorisations on his user id user would b able to view the operations he can perform ( each radiobutton denotes a operation of radiobutton).
kindly suggest how to create dynamic radiobutton?
regds
‎2009 Mar 09 9:46 AM
Hi,
when declaring radiobuttons give user-command addition also...
and then in the event at selection-screen output... write the code for authorization check and based on the check make certain fields visible...
Regards,
Siddarth
‎2009 Mar 09 9:46 AM
Hi,
when declaring radiobuttons give user-command addition also...
and then in the event at selection-screen output... write the code for authorization check and based on the check make certain fields visible...
Regards,
Siddarth
‎2009 Mar 09 9:47 AM
Hi,
at selection-screen output.
if w_flag = 1.
loop at screen.
if screen-group1 CS 'RAD' "----------> Radio button group
screen-active = 1.
modify screen.
endif.
endloop.
endif.
at selection-screen.
if userid = sy-uname.
w_flag = 1.
endif.thanks
sarves
‎2009 Mar 09 9:49 AM
Hi friend,
Use LOOP at Screen in At selection-screen output event.
In parameters, mention all possible radio buttons and group them accordingly to users. (i.e) For every user assign an unique radio button group.
Ex:
At selection-screen output.
LOOP AT SCREEN.
IF sy-name = 'SSI5BAN'.
if IF screen-group1 NE 'INV'. <--- 'INV' is specific to user 'SSI1BAN'
and all other radio button groups are disabled
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Hope helps u.
Thanks..
Edited by: Sap Fan on Mar 9, 2009 10:50 AM
‎2009 Mar 09 9:53 AM
do like this...
REPORT yztest.
TABLES: mara.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
PARAMETERS:p_rad1 RADIOBUTTON GROUP aaa,
p_rad2 RADIOBUTTON GROUP aaa.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF sy-uname = 'E0000DZ'.
IF screen-name = 'P_RAD1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
elseif sy-uname = 'E0000O4'.
IF screen-name = 'P_RAD2'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
‎2009 Mar 09 10:08 AM
Hi,
Create all radiobuttons on screen i.e., for all users.
Now based on the username i.e., current user running the application hide the radiobuttons depending on the authorisation.
parameters : p_rb1 radiobutton group gp1 modif id a1,
p_rb2 radiobutton group gp1 modif id a2,
p_rb3 radiobutton group gp1 modif id a3.
AT SELECTION-SCREEN OUTPUT.
IF sy-uname = '<user_name1>'.
LOOP AT SCREEN.
IF screen-group1 = 'A1'.
screen-invisible = 0. "display
screen-active = 1.
ELSEIF screen-group1 = 'A2'.
screen-invisible = 0. "display
screen-active = 1.
ELSEIF screen-group1 = 'A3'.
screen-invisible = 1. "hide
screen-active = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF sy-uname = '<user_name2>'.
LOOP AT SCREEN.
IF screen-group1 = 'A1'.
screen-invisible = 0. "display
screen-active = 1.
ELSEIF screen-group1 = 'A2'.
screen-invisible = 1. "hide
screen-active = 0.
ELSEIF screen-group1 = 'A3'.
screen-invisible = 0. "display
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
Hope this helps you.
Regards,
Tarun