‎2006 Sep 08 3:59 PM
Is there a simple way to not allow a user to change a parameter on the selection screen. I have the p_company parameter that is populated in the Intialization event.
I don't want the users to change this but to be able to see it.
Thanks
Richard
‎2006 Sep 08 4:01 PM
Hello Richard,
Use this code.
<b>INITIALIZATION.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_SPART'.
SCREEN-INPUT = '0'.
SCREEN-OUTPUT = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.</b>
If useful reward.
Vasanth
‎2006 Sep 08 4:01 PM
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_COMPANY'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
‎2006 Sep 08 4:01 PM
Hello Richard,
Use this code.
<b>INITIALIZATION.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_SPART'.
SCREEN-INPUT = '0'.
SCREEN-OUTPUT = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.</b>
If useful reward.
Vasanth
‎2006 Sep 08 4:17 PM
Richard, I don't see how Vasanth's answer solved your problem. As he has suggested to put the LOOP at SCREEN in the INITIALIZATION event. The problem with this is that it will work the first time the screen is rendered, but if you press enter on the screen, you will notice that the field will become ready for input again. This LOOP at SCREEN should be done in the AT SELECTION-SCREEN OUTPUT event as many have suggested here.
Regards,
Rich Heilman
‎2006 Sep 11 2:47 PM
Rich,
Thanks for the heads up. I just jumped to the conclusion It was working.
Richard
‎2006 Sep 08 4:02 PM
Hello,
Use the event AT-SELECTION SCREEN OUTPUT.
Inside this event,
LOOP AT SCREEN.
if screen-name EQ P_COMPANY.
screen-input = 0.
endif.
MODIFY SCREEN.
ENDLOOP.
Regs,
Venkat Ramanan N
‎2006 Sep 08 4:02 PM
hi,
data: p_matnr like mara-matnr.
initialization.
p_matnr = 'M-01'.
at selection-screen output.
loop at screen.
if screen-name = 'P_MATNR'.
screen-input = 0.
modify screen.
endif.
endloop.Regards,
Sailaja.
‎2006 Sep 08 4:02 PM
Hi richard,
1. we cannot do it directly.
2. we have to use
a) MODIF ID
b) at selection-screen output event
c) SCREEN table.
3. just copy paste
4.
report abc.
parameters : a(10) type c MODIF ID ABC.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
regards,
amit m.
‎2006 Sep 08 4:03 PM
‎2006 Sep 08 4:03 PM
Hi
you can say...
AT SELECTION-SCREEN OUTPUT.
loop at screen.
if SCREEN-NAME = 'Parameter name'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
endif.
endloop.
Regards,
Raj
‎2006 Sep 08 4:09 PM
Hi,
at selection-screen output
loop at screen.
if screen-name = 'P_COMAPNY'.
screen-input = 0.
modify screen.
endif.
endloop.
Regards
Amole
‎2006 Sep 08 4:14 PM
Vasanth
That worked perfect.
I'll reward as many points as possible.
Thanks for all the responses.
‎2006 Sep 08 4:18 PM
If you put it in the INITIALIZATION block and the user presses enter, it will be opened up for input again. That's why it should go in AT SELECTION-SCREEN OUTPUT.