2007 May 22 11:58 AM
Hi all,
I have a scenrio where depending upon the logged in user I have to decide whether to display him the parameters screen or not.
That is first I need to check who is looged on and if he's the admin then I should show him the selection screen on the parameters.
Please Guide.
Thank You
2007 May 22 12:04 PM
Hi
You can control display / hiding of screen elements in
AT SELECTION-SCREEN OUTPUT event.
Your code should be something like this:
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SY-UNAME = 'ADMIN'.
IF SCREEN-NAME = 'PARAMETER1'.
SCREEN-ACTIVE = 1.
ENDIF.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Thanks and regards,
S. Chandra Mouli.
Hi
You can control display / hiding of screen elements in
AT SELECTION-SCREEN OUTPUT event.
Your code should be something like this:
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SY-UNAME = 'ADMIN'.
IF SCREEN-NAME = 'PARAMETER1'.
SCREEN-ACTIVE = 1.
ENDIF.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Thanks and regards,
S. Chandra Mouli.
2007 May 22 12:03 PM
u can submit ur program through another program using the addition
<b>VIA SELECTION-SCREEN</b> for Admin and with out the same for other users,
check for the system field <b>sy-uname</b> to find the user name who logged into ur system currenlty.
2007 May 22 12:04 PM
Hi
You can control display / hiding of screen elements in
AT SELECTION-SCREEN OUTPUT event.
Your code should be something like this:
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SY-UNAME = 'ADMIN'.
IF SCREEN-NAME = 'PARAMETER1'.
SCREEN-ACTIVE = 1.
ENDIF.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Thanks and regards,
S. Chandra Mouli.
2007 May 22 12:06 PM
hi,
case sy-uname.
when 'xxxx'
loop at screen.
if screen-name = 'parameter name'.
screen-output = 0.
endif.
endloop.
when 'yyyy'
loop at screen.
if screen-name = 'parameter name'.
screen-input = 1.
endif.
endloop.
when 'others'
.......
......
endcase.
if helpful reward some points.
with regards,
suresh babu.
2007 May 22 12:06 PM
2007 May 22 12:06 PM
Hi,
We can not make use of any IF condition in selection-screen.
For this purpose, we have an event AT SELECTION-SCREEN OUTPUT.
Write the following lines of code.
parameters : p_one type c,
p_two type c.
at selection-screen output.
loop at screen.
if screen-name CP '*P_ONE*'.
if sy-uname = 'NTWDEV'. "<-- Admin user name
screen-active = 1.
else.
screen-active = 0.
endif.
modify screen.
endif.
endloop.Regards
Sailaja.
2007 May 22 12:18 PM
Hi,
You can put the validation in at selection-screen output event. use:
Loop at screen.
if screen-name eq <parameter> and sy-uname ne <admin>.
screen-active = 0.
endif.
modify screen.
endloop.
Thanks
sandeep
Reward if helpful
2007 May 29 12:25 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |