2010 Jul 29 12:27 PM
Hello Everyone,
I have a kind of an issue with selection screens. Story goes like this. I have a main sel.screen (no 1000) where I have some selection list. Now based on this selection i display another sel.screen (with my given number, let's say 9000). Then i fill selection criterion on screen 9000 press F8 and I get results. So far so good. Now when i 'back' button system displays the first, initial sel.screen (1000) instead of the last displayed (9000). I've tried to modify this behaviour and I am able to display the last sel.screen (9000) after pressing 'back' button but then when i press 'F8' instead of results I get initial sel.screen (1000) again. Is there anything I could do to make it work in the way I want to ?
Regards
Pawel
Ok so let me present the code (or at least the most important parts) as Selva asked because using 'set screen 0' did not help. it is possible that I used it in wrong place so even more presenting code should help:
* some global data definition
*definition of mail sel.screen:
SELECTION-SCREEN BEGIN OF BLOCK selscr1
WITH FRAME TITLE text-001.
PARAMETERS: "select interface
p_i001(4) as listbox visible length 20 OBLIGATORY DEFAULT 'XXX'.
SELECTION-SCREEN END OF BLOCK selscr1.
*definiotion of following sel.screens;
SELECTION-SCREEN BEGIN OF SCREEN 1002.
SELECTION-SCREEN BEGIN OF BLOCK selscr2 WITH FRAME TITLE text-001.
PARAMETER: p_ws02(4) as listbox visible length 20 OBLIGATORY DEFAULT 'XXX'.
* PARAMETER: p_t02 like GV_TABNAME DEFAULT 'zint_v_infin002'.
SELECTION-SCREEN END OF BLOCK selscr2.
SELECTION-SCREEN end OF SCREEN 1002.
SELECTION-SCREEN BEGIN OF SCREEN 1004.
SELECTION-SCREEN BEGIN OF BLOCK selscr3 WITH FRAME TITLE text-001.
PARAMETER: p_ws04(4) as listbox visible length 20 OBLIGATORY DEFAULT 'XXX'.
SELECTION-SCREEN END OF BLOCK selscr3.
SELECTION-SCREEN end OF SCREEN 1004.
******************* END OF SCREENS ***********************************************************
AT SELECTION-SCREEN ON p_i001. "parameter from screen 1000
CASE p_i001.
WHEN '002'.
call SELECTION-SCREEN 1002.
WHEN '004'.
call SELECTION-SCREEN 1004.
WHEN OTHERS.
CALL SELECTION-SCREEN 1000.
ENDCASE.
*** some settings made basing on selections from following screens
AT selection-SCREEN on p_ws02.
gv_werks = p_ws02.
AT selection-SCREEN on p_ws04.
gv_werks = p_ws04.
INITIALIZATION
* filling listbox
START-OF-SELECTION.
CASE p_i001.
WHEN '002'.
"select 002 relevant data
"alv display
WHEN '004'.
"select 004 relevant data
"alv display
ENDCASE.
END-OF-SELECTION.
so as i mentioned before when i press 'back' on alv list I end up with screen 1000 instead 1004 (it's 1004 in real life not 9000). when i tried to change i was able to display 1004 selection when i pressed 'back' on alv but then instead of getting new list system takes ma back to 1000 scr again
regards
Pawel
2010 Jul 29 12:55 PM
Hi,
Could you paste the code where you are checking the sy-ucomm (Ok_Code) in the screen 9000?
Normally, we will set the screen as 0 to go back as below:
Leave to screen 0.
I just want to look into your code so that I can tell you an exact solution.
Regards,
Selva K.
2010 Jul 29 1:05 PM
Hi,
Use set screen 0 instead of leave to screen 1000 or call screen 1000.
Because all called statments will make a stake and on back it will go back from where it was called.
Regards
Bikas
2010 Jul 29 1:23 PM
Ok so let me present the code (or at least the most important parts) as Selva asked because using 'set screen 0' did not help. it is possible that I used it in wrong place so even more presenting code should help:
* some global data definition
*definition of mail sel.screen:
SELECTION-SCREEN BEGIN OF BLOCK selscr1
WITH FRAME TITLE text-001.
PARAMETERS: "select interface
p_i001(4) as listbox visible length 20 OBLIGATORY DEFAULT 'XXX'.
SELECTION-SCREEN END OF BLOCK selscr1.
*definiotion of following sel.screens;
SELECTION-SCREEN BEGIN OF SCREEN 1002.
SELECTION-SCREEN BEGIN OF BLOCK selscr2 WITH FRAME TITLE text-001.
PARAMETER: p_ws02(4) as listbox visible length 20 OBLIGATORY DEFAULT 'XXX'.
* PARAMETER: p_t02 like GV_TABNAME DEFAULT 'zint_v_infin002'.
SELECTION-SCREEN END OF BLOCK selscr2.
SELECTION-SCREEN end OF SCREEN 1002.
SELECTION-SCREEN BEGIN OF SCREEN 1004.
SELECTION-SCREEN BEGIN OF BLOCK selscr3 WITH FRAME TITLE text-001.
PARAMETER: p_ws04(4) as listbox visible length 20 OBLIGATORY DEFAULT 'XXX'.
SELECTION-SCREEN END OF BLOCK selscr3.
SELECTION-SCREEN end OF SCREEN 1004.
******************* END OF SCREENS ***********************************************************
AT SELECTION-SCREEN ON p_i001. "parameter from screen 1000
CASE p_i001.
WHEN '002'.
call SELECTION-SCREEN 1002.
WHEN '004'.
call SELECTION-SCREEN 1004.
WHEN OTHERS.
CALL SELECTION-SCREEN 1000.
ENDCASE.
*** some settings made basing on selections from following screens
AT selection-SCREEN on p_ws02.
gv_werks = p_ws02.
AT selection-SCREEN on p_ws04.
gv_werks = p_ws04.
INITIALIZATION
* filling listbox
START-OF-SELECTION.
CASE p_i001.
WHEN '002'.
"select 002 relevant data
"alv display
WHEN '004'.
"select 004 relevant data
"alv display
ENDCASE.
END-OF-SELECTION.
so as i mentioned before when i press 'back' on alv list I end up with screen 1000 instead 1004 (it's 1004 in real life not 9000). when i tried to change i was able to display 1004 selection when i pressed 'back' on alv but then instead of getting new list system takes ma back to 1000 scr again
regards
Pawel
2010 Aug 03 2:05 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |