Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

user defined selection screen sequence

Former Member
0 Likes
796

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

4 REPLIES 4
Read only

Former Member
0 Likes
679

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.

Read only

Former Member
0 Likes
679

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

Read only

Former Member
0 Likes
679

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

Read only

Former Member
0 Likes
679

ok, i've solved it