09-13-2007 4:10 AM
Hi,
I have create an ABAP program.. which CALL SCREEN 100. This screen 100 is design using Graphical Screen Painter. I have create an push button on it. When the button is press, I try to do some logic behind and want to do a WRITE statement but somehow.. the screen never print out the WRITE statement. Is there anyway to do it?
Regards,
Rayden
09-13-2007 4:29 AM
You can't use write statement in Dialog programs..eventhough if you want to use then use below syntax :
case sy-ucomm.
when 'PUSH'.
<b>leave to list-processing</b> . " If it is not working then try <b>leave list-processing.</b>
write:/ 'Push is selected'.
endcase.
Thanks
Seshu
09-13-2007 4:20 AM
Hi,
WRITE statement wont work on screen painter.
Create a LABEL i.e. a TEXT FIELD and assign a name to it say 'RESULT' in Screen Layout.
Acitvate the screen.
In the PAI, when Push button is pressed
CASE l_OKCODE.
WHEN 'HIT'.
v_flag = 'X'.
ENDCASE.
In the PBO, when Push button is pressed.
IF V_FLAG = 'X'.
LOOP AT SCREEN.
if SCREEN-NAME = 'RESULT'.
RESULT = 'Hit button pressed'.
ENDIF.
ENDLOOP.
else.
clear RESULT.
endif.
09-13-2007 4:23 AM
Check the sample program <b>demo_dynpro_push_button</b>
Regards
Gopi
09-13-2007 4:29 AM
You can't use write statement in Dialog programs..eventhough if you want to use then use below syntax :
case sy-ucomm.
when 'PUSH'.
<b>leave to list-processing</b> . " If it is not working then try <b>leave list-processing.</b>
write:/ 'Push is selected'.
endcase.
Thanks
Seshu