04-14-2015 8:20 AM
Hello,
I have a report with selection screen (1000) and calling few more screens in sequence like 9100, 9200 and 9300. Like to know how to get to the selection screen and continue processing again 1000->9100-9200-9300.
In 9300 PAI i have written the below code
When 'BACK'
call SELECTION-SCREEN 1000.
This indeed takes me to selection screen, but when i fill the values in selection screen variables and click execute, it is continue processing in 9300 screen and not 9100 screen.
This is the bit i am not able to fix - reaching selection scree is happening, but it is not going forward with calling the 9100 screen and so forth. any suggestions would help. thanks
04-14-2015 9:00 AM
When you use CALL SCREEN statements you are stacking the screen "screen sequence", statements to get back is SET SCREEN 0. LEAVE SCREEN. or LEAVE TO SCREEN 0.
So either you have used a LEAVE TO SCREEN to navigate to the current screen (LEAVE TO SCREEN 9300 in screen 9200 PAI) or you should pass the OK_CODE back to previous screen logic (execution will then continue in the PAI 9200 logic code wrote after the CALL SCREEN 9300) to get back til selection-screen, or you could use a shortcut as LEAVE TO CURRENT TRANSACTION if you don't care about current user input.
Screen sequence | ||||
1000 | ||||
CALL SCREEN 9100 | 1000 | 9100 | ||
CALL SCREEN 9200 | 1000 | 9100 | 9200 | |
CALL SCREEN 9300 | 1000 | 9100 | 9200 | 9300 |
LEAVE TO SCREEN 0 | 1000 | 9100 | 9200 | |
LEAVE TO SCREEN 0 | 1000 | 9100 | ||
LEAVE TO SCREEN 0 | 1000 | |||
CALL SCREEN 9100 | 1000 | 9100 | ||
LEAVE TO SCREEN 9200 | 1000 | 9200 | ||
LEAVE TO SCREEN 9300 | 1000 | 9300 | ||
LEAVE TO SCREEN 0 | 1000 |
Regards,
Raymond
04-14-2015 10:02 AM
Also an example of wrong solution could be
Screen sequence | ||||||||||
1000 | ||||||||||
CALL SCREEN 9100 | 1000 | 9100 | ||||||||
CALL SCREEN 9200 | 1000 | 9100 | 9200 | |||||||
CALL SCREEN 9300 | 1000 | 9100 | 9200 | 9300 | ||||||
LEAVE TO SCREEN 1000 | 1000 | 9100 | 9200 | 1000 | ||||||
CALL SCREEN 9100 | 1000 | 9100 | 9200 | 1000 | 9100 | |||||
CALL SCREEN 9200 | 1000 | 9100 | 9200 | 1000 | 9100 | 9200 | ||||
CALL SCREEN 9300 | 1000 | 9100 | 9200 | 1000 | 9100 | 9200 | 9300 | |||
LEAVE TO SCREEN 1000 | 1000 | 9100 | 9200 | 1000 | 9100 | 9200 | 1000 | |||
CALL SCREEN 9100 | 1000 | 9100 | 9200 | 1000 | 9100 | 9200 | 1000 | 9100 | ||
CALL SCREEN 9200 | 1000 | 9100 | 9200 | 1000 | 9100 | 9200 | 1000 | 9100 | 9200 | |
CALL SCREEN 9300 | 1000 | 9100 | 9200 | 1000 | 9100 | 9200 | 1000 | 9100 | 9200 | 9300 |
Til maximum number of nested screen (50 dynpro sequences or nine popup level) reached and dump raised...
04-15-2015 12:54 AM
Hi Raymond,
Thanks for the details, but still having issues. Let me explain
As per requirement, i would need to have the ability to tranverse from
1) 1000->9100->9200->9300 & ability to travel backwards
9300->9200->9100 for Review & modification of selection
Hence cannot use the Leave to Screen in PAI of 9200 or 9300
Only when we click on Execute button in 9300 screen, then it loads the 9400 (log output scr)
So now the flow required (Only) from 9400 is to go back to Selection screen (1000) and not 9300.
This is were i am getting struck. I tried the below as per the suggestions
In 9400 PAI under 'BACK'. added
-- Sy-ucomm = lv_back " Value as BACK
-- Leave to screen 0. "Failed as it loaded again the 9300
-- Sy-ucomm = lv_back " Value as BACK
-- Leave to screen 9100." Failed as it went to PBO of 9100 and loaded it
For some reason, its going to PBO and NOT PAI of the called screen. How do go to the PAI of the previous screen, so that it will leave from
9400->9300->9200->9100->1000 or
9400->9100->1000
Please suggest.
thx
AB
04-14-2015 9:02 AM
Dear AB,
Instead of calling Selection screen,
use the Set Screen 1000.
Thanks and Regards,
Nishant
04-14-2015 9:31 AM
You can find much information on screen sequences at below links, Hope this helps.