2007 Aug 06 4:37 AM
Hi all,
In my program, I called a subscreen via CALL SUBSCREEN DYNAMIC whereby DYNAMIC will have the screen number. When I'm in the DYNAMIC subscreen, what can I do to leave this screen and go back to the main screen? I tried using LEAVE TO SCREEN 0, LEAVE SCREEN, SET SCREEN 0, but all was not working and the program keep telling me that "SET SCREEN is not allowed in subscreens". What can I do to exit the subscreen?
Hi all,
In my program, I called a subscreen via CALL SUBSCREEN DYNAMIC whereby DYNAMIC will have the screen number. When I'm in the DYNAMIC subscreen, what can I do to leave this screen and go back to the main screen? I tried using LEAVE TO SCREEN 0, LEAVE SCREEN, SET SCREEN 0, but all was not working and the program keep telling me that "SET SCREEN is not allowed in subscreens". What can I do to exit the subscreen?
2007 Aug 06 4:47 AM
Hi..
Subscreens Cannot Call other Screens, bcoz a Subscreen is always ebedded inside another screen.
So the Statments like SET SCREEN, LEAVE TO SCREEN <N> will not be allowed in a subscreen.
Instead of that you place the Same statments inside the PAI module of the Main screen.
<b>Reward if Helpful</b>
2007 Aug 06 4:54 AM
Thanks, but however, in my subscreen, there's a button for me to quite that screen. I have assign a FCODE to that button in the status screen of the main screen, so whenever I press on it, the main screen PAI will trigger. I have tried to put the LEAVE TO SCREEN statements in it, but still it keep coming back with the same error message.
2007 Aug 06 5:00 AM
2007 Aug 06 5:01 AM
2007 Aug 06 5:30 AM
Hi,
u have a sub screen means that will be a part of some main screen.so in the PAI of that main screen u just write the code for the function code of that button.
rgds,
bharat.
2007 Aug 06 5:14 AM
Hi Mil,
The flow logic of a subscreen screen has certain limitations, so it may not contain any dialog modules containing the statements SET TITLEBAR, SET PF-STATUS, SET SCREEN, LEAVE SCREEN, or LEAVE TO SCREEN. Any of these statements causes a runtime error. You cannot change the GUI status of a main screen in a subscreen screen and the flow logic of a subscreen screen may not contain a MODULE ... AT EXIT-COMMAND statement. Type E functions may only be handled in the main screen.
So, You can not exit the sub screen dynamically.
Thanks,
Vinay
2007 Aug 06 5:16 AM
"please see this link for Creating subscreen in your dialog program and
"in report program, .<a href="http://">http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm</a>
<a href="http://">http://help.sap.com/saphelp_nw2004s/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/content.htm</a>
reward points if it is usefull ...
Girish