Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

screen challenge

Former Member
0 Likes
350

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.

2 REPLIES 2
Read only

Former Member
0 Likes
333

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

Read only

Former Member
0 Likes
333

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