‎2016 Feb 01 10:41 AM
hello all,
we have developed a Zreport with two custom containers(on screen 9001) as shown below,
when i click a record(hot spot click) on second container,
we are calling another screen 9002 with container3 as shown below,
however the issue is when i click BACK button on screen 9002 , it's not coming back to screen 9001 in one go,
i was forced to click the BACK button multiple times, how do i eliminate this...
my code when BACK...
MODULE USER_COMMAND_9002 INPUT.
case sy-ucomm.
when 'BACK' .
LEAVE to SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_9002 INPUTi tried with
* call METHOD custom3->free.
* call METHOD grid3->free.
* CALL METHOD cl_gui_cfw=>flush.
*
* clear : custom3,grid3.
* free:custom3,grid3.
but did not work with this also..
any suggestions...
thanks in advance...
‎2016 Feb 01 10:52 AM
Maybe a silly question, but did you try
LEAVE TO SCREEN 9001.
??
‎2016 Feb 01 10:54 AM
‎2016 Feb 01 11:29 AM
Hi Vinay,
Have you set pf-status in PBO of that screen. If not do so and under function keys for the back button write the fcode 'BACK'. This will solve the problem. And in PAI write the leave to screen statement for 'BACK' user command.
Regards,
Taiyeb
‎2016 Feb 01 11:53 AM
Have a look at the statement that you use to display screens:
CALL Screen xxxx.
Generally when you call something (you call a function, or your call a subroutine etc) the location of the call is pushed onto a stack. When you exit that subroutine or function processing continues at the point immediately after the Call.
Screens are exactly the same. mWhen you CALL a screen the current screen is pushed onto a stack. When you specify that you wish to leave to screen 0, this is SAP convention for saying 'return to the previous screen', which is popped off of the stack, so to leave to another screen you need to specify that screen number.
I have found that the combined form of 'Leave To Screen xxxx' to be a bit flaky so I always use the two statements:
Set Screen 9001.
Leave Screen.
I would also make your third screen a window rather than a full screen, either by using a docking container or by using the 'Starting At', 'Ending At' clauses of the call screen statement.
Regards
Rich
‎2021 Aug 14 4:13 AM
Hi Vinay,
I have similar issue rn. Can you please guide if you found a fix?
Regards,
Sairam