02-08-2008 12:54 PM
Hello, here is the definition of my selection screen.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_typcmd FOR EKKO-BSART DEFAULT text-003, "Type de commande
s_grpe FOR EKPO-MATKL ,
s_ebeln FOR EKPO-EBELN. "Numéro de commande
SELECTION-SCREEN END OF BLOCK b1.
I want to set s_grpe to inactive.thx
02-08-2008 12:56 PM
Static
Add the NO-DISPLAY option.
PARAMETERS: pxxxx TYPE xxxx NO-DISPLAY.
The parameter will only be reachable by SUBMIT WITH.
Dynamically
assign a MODIF ID xxx to the parameter, and in PBO (AT SELECTION-SCREEN OUTPUT) do a
PARAMETER param TYPE xxxx MODIF ID XXX.
(...)
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'XXX'..
IF <test>.
screen-active = '0'.
ELSE.
screen-active = '1'.
ENDIF.
So you can choice when to display or not the parameter.
Regards
02-08-2008 12:58 PM
use the code:
At selection-screeen output.
loop at screen.
IF screen-name = 'S_GRPE''.
screen-active = '0'.
ENDIF.
Modify screen.
endloop.
02-08-2008 12:58 PM
Hi,
You want to inactive one of your screen fields, but you are not giving the condition, on which condition you want to deactivate this field..
Rgds,
Bujji
02-08-2008 12:58 PM
no, i want it to display and there are values in it but the user should not be able to change it.I mean the field must be greyed out.
EDIT: It should always stay inactive.The purpose is to show the user the default values.
Edited by: Sooness Munogee on Feb 8, 2008 2:01 PM
02-08-2008 1:03 PM
declare s_grpe as ..
SELECT-OPTIONS: s_grpe FOR EKPO-MATKL MODIF ID dat.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'S_GRPE'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
02-08-2008 1:08 PM
Use the dynamic way, and replace the
screen-active = '0'. " respectively '1'
With
screen-input = '0'. " respectively '1'
Regards
02-08-2008 1:10 PM
02-08-2008 1:19 PM
change the name in group1 as
LOOP AT SCREEN.
IF screen-group1 = 'DAT'. <----
change this
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
02-08-2008 1:21 PM
02-08-2008 1:24 PM
02-08-2008 1:56 PM
If you are working in module pool program then select the field in the layout and add group(ABC) for that field in selection screen attributes tab and place the below code in PBO.
loop at screen.
if screen-group1 = 'ABC'.
screen-active = '0'.
modify screen.
endif.
02-08-2008 1:02 PM
Hi,
At selection-screeen output.
LOOP AT screen.
IF screen-name = 'S_GRPE''.
screen-active = 0.
ENDIF.
ENDLOOP.
Rgds,
Bujji
02-08-2008 1:15 PM
Hi,
try out this.
SELECT-OPTIONS: s_grpe FOR EKPO-MATKL MODIF ID ABC.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'ABC'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Reward points if useful.
Cheers,
Sowmya