08-18-2007 9:47 AM
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.
08-18-2007 10: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
08-18-2007 10:17 AM
Hi,
I have tried LEAVE SCREEN, and it didn't even leave to the main screen. It stays at the subscreen.
08-19-2007 7:43 AM
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.
08-19-2007 7:53 AM
use leave screen statement .. but set next screen attribute of the subscreen to '0100'.