Skip to Content
avatar image
Former Member

Question about subscreen

Hi all,

In my program, my main screen is 0100 and I have a subscreen 0200. When I'm in subscreen 0200 and click on the Back (green arrow) button, it always execute the Exit Command of my main screen. In the Exit module of my main screen, I have

CASE V_OKCODE.

WHEN C_EXIT OR C_BACK.

LEAVE TO SCREEN 0.

WHEN OTHERS.

ENDCASE.

which is what I want when I'm in my main screen as this will exit my program. However, when I'm in my subscreen, it will also fire this code and exit the program entirely, which is not what I want. What I need is when I'm in my subscreen and click on the Back button, I need to exit to my main screen and if I'm in my main, I will exit the program if click on Back button again.

How can I do this? Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 18, 2007 at 09:03 AM

    Hi

    Just write LEAVE SCREEN instead of LEAVE TO SCREEN 0 and see.

    CASE V_OKCODE.

    WHEN C_EXIT OR C_BACK.

    LEAVE SCREEN .

    WHEN OTHERS.

    ENDCASE.

    Regards

    Anji

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Can anyone help me with this? My program only has 1 back button on the top, but have multiple subscreens. How can I exit a subscreen to the main screen by clicking on the back button?

      I have tried LEAVE SCREEN, nothing happen,

      I have tries LEAVE TO SCREEN 0, the subscreen exit the program entirely, which is not what I want.

  • avatar image
    Former Member
    Aug 19, 2007 at 06:53 AM

    use leave screen statement .. but set next screen attribute of the subscreen to '0100'.

    Add comment
    10|10000 characters needed characters exceeded