2006 Dec 18 10:46 AM
Hi all
I have a checkbox and a text box on the screen.I have to activate the textbox whenever check box value is set.Please help me to do this.
Thanks in advance.
Regards
Giri.
Hi all
I have a checkbox and a text box on the screen.I have to activate the textbox whenever check box value is set.Please help me to do this.
Thanks in advance.
Regards
Giri.
2006 Dec 18 10:48 AM
Use the AT SELECTION-SCREEN OUTPUT
Loop at Screen.
If chk_box = 'X'.
If screen-name = 'YOur parameter name '.
screen-input = '1'.
endif.
Endif
endloop.
Basically what you are doing is in that once the checkbox is clicked.
You are looping at the Screen in search of your field name
and then setting the screen characteristics to input enabled.
2006 Dec 18 10:51 AM
pbo of the screen (at selection-screen output for selection screen)
if chkbox = 'x'.
loop at screen.
if screen-name = <your fieldname>
screen-input = '1'.
modify screen.
endif.
endloop.
regards
shiba dutta
Message was edited by:
SHIBA DUTTA
2006 Dec 18 10:57 AM
Hi,
Don't forget to use 'MODIFY SCREEN' in the above code.
Rgds
Sreenviasa Reddy V.
2006 Dec 18 11:01 AM
Hi Giri,
First of all while creating the checkbox you should use usercommand of that.
in the coding AT SLECTION-SCREEN ouput.
You can use the code
if that check box = 'X'
loop at screen.
if screen-input = 'fieldname'.
screen-input = '1'.
modify screen
endif.
endloop.
Reward Points if it is helpful.
regards,
Kiran I
2006 Dec 18 11:15 AM
hello giri ,
write following code ,it will fulfill ur requirement..
parameters: P_pernr(8) modif ID ABD ,
P_CBOX AS CHECKBOX MODIF ID ABC USER-COMMAND CH
DEFAULT 'X'.
Check sy-ucomm = 'CH'.
AT SELECTION-SCREEN OUTPUT.
loop at screen.
if p_CBOX = 'X'.
if screen-group1 = 'ABD'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ENDIF.
ELSEIF P_CBOX = SPACE.
if screen-group1 = 'ABD'.
SCREEN-ACTIVE = '1'.
MODIFY SCREEN.
ENDIF.
ENDIF.
endloop.
Reward points if it helps..
2006 Dec 18 11:17 AM
HI ,
just execute the code ..
PARAMETERS: p_pc AS CHECKBOX ,
p_pcfile LIKE rlgrap-filename DEFAULT 'PPPPPPPP'
MODIF ID d1.
at selection-screen output.
if P_PC NE 'X'.
loop at screen.
if screen-group1 = 'D1'.
screen-INPUT = 0.
modify screen.
endif.
endloop.
ELSEIF P_PC EQ 'X'.
loop at screen.
if screen-group1 = 'D1'.
screen-INPUT = 1.
modify screen.
endif.
endloop.
endif.so if u want the text box to be enabled u need to check the checkbox and an F8
hope this helps ,
regards,
vijay
2006 Dec 18 3:24 PM
hi giri,
try the following code u can get what do u want.
tables sscrfields.
data:a type c value 'X'.
selection-screen begin of block b with frame.
parameters:chk type c as checkbox user-command CHEK.
parameters:prm(4) type c Modif id g1.
selection-screen end of block b.
at selection-screen output.
loop at screen.
if screen-group1 = 'G1'.
if a = 'X'.
screen-input = 0.
modify screen.
endif.
endif.
endloop.
at selection-screen.
CASE SSCRFIELDS-UCOMM.
WHEN 'CHEK'.
if chk = 'X'.
clear a.
elseif a = 'X'.
endif.
ENDCASE.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |