2007 Oct 16 1:12 PM
Hi,
I need to disable only one selection input based on a check box,
if the check box is selected then the input should be enabled else it should be disabled.
Regards,
2007 Oct 16 1:25 PM
hi shedon ,
The solution to your problem is quite simple <b>if ur working on dialog programming.</b>
u can <b>perform the following in the PBO</b> of the screen containing the check box :
MODULE STATUS_0100 OUTPUT.
IF CHECK EQ 'X' . " if checked
LOOP AT SCREEN .
IF SCREEN-NAME EQ 'EID'. " 1st element that is enabled after by checkbox
SCREEN-INVISIBLE = 0 .
ENDIF.
MODIFY SCREEN .
IF SCREEN-NAME EQ 'WEMP'. " 2nd element that is enabled SCREEN-INVISIBLE = 0 .
ENDIF.
MODIFY SCREEN .
IF SCREEN-NAME EQ 'SUBMIT'. " 2nd element that is enabled
SCREEN-INVISIBLE = 0 .
ENDIF.
MODIFY SCREEN .
ENDLOOP .
ELSE .
LOOP AT SCREEN .
IF SCREEN-NAME EQ 'EID'.
SCREEN-INVISIBLE = 1 .
ENDIF.
MODIFY SCREEN .
IF SCREEN-NAME EQ 'WEMP'.
SCREEN-INVISIBLE = 1.
SCREEN-INPUT = 0 .
ENDIF.
MODIFY SCREEN .
IF SCREEN-NAME EQ 'SUBMIT'.
SCREEN-INVISIBLE = 1.
ENDIF.
MODIFY SCREEN .
ENDLOOP .
ENDIF.
******************************************************************************************
you can continue with ur selection criteria in PAI.
REVERT BACK FOR ANY QUERY.......................
DO REWARD POINTS IF USEFUL
Hi Seldon,
The below code will solve your proble. Please reward if your problem is solved.
selection-screen begin of block b1.
parameters: v_chk as checkbox user-command rad,
v_matnr type mara-matnr modif id M1 .
selection-screen end of block b1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
if v_chk = 'X'.
IF SCREEN-GROUP1 = 'M1'.
SCREEN-active = 1.
MODIFY SCREEN.
ENDIF.
else.
IF SCREEN-GROUP1 = 'M1'.
SCREEN-active = 0.
MODIFY SCREEN.
ENDIF.
endif.
ENDLOOP.Thanks,
Suma.
2007 Oct 16 1:25 PM
hi shedon ,
The solution to your problem is quite simple <b>if ur working on dialog programming.</b>
u can <b>perform the following in the PBO</b> of the screen containing the check box :
MODULE STATUS_0100 OUTPUT.
IF CHECK EQ 'X' . " if checked
LOOP AT SCREEN .
IF SCREEN-NAME EQ 'EID'. " 1st element that is enabled after by checkbox
SCREEN-INVISIBLE = 0 .
ENDIF.
MODIFY SCREEN .
IF SCREEN-NAME EQ 'WEMP'. " 2nd element that is enabled SCREEN-INVISIBLE = 0 .
ENDIF.
MODIFY SCREEN .
IF SCREEN-NAME EQ 'SUBMIT'. " 2nd element that is enabled
SCREEN-INVISIBLE = 0 .
ENDIF.
MODIFY SCREEN .
ENDLOOP .
ELSE .
LOOP AT SCREEN .
IF SCREEN-NAME EQ 'EID'.
SCREEN-INVISIBLE = 1 .
ENDIF.
MODIFY SCREEN .
IF SCREEN-NAME EQ 'WEMP'.
SCREEN-INVISIBLE = 1.
SCREEN-INPUT = 0 .
ENDIF.
MODIFY SCREEN .
IF SCREEN-NAME EQ 'SUBMIT'.
SCREEN-INVISIBLE = 1.
ENDIF.
MODIFY SCREEN .
ENDLOOP .
ENDIF.
******************************************************************************************
you can continue with ur selection criteria in PAI.
REVERT BACK FOR ANY QUERY.......................
DO REWARD POINTS IF USEFUL
2007 Oct 16 1:27 PM
Hi,
Thanks for the reply, but im not working on dialog programming.
2007 Oct 16 1:30 PM
u can try this
at selection screen.
if checkbox = 'X'.
loop at screen.
if screen-name = the name of ur field which u want 2 hide.
screen-invisible = 1.
screen-active = 0.
modify screen.
endloop.
also in place of ' at selection screen ' try this ' at selection screen output '
2007 Oct 16 1:35 PM
Hi Sheldon
Please use the event
<b>AT SELECTION-SCREEN OUTPUT.</b>
LOOP AT SCREEN.
IF SCREEN_NAME = <the one which you want to blank>
IF P_YOUR_CHECKBOX = 'X' .
Change SCREEN-VISIBLE or SCREEN-INPUT whichever is relevant
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
2007 Oct 16 2:13 PM
parameters : chk as checkbox user-command u1.
parameters : inp type c modif id MD1.
at selection-screen output.
if chk = 'X'.
loop screen.
if screen-group1 = 'MD1'.
screen-input = 0.
else.
screen-input = 1.
endif.
modify screen.
endloop.
2007 Oct 16 2:26 PM
Hi Seldon,
The below code will solve your proble. Please reward if your problem is solved.
selection-screen begin of block b1.
parameters: v_chk as checkbox user-command rad,
v_matnr type mara-matnr modif id M1 .
selection-screen end of block b1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
if v_chk = 'X'.
IF SCREEN-GROUP1 = 'M1'.
SCREEN-active = 1.
MODIFY SCREEN.
ENDIF.
else.
IF SCREEN-GROUP1 = 'M1'.
SCREEN-active = 0.
MODIFY SCREEN.
ENDIF.
endif.
ENDLOOP.Thanks,
Suma.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |