04-24-2007 7:11 AM
Hello,
I have a program with a parameter declared as no-display. I would like that, only for a specific user, the parameter to be visible. How can I do that?
I tried in this way:
SELECTION-SCREEN BEGIN OF BLOCK b1.
if lconfig_flag = 'X'.
PARAMETERS: p1 TYPE I .
else.
PARAMETERS: p1 TYPE I
NO-DISPLAY.
endif.
SELECTION-SCREEN END OF BLOCK b1.
But I have an error because I am declaring the parameter twice.
How can I do it?
04-24-2007 7:15 AM
Hi,
U can do like this:
PARAMETERS : P1 type I.
AT SELECTION-SCREEN-OUTPUT.
IF SY-UNAME = 'User Name'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P1'.
SCREEN-INVISIBLE = 0.
SCREEN-INPUT = 1.
SCREEN-OUTPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P1'.
SCREEN-INVISIBLE = 1.
SCREEN-INPUT = 0.
SCREEN-OUTPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Himanshu
04-24-2007 7:19 AM
Hi....
Try this...
PARAMETERS: P1 TYPE I,
P2 TYPE I.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SY-UNAME EQ 'USER1'.
IF SCREEN-NAME EQ 'P1'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Here the parameter P1 will not be visible for the user 'USER1'.
Regards,
Suresh.........
04-24-2007 7:34 AM
It works, but P1 parameter is the only parameter on the selection screen, so I don't want to display the selection screen at all. With your solution the p1 parameter appears as read-only. How can I do that?
Thank you