09-28-2007 4:42 AM
Hi all
When i made a check to the checkbox, the textbox will display 'Hello'.
When i uncheck the checkbox, the textbox will display 'World'.
i dont want to click on any enter or execute button. I want the check box to dynamic know the action to tak. Any help to this problem.
thank alotz
09-28-2007 4:45 AM
PARAMETER : p_c AS CHECKBOX USER-COMMAND um1 DEFAULT 'X'.
PARAMETER : p_c1(10) TYPE c.
AT SELECTION-SCREEN OUTPUT.
IF p_c = 'X'.
p_c1 = 'Hello'.
ELSEIF p_c = ''.
p_c1 = 'World'.
ENDIF.
Regards
Gopi
09-28-2007 5:00 AM
if u dont want to press enter,
then u have to assing a function code to the checkbox.
Then the function will automatically triggers when u check that
checkbox.
then u have to use
set default as world.
AT SELECTION-SCREEN OUTPUT.
case sy-ucomm.
when check.
p_c1 = 'Hello'.
endcase.
<b>pls reward if helpful.</b>
null
09-28-2007 6:41 AM
how to set a function code to the check box? any code or step to do ?
09-28-2007 5:07 AM
Hi,
Use the below code.
parameters: p_chk1 as checkbox user-command rusr.
selection-screen: begin of block blk1 with frame.
parameters: p_text(20) modif id ABC.
selection-screen: end of block blk1.
AT SELECTION-SCREEN output.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
IF p_chk1 = 'X'.
p_text = 'Hello'.
ELSE.
p_text = 'World'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
09-28-2007 6:44 AM
Hi thks for yr code. But i not using a selection screen... i using a dialog screen
Hw to do that ?