‎2007 Jun 26 1:57 PM
hi guys here one interesting question about screens.
I have two screen numbering 100,200. screen 100 have two push buttons GOTO,EXIT. screen 200 have one push button BACK. if i click GOTO in screen100 that should call screen 200. if i click EXIT first time ,that should not respond.if i click EXIT second time that should exit out of program. condition is no conditional statements should not be used. only we can use if sy-ucomm = 'EXIT'.
TRY OUT
THANKS IN ADVANCE,
REWARD POINTS IF ANSWERED.
‎2007 Jun 26 2:07 PM
Hello,
This is what u wnat.
REPORT ZV_SDN_DIALOG .
DATA: FLAG.
CALL SCREEN 100.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0100 INPUT.
IF SY-UCOMM = 'GOTO'.
CALL SCREEN 200.
ELSEIF SY-UCOMM = 'EXIT'.
IF FLAG IS INITIAL.
FLAG = 'X'.
ELSE.
LEAVE PROGRAM.
ENDIF.
ENDIF.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0200 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0200 INPUT.
IF SY-UCOMM = 'EXIT'.
* CALL SCREEN 200.
LEAVE TO SCREEN 100.
ENDIF.
ENDMODULE. " USER_COMMAND_0200 INPUT
Reagrds,
Vasanth
‎2007 Jun 26 2:09 PM
Try to use count inside if condition and write the code like
if sy-ucomm = 'EXIT'.
if count = 2.
exit.
else.
count = count + 1.
endif.
endif.
regards
Anji