Application Development 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: 

Question about subscreen

Former Member
0 Kudos

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.

4 REPLIES 4

Former Member
0 Kudos

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

0 Kudos

Hi,

I have tried LEAVE SCREEN, and it didn't even leave to the main screen. It stays at the subscreen.

0 Kudos

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.

Former Member
0 Kudos

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