2007 Jul 25 10:13 AM
Hi Gurus,
In selection screen (1000) I have 2 fields9(field1 and field2) and a checkbox. The requirment is,
when I execute the program, if the checkbox is not checked then the field2 should
be inactive for user to enter the value, but If i check the checkbox it should
be enabled for input, I have tried with at selection screen output, but is not working properly. Could anyone suggest how to do it.
Regards,
John
2007 Jul 25 10:16 AM
at selection-screen.
If rad1 = 'X'.
loop at screen.
case screen-name.
when 'FIELD2'.
screen-active = 0.
modify screen.
endcase.
endloop.
at selection-screen.
If rad1 = 'X'.
loop at screen.
case screen-name.
when 'FIELD2'.
screen-active = 0.
modify screen.
endcase.
endloop.
2007 Jul 25 10:16 AM
at selection-screen.
If rad1 = 'X'.
loop at screen.
case screen-name.
when 'FIELD2'.
screen-active = 0.
modify screen.
endcase.
endloop.
2007 Jul 25 10:17 AM
Hi,
Make sure you have given function code for the check box.Then only all the events(At selection-screen,At selection-screen output) will trigger when you check/uncheck the check box.
Parameters:p_chk checkbox user-command chk.
At selection-screen output.
<Do screen modification>
Regards,
Vignesh.
2007 Jul 25 10:24 AM
hey john..
try the foll:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t02.
parameter: p_kunnr type kna1-kunnr modif id TES.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t04.
PARAMETER: cb1 AS CHECKBOX DEFAULT 'X' modif id SEL,
cb2 AS CHECKBOX modif id SEL.
SELECTION-SCREEN END OF BLOCK b2.
**----
A T S E L E C T I O N - S C R E E N *
**----
**
at selection-screen output.
if cb1 = 'X'.
loop at screen.
if screen-group1 = 'TES'.
screen-active = 0.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-group1 = 'TES'.
screen-active = 1.
modify screen.
endif.
endloop.
endif.
Plz reward pts if helpful.
2007 Jul 25 10:27 AM
Hi,
Here I have only one checkbox, so i cannot use screen group.
Please suggest
regards,
John
2007 Jul 25 10:32 AM
Hi John,
It will work with AT SELECTION SCREEN OUTPUT but you need to press the ENTER after selecting the checkbox then only this event will be called.
Regards,
Atish
2007 Jul 25 10:49 AM
try this it will be use full
SELECTION-SCREEN BEGIN OF BLOCK sel WITH FRAME TITLE txt.
PARAMETERS: s_ab AS CHECKBOX DEFAULT '' USER-COMMAND chk MODIF ID sak.
SELECT-OPTIONS s_gl FOR bseg-umskz MODIF ID san NO INTERVALS .
SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr .
SELECTION-SCREEN END OF BLOCK sel.
AT SELECTION-SCREEN OUTPUT.
IF s_ab = ' ' .
LOOP AT SCREEN.
IF screen-group1 = 'SAN'.
screen-active = 0.
ENDIF.
IF screen-group1 = 'SAK'.
screen-active = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
AT SELECTION-SCREEN.
IF sy-ucomm = 'CHK'.
IF s_ab = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'SAN'.
screen-input = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF s_ab = ' '.
LOOP AT SCREEN.
IF screen-group1 = 'SAN'.
screen-input = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDIF.
<b>If it is use full please reward</b>
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |