‎2009 Jun 19 12:52 PM
Hi,
I have created two screens and called one after another with some usercommands at standard selection screen.When I press enter or execute at the third screen it comes back to the 1st screen(select screen-1000).But I do not want this.Please help.Following is my code.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: a TYPE xxxx ,
b TYPE xxxx,
c TYPE xxxx .
SELECTION-SCREEN END OF BLOCK b1.
*Selection screen for 2nd screen
SELECTION-SCREEN: BEGIN OF SCREEN 2000 TITLE text-017 .
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-016.
PARAMETERS: pdir type STRING OBLIGATORY DEFAULT TEXT-020.
SELECTION-SCREEN PUSHBUTTON 79(10) but1 user-command CLI1.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN:END OF SCREEN 2000.
SELECTION-SCREEN: BEGIN OF SCREEN 3000 TITLE text-017 .
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE TEXT-018.
PARAMETERS: pdir1 type STRING OBLIGATORY DEFAULT TEXT-020.
SELECTION-SCREEN PUSHBUTTON 79(10) but2 user-command CLI2.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN:END OF SCREEN 3000.
AT SELECTION-SCREEN .
CASE sy-dynnr.
WHEN 1000.
CASE sy-ucomm.
WHEN c_create.
PERFORM create.
WHEN c_push.
PERFORM show.
WHEN c_execute.
CALL SELECTION-SCREEN 2000.
WHEN c_back OR c_end OR c_canc.
LEAVE PROGRAM.
ENDCASE.
WHEN 2000.
CASE sy-ucomm.
WHEN 'CLI1'
PERFORM load.
WHEN c_execute.
PERFORM update
CALL SELECTION-SCREEN 3000.
ENDCASE.
WHEN 3000.
CASE sy-ucomm.
WHEN execute.
PERFORM download.
ENDCASE.
ENDCASE.
‎2009 Jun 19 1:03 PM
If you want to stay in screen 3000 only then you can use set screen 3000.
‎2009 Jun 19 1:09 PM
what do you want if enter or execute is pressed at 3000 screen.
Please elaborate.
To debug just comment CASE statement at 3000 screen.
regards,
Sunny
‎2009 Jun 19 1:09 PM
Check your subroutine PERFORM download......is there any exit statement in it..
Your code works fine for me...without subroutines...