Problem in Call Screen

hi! all
I'm having an executable report in which from the given input a screen opens to enter data.
my default selection-screen no. is 1000.
user-defined screen no. is 1001.
when i click back button the following error occurs.
Selection screen ZSDSR032_PACK_LIST_ENTRY 1000 was
not called using CALL SELECTION-SCREEN       
i have used the following code,
MODULE user_command_1001 INPUT.
  CASE sy-ucomm.
    WHEN 'BACK'.
      LEAVE TO SCREEN 1000.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_1001  INPUT
kindly help me to solve it.
Thanks in advance
Regards,
Nagulan.

Hi,
try to this
REPORT ZSDSR032_PACK_LIST_ENTRY
PARAMETERS: rb1 RADIOBUTTON GROUP ab MODIF ID bl2,
rb2 RADIOBUTTON GROUP ab MODIF ID bl2.
SELECTION-SCREEN BEGIN OF SCREEN 1000.
parameter p_val1 type char10.
SELECTION-SCREEN END OF SCREEN 1000.
SELECTION-SCREEN BEGIN OF SCREEN 1001.
parameter p_val2 type char10.
SELECTION-SCREEN END OF SCREEN 1001.
AT SELECTION-SCREEN.
if rb1 = 'X'.
call selection-screen 1000.
else.
call selection-screen 1001.
endif.

Similar Messages

  • Problem with Call Screen and Leave Screen !

    Hi,
    I am calling Modal screen (Dialog Pop up screen) from my first screen by 'Leave to Screen 'nbr' ' then once user enter the value in the pop up screen then I haveto display value with TABLE in Final screen as 'Normal screen'  here I am  using LEAVE to SCREEN, but after this call - my new final screen is not displaying as noraml screen it also displaying like 'Modal Screen' Like big pop scrren.!!
    When I tried final CALL by using CALL SCREEN instead of LEAVE screen the final screen with  table is dispalying fine as Normal screen but its returning control to pop-up screen which I dont want.
    I like Screen flow as 1>2>3--->1
    Help me to solve this Problem.
    Regards
    James

    Hi,
    Check the below thread,
    Unable to close Modal dialog box
    1) 1st screen--> 2nd screen --> Use CALL SCREEN.(This is Modal Screen)
    2) 2nd Screen-->(ModalScreen so you need come back) use the above thread
    3) Still on 1st screen--> Use CALL SCREEN --> To 3rd Screen
    4) 3rd Screen back to First Screen -> use LEAVE TO SCREEN First_Screen_NO.
    Cheerz
    Ram

  • Problem with call screen

    Hi everybody, I did work a program with Tx SE38, in the program I call a screen.
    START-OF-SELECTION.
      PERFORM completa_lista.
      CALL SCREEN 0100.
    END-OF-SELECTION.
    The program run very well, but. When the program is in screen 0100 and push the button BACK or button EXIT. Don't return to program that called to screen 0100, always return to the program SAPMSSY0 and then push again the button  BACK or EXIT to return the program that called to screen 0100.
    This is my code in the PAI:
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'EXIT' OR 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.
    I try with SET SCREEN 0. or LEAVE TO SCREEN 0. But always return to the program SAPMSSY0
    Is there a way to skip the program SAPMSSY0?

    Hi ,
    LEAVE TO SCREEN 0 will work in your case.
    it comes back to the point from where it triggered screen 0100.
    If you want to leave the program and come back to the easy access screen then you have to use LEAVE PROGRAM.
    hope this helps!!
    Regards,
    Soumya Ranjan
    Edited by: Soumya Ranjan on Dec 15, 2010 5:59 AM

  • Problem in calling a selection-screen

    Hi Friends,
        Please see the code below.
    when r_rbr = 'X', I'm calling sel screen 100.
    when r_cvr = 'X', I'm calling selection screen 200.
    Now the problem is that when I call screen 100 or 200 & press BACK button, even then also it goes to start of selection.Please help.
    AT SELECTION-SCREEN ON RADIOBUTTON  GROUP r1.
      IF g_flag IS INITIAL.
        IF r_rbr = c_x.
    *BREAK-POINT.
          CALL SELECTION-SCREEN 100.
          g_flag  = 'X'.
        ELSEIF r_cvr = c_x.
          CALL SELECTION-SCREEN 200.
          g_flag  = 'X'.
        ENDIF.
      ENDIF.
    START-OF-SELECTION.
    fetch data from data base tables
      IF r_rbr = c_x
       AND g_flag NE 'X'.
        PERFORM fetch_data.
        PERFORM data_consolidate.
      ENDIF.
      IF r_cvr = c_x.
    AND g_flag NE 'X'.
        PERFORM fetch_data1.
      ENDIF.

    Hi,
    Do it this way...
    Tables : SSCRFIELDS.  " Added
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP r1.
    IF g_flag IS INITIAL.
    IF r_rbr = c_x.
    *BREAK-POINT.
    CALL SELECTION-SCREEN 100.
    g_flag = 'X'.
    clear sscrfields-ucomm.      " Added line
    ELSEIF r_cvr = c_x.
    CALL SELECTION-SCREEN 200.
    g_flag = 'X'.
    clear sscrfields-ucomm.  " Added line
    ENDIF.
    ENDIF.
    START-OF-SELECTION.
    * fetch data from data base tables
    IF r_rbr = c_x
    AND g_flag NE 'X'.
    PERFORM fetch_data.
    PERFORM data_consolidate.
    ENDIF.
    IF r_cvr = c_x.
    * AND g_flag NE 'X'.
    PERFORM fetch_data1.
    ENDIF.
    Please let me know if this does not work
    Regards,
    Siddarth

  • Caller screen Buttons problem Z10STL100-1

    I have Z10STL100-1 after official update Z10STL100-1/10.3.1.1565 having caller screen Buttons problem these are little above not like it's on 10.2 very below position. I security wipe and restart many times still same position of buttons? See pic attached

    Hello,
    Did you check if there are no objects on that index slide that have a fading transition? You should set the transition for every object to 'No transition'. The transition can be found in the Properties dialog, tab Options.
    Lilybiri

  • Problem in Call Selection Screen

    Hi,
    I am facing a problem on the call selection screen. The no. of nested screens that can be called by using call selection screen is 50. When the count reaches to 51 it is going to short dump. How can i avoid the dump. What is the system field that captures the nested screens count.
    Thanx in advance,

    Maximum number of nested CALL SCREEN is 50, I think you cannot call 51th screen in a row.
    To avoid short dump you can handle exception <b>DYNP_TOO_MANY_CALL_SCREENS</b> and give error (or information) message 'Maximum number of nested sccreen level is 50' .
      TRY .
          CALL SCREEN 100.
        CATCH cx_root .
          MESSAGE e100(00).
      ENDTRY.

  • Call Screen problem in a report

    Hi All,
    I have a report in which I am calling an ALV grid screen 1000. I select some line items and click on execute. On execution in the PAI I have called a function module which has a call screen statement inside it. This should call the screen 100 with tabstrip(This screen is not related to this report. This belongs to some other function group). But when I execute the report instead of calling the screen 100 again the screen 1000 is only being displayed. I have found that the PBO of screen 100 and all the subscreens in it are being called but after that this 100 screen not displayed as mentioned already. Please someone let me know if I am missing something somewhere.
    Thank you,
    Sri.

    Hi Madhu,
    I am calling the screen from PAI of the ALV grid screen. I have debuged and checked. The PBO of the screen and the corresponding subscreens is being called but after that instead of the wanted screen this ALV grid screen is being called. And when I press back button then again PAI of the actual screen is being called.
    When the same FM is called from other classic reports without using ALV grid it is working fine.
    Thanks,
    Sri.

  • ALV not getting refreshed when call screen is executed second time

    I have 2 screens 9001 and 9002. In 9001 , I am displaying the fields of a database table in a Table Control. The user has to select some of those fields and click on a button 'Generate ALV'. After clicking , the control navigates to 9002 where I am displaying ALV with data in the selected fields(the other fields remain empty). (using custom container)
    Now there is BACK button in 9002 where i have written LEAVE TO SCREEN  9001. After this if the user again make changes in column selection and click on 'Generate ALV' , then still the old alv data is displayed. (Mind you the structure of alv is same , only the selected fields should show data).
    I am using REFRESH_ALV_DISPLAY also and when i tested this function independently , its working fine (although for interactive alv in the same screen).
    I am making use of <fs> for dynamic internal table and i checked it using breakpoints , during the 2nd time , it contains the correctly updated data so i think the problem lies with alv
    Kindly check this code
    MODULE STATUS_9002 OUTPUT.
      SET PF-STATUS 'ZALV'.
    *  SET TITLEBAR 'xxx'.
      CREATE OBJECT C_CONT
        EXPORTING
          CONTAINER_NAME               = 'CUST_CONT'
      IF SY-SUBRC <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    IF OBJ_ALV IS INITIAL.
      CREATE OBJECT OBJ_ALV
        EXPORTING
          I_PARENT           = C_CONT
      CALL METHOD OBJ_ALV->SET_TABLE_FOR_FIRST_DISPLAY
         EXPORTING
           I_STRUCTURE_NAME              = INP_TABLE
         CHANGING
          IT_OUTTAB                      = <itab>
    ELSE.
       CALL METHOD OBJ_ALV->REFRESH_TABLE_DISPLAY
      ENDIF.
    ENDMODULE.                 " STATUS_9002  OUTPUT
    Edited by: amber22 on Sep 16, 2011 6:45 PM

    Amber,
    Something like:
    *&      Module  STATUS_9001  OUTPUT
    MODULE status_9001 OUTPUT.
      SET PF-STATUS 'ST9001'.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
    MODULE user_command_9001 INPUT.
      CASE sy-ucomm.
        WHEN 'GEN'.
          SELECT * FROM spfli INTO TABLE gt_outtab.
          CALL SCREEN 9002.
        WHEN 'BACK'.
          LEAVE.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Module  STATUS_9002  OUTPUT
    MODULE status_9002 OUTPUT.
      SET PF-STATUS 'ST9002'.
      IF obj_alv IS INITIAL.
        CREATE OBJECT c_cont
          EXPORTING
            container_name = 'CUST_CONT'.
        CREATE OBJECT obj_alv
          EXPORTING
            i_parent = c_cont.
        CALL METHOD obj_alv->set_table_for_first_display
          EXPORTING
            i_structure_name = 'SPFLI'
          CHANGING
            it_outtab        = gt_outtab.
      ELSE.
        CALL METHOD obj_alv->refresh_table_display.
      ENDIF.
    ENDMODULE.                 " STATUS_9002  OUTPUT
    *&      Module  USER_COMMAND_9002  INPUT
    MODULE user_command_9002 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          CALL METHOD: obj_alv->free, c_cont->free.
          CLEAR: obj_alv, c_cont.
          CALL METHOD cl_gui_cfw=>flush.
          LEAVE TO SCREEN 9001.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9002  INPUT
    Altough it's not a really nice solution... Why using 2 screens for example? you could use two containers instead...
    Also I would recommand playing with the new salv class for your grids.
    Anyway don't hesitate to give feed-back.
    Kr,
    m.

  • In CL_GUI_SPLITTER_CONTAINER  ALV list  is not show in called screen

    Hello experts,
    i come across a problem while using the class:CL_GUI_SPLITTER_CONTAINER ,
    my codes is as follows:
    data:declarations is as follows:
                 data:gr_spliter     TYPE REF TO cl_gui_splitter_container,
                         gr_container1  TYPE REF TO cl_gui_container,
                         gr_container2  TYPE REF TO cl_gui_container,
                         gr_grid1       TYPE REF TO cl_gui_alv_grid,
                         gr_grid2       TYPE REF TO cl_gui_alv_grid,
    step 0  Fit  table contents:gt_out1 and gt_out2
    step 1:   CREATE OBJECT gr_spliter
                   EXPORTING
                   parent            = cl_gui_container=>screen0
                   ows               = 1
                   columns         = 2
    step 2:  CALL METHOD gr_spliter->get_container
                 EXPORTING
                 row       = 1
                column    = 1
                RECEIVING
                container = gr_container1.
                CALL METHOD gr_spliter->get_container
                 EXPORTING
                 row       = 1
                column    = 2
                RECEIVING
                container = gr_container2.
    step 3 :call screen 100 to show ALV.
    in the screen's PBO ,i show ALV using CL_GUI_ALV_GRID,the codes is:
       CREATE OBJECT gr_grid1
        EXPORTING
          i_parent          = gr_container1
       CREATE OBJECT gr_grid2
        EXPORTING
          i_parent          = gr_container2
      CALL METHOD gr_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name              =  Structure of table Gt_OUT1
        CHANGING
          it_outtab                     = gt_out1
    CALL METHOD gr_grid2>set_table_for_first_display
        EXPORTING
          i_structure_name              =  Structure of table Gt_OUT2
        CHANGING
          it_outtab                     = gt_out2
    But after activing the program ,there is no ALV show in screen 100,I debug the program and find that
    all the above object have been created corredtly.
    if i create a custom contol named 'CONTAINER',and at Step 1 change the parent's value to 'CONTAINER',
    then i could see the ALV whick i hope in screen 100.
    If i create a custom control in screen 100, the size of the alv will be different across different computer,
    is it possible to use CL_GUI_CONTAINER=>screen0 as cl_gui_splitter_container's attribute parent  value???
    and i find that there are 10 attributes named screen0 to screen9 in class CL_GUI_CONTAINER,will you tell me the usage of
    these attributes?
    now i only konw that ,you could set a containers parent value to be CL_GUI_CONTAINER=>screen0,which you do't have to create
    a custom control in your screen ,and the alv will be shown in full screen.and what the other attributes use (screen1,screen2,screen3,screen4 and so on)
    now i am confused with the problem,i am sure any words from you will give me help to this question!
    Hope to receive your advice!
    Best regards!
    yours Carl
    Edited by: lakeandmoon on Aug 27, 2010 11:24 AM

    Dear Carl,
    I mean go to screen painter and place there CUSTOM_AREA (the icon with C letter). In program's PBO create CUSTOM_CONTAINER
    module pbo output.
    if custom_container is initial.
    CREATE OBJECT custom_container
       EXPORTING container_name = 'CUSTOM_AREA'.\
    endif.
    endmodule.
    Then you work only with CUSTOM_CONTAINER (i.e. as parent to SPLITTER_CONTAINER). Using subscreens here doens't really add the value, so you don't need any.
    But how could i stretch the screen and this area to full screen?is it just gragging the screen to full screen and drag the subscreen or the custom control to full screen in screen painter?
    Yes, this is what I mean
    Regards
    Marcin

  • Hello apple I have the problem with my iPhone and my friends have this problem too. My iPhone have the problem about calling and answer the call. When I use my iPhone to call I can't hear anything from my iPhone but the person that I call can answer it bu

    Hello apple
    I have the problem with my iPhone and my friends have this problem too.
    My iPhone have the problem about calling and answer the call. When I use my iPhone to call I can't hear anything from my iPhone but the person that I call can answer it but when answer both of us can't hear anything and when I put my iPhone to my face the screen is still on and when I quit the phone application and open it again it will automatic call my recent call. And when my friends call me my iPhone didn't show anything even the missed call I'm only know that I missed the call from messages from carrier. Please check these problem I restored my iPhone for 4 time now in this week. I lived in Hatyai, Songkhla,Thailand and many people in my city have this problem.
    Who have this problem??

    Apple isnt here. this is a user based forum for technical questions. The solution is to restart, reset, and restore as new which is in the manual after that get it replaced for hard ware failure. if your within your one year warranty its replaced if it is out of the warranty then it is 199$

  • Statement "CALL SCREEN" is not allowed in this form.

    Hi,
    Could anyone identify the short dump.
    Statement "CALL SCREEN" is not allowed in this form.
    There is probably an error in the program
    "SAPLKKBL".
    This program is triggered in the update task. There, the
    following ABAP/4 statements are not allowed:
    -  CALL SCREEN
    -  CALL DIALOG
    -  CALL TRANSACTION
    -  SUBMIT
    Error in
    "POSTING_ILLEGAL_STATEMENT" " "
    "SAPLKKBL" or "LKKBLU01"
    "K_KKB_LIST_DISPLAY"
    Regards
    Manohar S

    Short text
    Statement "CALL SCREEN" is not allowed in this form.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "SAPLKKBL" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    There is probably an error in the program
    "SAPLKKBL".
    This program is triggered in the update task. There, the
    following ABAP/4 statements are not allowed:
    -  CALL SCREEN
    -  CALL DIALOG
    -  CALL TRANSACTION
    |    -  SUBMIT       
    Information on where terminated
    Termination occurred in the ABAP program "SAPLKKBL" - in "K_KKB_LIST_DISPLAY".
    The main program was "RSM13000 ".
    In the source code you have the termination point in line 441
    of the (Include) program "LKKBLU01".
    |    The program "SAPLKKBL" was started in the update system.    
    This is the dump

  • Problem with Call Transaction opt-RACOMMIT = 'X'.

    Hello Experts
    I am having a problem with call transction. I am calling a Z transaction in function module. Within the Z transaction I am furhter calling some function modules and doing commit work and then some more processing  after the comit work inside  So to make sure the code after comit work is fired I am using opt-RACOMMIT = 'X' in call transaction. Whenever I set this parameter opt-RACOMMIT = 'X' call transaction fails and gives error saying No batch Input data for screen XXXX. However the Z tcode processed succesfully.
    By changing the Mode to E i found that it remians at the last screen of call transction after executing the Z transaction and never comes back 
    But if I donot use RACOMMIT = 'X'  everything is fine. Please let me know if anyone came across such problem. Any help will be apreciated.
    Thanks,
    kamal

    Hello,
    as you said, if there is more than commit statement in your ztransaction, then you should put RACOMMIT to 'X'.
    I think the problem is in your bdcdata: change it to be sure to get back to the 1st screen of your ztransaction. Then, at this point (1st screen) hit "back" button.
    Cordialement,
    Chaouki

  • Problem in Selection Screen.

    Dear Experts,
    I am facing a problem in Selection Screen.
    <b>I have 2 radio buttons ,</b>
    <b>Radio Button 1</b> - Choosing the file from desktop and
    <b>Radio Button 2</b> - Executing from Database
    Under Option1 - i have a <b>FILE</b> parameter which is <b><u>Mandatory.</u></b>
    Problem Case -
    <b>when I choose option 2, Option 1 should be disabled. in the sense the file name which is mandatory here should not be mandatory . Currently, when i choose option 2 - i have to provide some dummy characters in the file parameter because the file parameter is mandatory, and <u><b>I want to avoid this.</b></u>
    Please see the entire code .</b>
    REPORT ZTEST.
    DATA: LV_FILE_PATH(20) TYPE  C.
    DATA: LV_MASK(20)      TYPE  C VALUE   ',*.XLS ,*.XLS.     '.
    *-- Macro to put radiobutton on selection screen
    *-- &1 - radiobutton parameter name
    *-- &2 - text element (description)
    *-- &3 - radiobutton group
    DEFINE MAKE_RADIOBUTTON.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
    * From Config File
    MAKE_RADIOBUTTON RB_1  ALL_DATA SRC.
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
    * Config file from Presentation server
    PARAMETERS: P_FILE1   LIKE T390D-DBNAME  OBLIGATORY. "
    SELECTION-SCREEN END OF BLOCK A1.
    * From database table
    MAKE_RADIOBUTTON RB_2 INC_DOWN SRC.
    SELECTION-SCREEN END OF BLOCK A0.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE1.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                QUERY  = 'CD'  "// Current Directory
           IMPORTING
                RETURN = LV_FILE_PATH.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                DEF_FILENAME     = 'TA_DOWNLOAD.MDB'
                DEF_PATH         = LV_FILE_PATH
                MASK             = LV_MASK
                MODE             = 'O'
           IMPORTING
                FILENAME         = P_FILE1
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
    INITIALIZATION.
      ALL_DATA = 'From Desktop     : ? '.
      INC_DOWN = 'From Database    : ?'.
      T000     = 'Configuration Upload'.
    Please help
    Thanks

    Hi
    You should do some modifications like these:
    DEFINE MAKE_RADIOBUTTON_1.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3 USER-COMMAND &4.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    DEFINE MAKE_RADIOBUTTON_2.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
    From Config File
    MAKE_RADIOBUTTON_1 RB_1  ALL_DATA SRC AAA.
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
    Config file from Presentation server
    PARAMETERS: P_FILE1   LIKE T390D-DBNAME MODIF ID FIL. "
    SELECTION-SCREEN END OF BLOCK A1.
    From database table
    MAKE_RADIOBUTTON_2 RB_2 INC_DOWN SRC.
    SELECTION-SCREEN END OF BLOCK A0.
    AT SELECTION-SCREEN OUTPUT.
      IF RB_2 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FIL'.
            SCREEN-ACTIVE = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Max

  • How to go back to calling screen???

    Hi experts,
    I had modified the Exit MV45AFZZ to display pop up message when we save a sales order.
    Now user after giving all the input in VA01 will go for SAVE button and after which pop up will occur.
    Now my problem is after displaying message it should come to same screen of sales order and with all the input data as user had mentioned.
    Please help as its very urgent for me.
    All the answers will be appreciated.
    Thanks.
    Saurabh.

    hi,
    You insert a screen sequence using the CALL SCREEN <nnnn> statement.
    Note: Layers created in this way must be removed afterwards. You can do this by setting the next screen
    statically or dynamically to the initial value (0) an the end of the inserted screen sequence.
    To interrupt processing of the current screen and branch to a new screen (or sequence of screens), use
    the CALL SCREEN <nnnn> statement. The screen <nnnn> must belong to the same program.
    In the program, the system constructs a stack. The stack has to be destroyed before the end of the
    program.
    To return to the statement following the CALL SCREEN statement, you can use either SET SCREEN 0.
    LEAVE SCREEN. or LEAVE TO SCREEN 0. The screen that called the other screen is then processed
    further.
    If you use the above statements outside a call chain, the program terminates, and control returns to the
    point from which it was called. You can also terminate a program using the ABAP statement LEAVE
    PROGRAM.
    Hope this helps, Do reward.

  • Problem with sub-screen actions on Cancel button

    Hi all,
    I have a problem with sub-screen.
    I created a subscreen (screen sequence in MM01/MM02/MM03). When users leave this screen, I call POPUP_TO_CONFIRM to ask if they want to save the data.
    1) My goal is: when they choose Cancel, no actions are performed and users will see the current screen. However, I cannot use command: SET SCREEN 0 or LEAVE TO SCREEN 0 because the system gives an error message:
    *SET SCREEN not allowed in subscreens*.
    2) How can we determine when the user leaves the screen? which value of SY-UCOMM will be used to check this?
    Thanks in advance.

    for dis SET SCREEN is not required.
    Consider d code given below as n eg:
    CALL FUNCTION 'POPUP_TO_CONFIRM'
        EXPORTING
          titlebar              = 'SAVE'
          text_question         = 'SOME _QUS'
          text_button_1         = 'YES'
          text_button_2         = 'NO'
          default_button        = '2'
          display_cancel_button = ' '
        IMPORTING
          answer                = l_ans
        EXCEPTIONS
          text_not_found        = 1
          OTHERS                = 2.
      IF sy-subrc <> 0.
        MESSAGE e066.
      ENDIF.
    IF l_ans EQ '1'.    " when yes is pressed
       MODIFY db.
       commit work.
       leave program.
    ELSEIF l_ans EQ '2'.  "when no is pressed
        leave program.
    ELSE.     " when cancel is pressed
    ENDIF.
    In above module when Yes is pressed it saves data den leave prog.
    As no action is specified for cancel button it will remain on that screen only from which popup is called, in this way ur problem can be solved.
    Reward properly.

Maybe you are looking for