2008 Apr 02 10:26 AM
how to disable some parameters in the selection screen if one condition is satisfied asnd to to enable them if other condition is satisfied.
how to disable some parameters in the selection screen if one condition is satisfied asnd to to enable them if other condition is satisfied.
2008 Apr 02 10:28 AM
Hi,
Do like this
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_pres RADIOBUTTON GROUP g1 "Radio button for presentation server
USER-COMMAND radio DEFAULT 'X',
p_appl RADIOBUTTON GROUP g1, "Radio button for application server
p_ptest TYPE c AS CHECKBOX.
SELECTION-SCREEN : END OF BLOCK b1.
SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS : p_pifile TYPE rlgrap-filename MODIF ID md1, "Input filename for presentation server
p_pefile TYPE rlgrap-filename MODIF ID md2. "Error filename for presentation server
SELECTION-SCREEN : END OF BLOCK b2.
SELECTION-SCREEN : BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS : p_aifile TYPE ibipparms-path MODIF ID md3, "Input filename for application server
p_aefile TYPE ibipparms-path MODIF ID md4. "Error filename for application server
SELECTION-SCREEN : END OF BLOCK b3.
FORM sub_check_server .
IF p_pres EQ c_x.
LOOP AT SCREEN.
IF screen-group1 EQ 'MD3'.
screen-input = c_ok.
screen-active = c_1.
ENDIF.
IF screen-group1 EQ 'MD4'.
screen-input = c_ok.
screen-active = c_1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF p_appl EQ c_x.
LOOP AT SCREEN.
IF screen-group1 EQ 'MD1'.
screen-input = c_ok.
screen-active = c_1.
ENDIF.
IF screen-group1 EQ 'MD2'.
screen-input = c_ok.
screen-active = c_1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
Regards,
Prashant
2008 Apr 02 10:35 AM
The coding is done normally in AT selection-screen Output event.
You are required to loop at SCREEN table.
Screen-name will be same as that of your selection screen parameter.
enabling and disabling screen by using screen-input = 0 & 1.
At the ned don't forget to use MODIFY SCREEN statement.
AT SELECTION-SCREN OUTPUT.
loop at screen.
if screen-name = 'RB1'.
screen-input = 0.
else.
screen-input = 1.
endif.
modify screen.
endloop.
2008 Apr 02 10:41 AM
HI
u can use
IF screen-group1 = 'B1'.
screen-input = '0'.
else .
screen-input = '1'.
endif.
for one condition the screen wil be active and for the other condition it wil be inactive.
2008 Apr 02 10:43 AM
Hi
go through this.in this if u select pdhplant then all the 4 in the another selection screen are disable and if u select ppplant then those are enable.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : pdhplant RADIOBUTTON GROUP rb1 USER-COMMAND rad1 DEFAULT 'X',
ppplant RADIOBUTTON GROUP rb1 ." OTHERS
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS : offspec RADIOBUTTON GROUP rb2 MODIF ID oth ,
linespec RADIOBUTTON GROUP rb2 MODIF ID oth,
line1 RADIOBUTTON GROUP rb2 MODIF ID oth,
line2 RADIOBUTTON GROUP rb2 DEFAULT 'X' MODIF ID oth.
SELECTION-SCREEN END OF BLOCK b2.
*----
*AT SELECTION-SCREEN OUTPUT
*----
AT SELECTION-SCREEN OUTPUT.
IF pdhplant EQ 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'OTH'.
screen-input = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |