AT selection-screen : Processed 2 times!

I do have a selection screen
and event at-selection-screen.
Some checkbox with usercommand
When box is uncheck something has to be done but it is done 2 times!
any idea +?

My selection screens are generated by another program
Here is the generated code!
REPORT main_****.
CALL SCREEN 0005.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN  .
SELECTION-SCREEN BEGIN OF BLOCK b_plan WITH FRAME TITLE box_plan.
SELECTION-SCREEN PUSHBUTTON /01(20) p_9360 USER-COMMAND pl_9360.
SELECTION-SCREEN PUSHBUTTON 26(20) p_0031 USER-COMMAND pl_0031.
SELECTION-SCREEN PUSHBUTTON 51(20) p_7320 USER-COMMAND pl_7320.
SELECTION-SCREEN PUSHBUTTON 76(20) p_7460 USER-COMMAND pl_7460.
SELECTION-SCREEN PUSHBUTTON /01(20) p_0030 USER-COMMAND pl_0030.
SELECTION-SCREEN PUSHBUTTON 26(20) p_3250 USER-COMMAND pl_3250.
SELECTION-SCREEN PUSHBUTTON 51(20) p_4350 USER-COMMAND pl_4350.
SELECTION-SCREEN PUSHBUTTON /01(20) p_6150 USER-COMMAND pl_6150.
SELECTION-SCREEN PUSHBUTTON 26(20) p_0035 USER-COMMAND pl_0035.
SELECTION-SCREEN PUSHBUTTON 51(20) p_4370 USER-COMMAND pl_4370.
SELECTION-SCREEN PUSHBUTTON /01(20) p_0007 USER-COMMAND pl_0007.
SELECTION-SCREEN PUSHBUTTON 26(20) p_7440 USER-COMMAND pl_7440.
SELECTION-SCREEN PUSHBUTTON 51(20) p_4360 USER-COMMAND pl_4360.
SELECTION-SCREEN END OF BLOCK b_plan .
SELECTION-SCREEN END OF SCREEN 100.
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b_stat WITH FRAME TITLE box_stat.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 01(20) pstt_01
FOR FIELD pst_01.
PARAMETERS pst_01 AS CHECKBOX DEFAULT 'X' USER-COMMAND pst_01.
SELECTION-SCREEN COMMENT 26(20) pstt_05
FOR FIELD pst_05.
PARAMETERS pst_05 AS CHECKBOX DEFAULT 'X' USER-COMMAND pst_05.
SELECTION-SCREEN COMMENT 51(20) pstt_08
FOR FIELD pst_08.
PARAMETERS pst_08 AS CHECKBOX DEFAULT 'X' USER-COMMAND pst_08.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 01(20) pstt_03
FOR FIELD pst_03.
PARAMETERS pst_03 AS CHECKBOX DEFAULT 'X' USER-COMMAND pst_03.
SELECTION-SCREEN COMMENT 26(20) pstt_06
FOR FIELD pst_06.
PARAMETERS pst_06 AS CHECKBOX DEFAULT 'X' USER-COMMAND pst_06.
SELECTION-SCREEN COMMENT 51(20) pstt_10
FOR FIELD pst_10.
PARAMETERS pst_10 AS CHECKBOX DEFAULT 'X' USER-COMMAND pst_10.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 01(20) pstt_04
FOR FIELD pst_04.
PARAMETERS pst_04 AS CHECKBOX DEFAULT 'X' USER-COMMAND pst_04.
SELECTION-SCREEN COMMENT 26(20) pstt_07
FOR FIELD pst_07.
PARAMETERS pst_07 AS CHECKBOX DEFAULT 'X' USER-COMMAND pst_07.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b_stat .
SELECTION-SCREEN END OF SCREEN 200.
SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b_licha WITH FRAME TITLE box_lich.
DATA : g_licha TYPE mch1-licha.
SELECT-OPTIONS : so_licha FOR g_licha.
SELECTION-SCREEN END OF BLOCK b_licha .
SELECTION-SCREEN END OF SCREEN 300.
SELECTION-SCREEN BEGIN OF SCREEN 333 AS SUBSCREEN.
SELECTION-SCREEN INCLUDE BLOCKS b_stat.
SELECTION-SCREEN INCLUDE BLOCKS b_licha.
SELECTION-SCREEN INCLUDE BLOCKS b_plan.
SELECTION-SCREEN END OF SCREEN 333.
SELECTION-SCREEN BEGIN OF SCREEN 666 AS SUBSCREEN.
SELECTION-SCREEN END OF SCREEN 666.
SELECTION-SCREEN BEGIN OF SCREEN 999 AS SUBSCREEN.
SELECTION-SCREEN END OF SCREEN 999.
SELECTION-SCREEN BEGIN OF SCREEN 0005.
SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR
17
LINES,
    TAB (20) button1 USER-COMMAND push1 DEFAULT SCREEN 333,
    TAB (20) button2 USER-COMMAND push2 DEFAULT SCREEN 666,
    TAB (20) button3 USER-COMMAND push3 DEFAULT SCREEN 999,
                  END OF BLOCK mytab.
SELECTION-SCREEN END OF SCREEN 0005.
INITIALIZATION.
  SET  PF-STATUS 'STAT'.
  sy-title = '-= [ MDi Cockpit ] =-'.
  TABLES zvmdi16. RANGES : r_status FOR zvmdi16-zzmdistat.
  r_status-sign = 'I'. r_status-option = 'EQ'.
  MOVE 'ACB' TO p_9360.
  MOVE 'Avilés' TO p_0030.
  MOVE 'Cockerill Sambre' TO p_6150.
  MOVE 'EKO Stahl GmbH' TO p_0007.
  MOVE 'Etxebarri' TO p_0031.
  MOVE 'Galvalange' TO p_3250.
  MOVE 'Gijón' TO p_0035.
  MOVE 'Sagunto' TO p_7440.
  MOVE 'Sidmar' TO p_7320.
  MOVE 'Sollac Atlantique' TO p_4350.
  MOVE 'Sollac Lorraine' TO p_4370.
  MOVE 'Sollac Méditerranée' TO p_4360.
  MOVE 'Stahlwerke Bremen' TO p_7460.
  MOVE '01-Initialized' TO pstt_01.
  MOVE '01' TO r_status-low. APPEND r_status.
  MOVE '03-Send to Plant' TO pstt_03.
  MOVE '03' TO r_status-low. APPEND r_status.
  MOVE '04-Analysis by Plant' TO pstt_04.
  MOVE '04' TO r_status-low. APPEND r_status.
  MOVE '05-Pending at Plant' TO pstt_05.
  MOVE '05' TO r_status-low. APPEND r_status.
  MOVE '06-Updated for Leverage' TO pstt_06.
  MOVE '06' TO r_status-low. APPEND r_status.
  MOVE '07-Wait for new MDI Message' TO pstt_07.
  MOVE '07' TO r_status-low. APPEND r_status.
  MOVE '08-Returned to Leverage' TO pstt_08.
  MOVE '08' TO r_status-low. APPEND r_status.
  MOVE '10-Ignore MDI Message' TO pstt_10.
  MOVE '10' TO r_status-low. APPEND r_status.
AT SELECTION-SCREEN OUTPUT.
  MOVE 'Vendor Batch' TO %_so_licha_%_app_%-text.
  MOVE 'Plant' TO box_plan.
  MOVE 'MDi Status' TO box_stat.
  MOVE ' Main Selection ' TO button1 .
  MOVE ' Status Information ' TO button2 .
  MOVE ' Error Information ' TO button3 .
AT SELECTION-SCREEN.
  IF sy-ucomm CS 'PL_'.
    IF r_status[] IS INITIAL.
      MESSAGE e398(00) WITH 'No Status have been selected!'.
    ELSE.
      SUBMIT zvl_mdi_errorwf_plant
            WITH s_licha IN so_licha
            WITH s_plant = sy-ucomm+3
            WITH s_status IN r_status
      AND RETURN.
    ENDIF.
  ELSEIF sy-ucomm CS 'PST_'.
    DELETE r_status WHERE low = sy-ucomm+4.
    IF sy-subrc NE 0.
      MOVE  sy-ucomm+4(2) TO r_status-low. APPEND r_status.
    ENDIF.
    CLEAR sy-ucomm.
  ENDIF.

Similar Messages

  • Accessing WS data set during selection screen processing in BG processing

    Hello ABAPers,
    I am attempting to access a working storage table variable that is set during selection screen processing after the user submits the program to background processing (using F9).
    I have tried using export to memory id in the at selection screen section and then import from memory id in the start-of-selection section, but it does not seem to work all of the time.  Is there a better way of doing this?
    Thanks

    bump

  • Can Selection Screen processing events be triggered manually?

    Good day!
    I have a Selection Screen where a user can select a value from a drop-down box.  If a particular value is used, I assign default text to another Selection Screen field.
    However, because choosing the drop-down value doesn't trigger a Selection Screen processing event (AT SELECTION-SCREEN and AT SELECTION-SCREEN OUTPUT) the value doesn't get updated on the screen field, even though it gets updated in memory.  It only updates on the screen if the user selects a radio button value for another field because that triggers the Selection Screen processing events.
    I've read about various methods in an attempt to get this to work, but nothing is working.  Is there ANY way to trigger SAP to go to these events?
    Thanks, and points for all helpful advice!
    Dave

    Hi dave,
    1. Selecting a listbox on selection screen,
        and immediately populating a field value on the screen.
    2. just copy paste to get a taste of it.
    3.
    REPORT ABC.
    TYPE-POOLS : VRM.
    DATA : VALUES TYPE VRM_VALUES.
    DATA : VW LIKE LINE OF VALUES.
    DATA : FLAG TYPE C.
    PARAMETERS : LIST TYPE C AS LISTBOX VISIBLE LENGTH 10
    <b>USER-COMMAND ABC.</b>
    PARAMETERS : A(10) TYPE C.
    INITIALIZATION.
      VW-KEY = '1'.
      VW-TEXT = 'SUN'.
      APPEND VW TO VALUES.
      VW-KEY = '2'.
      VW-TEXT = 'MON'.
      APPEND VW TO VALUES.
      VW-KEY = '3'.
      VW-TEXT = 'TUE'.
      APPEND VW TO VALUES.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID              = 'LIST'
          VALUES          = VALUES
        EXCEPTIONS
          ID_ILLEGAL_NAME = 1
          OTHERS          = 2.
    <b>AT SELECTION-SCREEN  OUTPUT.
    A = LIST.</b>
    regards,
    amit m.

  • Selection screen processing in Module pool

    Dear Friends,
    I am preparing a module pool, in which from one screen, i have to call a selection screen. I want to define this selection screen in the same program. Under which event block, i can define this selection screen?
    Once its called, how can i process the selection screen ( like START-OF-SELECTION etc ?). If i use a LEAVE TO LIST-PROCESSING to display some output, how can i process the user actions in this list?
    Thanking you in anticipation.
    Deepak

    HI Max,
    Thanks a lot for your reply. It was really helpfull. But my problem is not yet solved.
    When i call the selection screen from the PBO of a screen, the selection screen is not being displayed. Only the blank screen is displayed. So i tried another way. I put the CALL SELECTION-ECREEN  statement in the USER_COMMAN_100 module of PAI of the previous screen. (ie when user choose a button from the tool bar, in the initial screen the selection screen will be displayed.)
    module user_command_0100 input.
      OK_SAVE = OK100.
      CLEAR OK100.
      CASE OK_SAVE.
        WHEN 'LIST'.
          CALL SELECTION-SCREEN 200.
          IF SY-SUBRC = 0.
            PERFORM PROCESS_LIST.
          ELSE.
            leave screen.
          ENDIF.
    endmodule.                 " USER_COMMAND_0100  INPUT
    form process_list.
    ... reading database...
    IF SY-SUBRC = 0.
      LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 100.
      SET PF-STATUS 'GUI_LIST'.
        LOOP AT ITAB.
          WRITE :/ ITAB-BUKRS, ITAB-BELNR, ITAB-GJAHR.
        ENDLOOP.
      LEAVE SCREEN.
      ENDIF.
    endform.                    " PROCESS_LIST
    Now i have two problems to solve.
    1. I want to come back to the same selection screen (screen no 200) instead of screen 100, when the user click 'back' button in the list. but if i specify screen no 200 in
    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 100.
    it gives runtime error. ( Msg: Selection screen ZTEST3 0200 was not called using CALL SELECTION-SCREEN). How to return back to selection screen?
    and
    2. If the user selects a line from the list(PICK/F2), that value has to be passed to the input field of first screen( ie the initial screen from where i called the selection screen : screen no 100) For this, where can i write the code to process the user actions in the list?
    Thanking you in anticipation
    Deepak

  • Selection screen processing

    Hello,
    I want to update a selection screen field according to the values of two others. The two other field values wait for pressing Enter before passing their values. But I want to get the values of these fields when the focus is changed to the third field which I want to update. Which processing block should I use?
    Thx,
    Ali

    write the code as follows..
    initialization.
          ur code......
    at selection-screen output.
         loop at screen.
               check ur condition.
               modify screen.
         endloop.
    reward points please..

  • Selections Screen Processing

    I have a selection screen with several select-options, most of which
    allow multiple selections and/or ranges.
    These selection crietera have to be used to retrieve data for
    a report.  I can generate a first SQL statement to retrieve all
    the records meeting the top-level selection criteria.  And then I would
    have to filter the data using several loops to apply the other
    selection criteria.  I could also create one or more views in the dictionary
    to reduce the need for this loop processing.
    What is the best way to proceed?

    Depend on ur database then you can decide ,You could write Normal select query with having join select query .
    Please take up in internal table only 3 tables for each join query and if you take more than 3 tables and it would be performance issue.
    and also try to use for all entries and it gives better option.

  • AT SELECTION-SCREEN - Urgent

    Could anybody tell me what does the event( AT SELECTION-SCREEN ) only do ? I am asking only about AT SELECTION-SCREEN
                                                           Regards,
                                                           SAURAV  LAHIRY

    hI,
    At selection-screen is the event of a report program in which we have to validate the selection screen fields.
    SELECTION SCREEN
    Selection screens are special screens that are defined with the help of ABAP statements. As programmers do not have access to the flow logic of selection screens, they cannot define dialog modules for selection screens. The ABAP runtime environment fully controls the processing flow of selection screens. To allow programmers to modify the selection screen before it is called (PBO) and react to user actions on the selection screen (PAI), the ABAP runtime environment generates a number of special selection screen events before the selection screen is displayed and after the user has executed actions on the selection screen
    AT SELECTION-SCREEN OUTPUT
    This event is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION . Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified values.
    Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the input/output attributes of selection screen fields.
    Example
    SELECT-OPTIONS NAME FOR SY-REPID MODIF ID XYZ.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    CHECK SCREEN-GROUP1 = 'XYZ'.
    SCREEN-INTENSIFIED = '1'.
    MODIFY SCREEN.
    ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST
    The event is triggered when the user calls the F4 help for the field field. If no corresponding event block has been defined, no possible values help or values list from the Dictionary is displayed. If a corresponding event block exists, it takes precedence over the default possible values help mechanism. It is then up to the programmer to ensure in the event block that an appropriate list of values is displayed, and that the user can choose a value from it.
    No event block AT SELECTION-SCREEN ON VALUE-REQUEST can be created for input fields on the selection screen that are declared within the logical database used. You cannot override the input help mechanism of the logical database within the executable program. You can define separate help within the logical database program using the VALUE-REQUEST option in the PARAMETERS and SELECT-OPTIONSstatements.
    Example
    INCLUDE DBXYZSEL
    PARAMETERS PL_TYPE LIKE SAPLANE-PLANETYPE VALUE-REQUEST.
    REPORT SAPDBXYZ DEFINING DATABASE XYZ.
    TABLES SAPLANE.
    FORM PL_TYPE_VAL.
    CALL FUNCTION ...
    ENDFORM.
    AT SELECTION-SCREEN ON HELP-REQUEST
    If the data type of an input field declared in an executable program is defined in the ABAP Dictionary, the documentation of the underlying data element is automatically displayed if the user positions the cursor in that field and presses F1. To create help for input fields that have no Dictionary reference, or to override the help normally linked to the field, you can create an event block for the event
    AT SELECTION-SCREEN ON HELP-REQUEST FOR <field>
    The event is triggered when the user calls the F1 help for the field <field>. If no corresponding event block has been defined, the help from the ABAP Dictionary is displayed, or none at all if the field has no Dictionary reference. If a corresponding event block exists, it takes precedence over the default help mechanism. It is then up to the programmer to ensure that appropriate help is displayed.
    You cannot declare the event block AT SELECTION-SCREEN ON HELP-REQUEST for input fields on the selection screen that are declared within a logical database. You cannot override the help mechanism of a logical database within the program. You can define separate help within the logical database program using the HELP-REQUEST option in the PARAMETERS and SELECT-OPTIONS statements.
    REPORT SELECTION_SCREEN_F1_DEMO.
    PARAMETERS: P_CARR_1 TYPE S_CARR_ID,
    P_CARR_2 TYPE S_CARR_ID.
    AT SELECTION-SCREEN ON HELP-REQUEST FOR P_CARR_2.
    CALL SCREEN 100 STARTING AT 10 5
    ENDING AT 60 10.
    This program declares a selection screen with two parameters that both refer to the data element S_CARR_ID in the ABAP Dictionary. The documentation from the ABAP Dictionary is used for P_CARR_1, and a help screen 100 is called for P_CARR_2. The help screen is defined in the Screen Painter as a modal dialog box with next screen 0. It contains the help text defined as help texts. The screen does not require any flow logic.
    AT SELECTION-SCREEN ON field
    In the PAI event of the selection screen, the event
    AT SELECTION-SCREEN ON field
    event is triggered. The input field field can be checked in the corresponding event block. If an error message occurs within this event block, the corresponding field is made ready for input again on the selection screen.
    Example:
    REPORT event_demo.
    NODES spfli.
    AT SELECTION-SCREEN ON city_fr.
    IF carrid-low EQ 'AA' AND city_fr NE 'NEW YORK'.
    MESSAGE e010(hb).
    ENDIF.
    If the user enters “AA” in the first input field, but not NEW YORK for the departure city, an error message is displayed in the status line until the user enters the correct city.
    AT SELECTION-SCREEN ON RADIOBUTTON
    In the PAI event of the selection screen, the event
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP <radi>
    is triggered when the contents of all of the fields in a radio button group are passed from the selection screen to the ABAP program. To define a radio button group <radi>, use the addition RADIOBUTTON GROUP <radi> in the corresponding PARAMETERS statements. This event block allows you to check the whole group. If an error message occurs within this event block, the radio button group is made ready for input again on the selection screen. The individual fields of radio button groups do not trigger the event AT SELECTION-SCREEN ON <field>.
    REPORT EVENT_DEMO.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',
    R2 RADIOBUTTON GROUP RAD1,
    R3 RADIOBUTTON GROUP RAD1.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    PARAMETERS: R4 RADIOBUTTON GROUP RAD2 DEFAULT 'X',
    R5 RADIOBUTTON GROUP RAD2,
    R6 RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN END OF BLOCK B2.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
    IF R1 = 'X'.
    MESSAGE W040(HB).
    ENDIF.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD2.
    IF R4 = 'X'.
    MESSAGE W040(HB).
    ENDIF.
    If the user does not change one of the radio button groups, a warning is displayed.
    AT SELECTION-SCREEN ON BLOCK
    In the PAI event of the selection screen, the event
    AT SELECTION-SCREEN ON BLOCK <block>
    is triggered when the contents of all of the fields in a block are passed from the selection screen to the ABAP program. You define a block by enclosing the declarations of the elements in the block between the statements SELECTION-SCREEN BEGIN OF BLOCK <block> and SELECTION-SCREEN END OF BLOCK <block>. You can use this event block to check the consistency of the input fields in the block. If an error message occurs within this event block, the fields in the block are made ready for input again on the selection screen.
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • Selection Screen Parameter behaving strangely.

    This one is too weird to believe.  Here's what's happening.  I have a normal abap list report with a checkbox parameter.  I set the value to 'X' initialization and it works the first time the selection screen is presented.  Upon running the program I turn off the checkbox.  I want the value to be re-initialized to 'X' whenever the selection screen appears.  The problem is when F3 is pressed on the list screen, the initialization is invoked and the parameter set to 'X' but the selection screen appears without the checkbox selected.  I have verified this through the debugger.  Is there a better to change the values of selection screen parameters?

    Hello Scott,
    I'm not sure if you know about this, so I would explain it to you.
    In case of selection-screen processing, the UCOMM value is to be obtained from the structure SSCRFIELDS, as against the structure SY(ST) in case of normal screen processing.
    Consider the following code snippet.
    ====================================================
    tables sscrfields.
    parameters : p_check          as checkbox.
    data        :w_do_not_reset type flag.
    at selection-screen output.
      if w_do_not_reset eq space.
        p_check = 'X'.
      endif.
    at selection-screen.
      if sscrfields-ucomm eq space.
        w_do_not_reset = 'X'.
      else.
        clear w_do_not_reset.
      endif.
    start-of-selection.
      write : p_check.
    ====================================================
    As the example illustrates, we need to declare the structure SSCRFIELDS with a tables statement and use the value of SSCRFIELDS-UCOMM.
    Hope this helps.
    Regards,
    Anand Mandalika.
    P.S. : If you are satisfied with the solution, please award the points.

  • Selection-screen output , initialaization confusion

    we have selectionscreen output, initialization events
    first initializatuion,
    than at selection-screen output
    execute it, than we pressed f3 came bact  to  selection-screen
    than which event  ll trigger
    thank you
    kals.

    The different events in a report Program are:
    Load-of-program
    Triggers the associated event in an internal session after loading a program of type 1, M, F, or S. Also runs the associated processing block once and once only for each program and internal session. The processing block LOAD-OF-PROGRAM has roughly the same function for an ABAP program of type 1, M, F or S as a constructor has for classes in ABAP Objects
    Initialization.
    This event is executed before the selection screen is displayed .
    Initialization of all the values.
    You can assign different values other than the values defaulted on the selection screen .
    You can fill your selection screen with some values at runtime.
    At Selection-Screen.
    The event is processed when the selection screen has been processed (at the end of PAI ).
    Validation & Checks of inputted values happen here
    Extras :
    …ON VALUE-REQUEST FOR psel_low_high .
    The pushbutton for F4 (Possible entries) appears beside the appropriate field.
    ... ON HELP-REQUEST FOR psel_low_high
    . ... OUTPUT
    This event is executed at PBO of the selection screen every time the user presses ENTER
    Start-of-Selection.
    Here the program starts selecting values from tables.
    End-of-selection.
    After all the data has been selected this event writes the data to the screen.
    Interactive Events
    Used for interactive reporting. It is used to create a detailed list from a basic list.
    Events in an ABAP/4 Report Program
    Start-Of-Selection
    Processing block is executed after processing the selection screen
    All the data is selected in this block.
    All the main processing on the data except for interactive reporting is handled in this block.
    End-Of-Selection
    Data which is selected and has been processed is printed to the screen in this block.
    List Processing happens in this block
    Top-of-Page.
    New-Page.
    End-of-Page.
    Events during List Processing
    Top-of-Page.
    Triggered by the first write statement in the program
    It is used to have a standard header in the program for all the pages.
    TOP-OF-PAGE is only executed before outputting the first line on a new page
    New-Page.
    Can be used when one wants to display different data on different pages
    Terminates the current page and continues output on a new page.
    Will not trigger the Top-of-Page or End-of-Page.
    End-of-Page.
    It is used to have a standard footer for all the pages.
    Triggered by the program if the number of records exceed the line-count of the program.
    Hope u understood....

  • Call Selection Screen

    Hi,
    can any one give me good links for
    All variants of at selection screen..
    some thing on call selection screen
    Thx,
    Shashi

    ·     AT SELECTION-SCREEN
    You should only perform very expensive checks with AT SELECTION-SCREEN if the program is then started. Here, you can read the system field SSCRFIELDS-UCOMM (provided a statement TABLES SSCRFIELDS exists). If the field has one of the values 'ONLI' (= Execute) or 'PRIN' (= Execute and Print), the report is then started, i.e. the selection screen is closed and the processing continues with START-OF-SELECTION.
         Additions:
    ·     ... ON psel
    Effect
    This event is assigned to the selection screen fields corresponding to the report parameter or selection criterion psel.
    If the report starts an error dialog at this point, precisely these fields become ready for input.
    ·     ... ON END OF sel
              For each selection criterion sel on the selection screen, you can call a further screen by pressing a pushbutton. On this screen, you can enter any number of single values and ranges for the selection criterion sel..
    When this screen has been processed (i.e. at the end of PAI for this screen), the event AT SELECTION-SCREEN ON END OF sel is executed.
    At this point, all the values entered are available in the internal table sel.
    ·     ... ON VALUE-REQUEST FOR psel_low_high
    Effect
    In this addition, the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH, where sel is the name of a selection criterion. The effect of this is twofold:
    1.     The possible entries pushbutton for F4 appears beside the appropriate field.
    2.     When the user activates this pushbutton or presses F4 for the field, the event is executed. You can thus implement a self-programmed possible entries routine for the input/output fields of the selection screen. If the program contains such an event and the user presses F4, the system processes this rather than displaying the check table or the fixed values of the Dictionary field.
    ·     ... ON HELP-REQUEST FOR psel_low_high
    Effect
    As with the addition ON VALUE-REQUEST the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH, where sel is the name of a selection criterion. When the user presses F1 on the relevant field, the subsequent processing block is executed. You can thus implement a self-programmed help for the input/output fields of the selection screen. If the program contains such an event and the user presses F1, the system processes this rather than displaying the documentation of the Dictionary field - even if the report parameter or the selection option with LIKE or FOR points to a Dictionary field.
    ·     ... ON RADIOBUTTON GROUP radi
    Effect
    This event is assigned to the radio button groups on the selection screen defined by PARAMETERS par RADIOBUTTON GROUP radi.  If the report starts at an error  dialog at this point ,precisely these fields of the radio button group
    radi become ready for input again.
    ·     ... ON BLOCK block
    Effect
    This event is assigned to the blocks on the selection screen defined by SELECTION-SCREEN BEGIN/END OF BLOCK block. If the report starts at an error
    dialog at this point, precisely these fields of the block block become ready for input again.
         The events assigned to the radio button groups are executed according to the first parameter of the radio button group.
    The events assigned to the blocks are executed "from the inside to the outside".
    ·     ... OUTPUT
    Effect
    This event is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION. Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified  values. Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the inout/output attributes of selection screen fields. 
    ·     ... ON EXIT-COMMAND
    Effect
    This event is executed at the exit command of the selection screen - that is, at Back, Cancel, or End,events executed after the screen is sent that do not cause the system to check the input and execute the PAI.
    plz reward if useful
    vivek

  • Sizing of selection screen

    Hi,
    How to make a small selection-screen rather than default one.
    Thanks in advance,
    Rao

    HI,
        You can create user-defined selection screens in executable programs (reports), function modules and module pools. There are three ways how user-defined selection screens can be called.
    Call From a Program
    From any program in which selection screens are defined, you can call these screens at any point of the program flow using the following statement:
    CALL SELECTION-SCREEN <numb> [STARTING AT <x1> <y 1>]
    [ENDING AT <x2> <y 2>].
    This statement calls selection screen number <numb>. The selection screen called must be defined in the calling program either as the standard selection screen (screen number 1000) or as a user-defined selection screen (any screen number). You must always use CALL SELECTION-SCREEN to call selection screens, and not CALL SCREEN. If you use CALL SCREEN, the system will not be able to process the selection screen.
    You can display a user-defined selection screen as a modal dialog box using the STARTING AT and ENDING AT additions. This is possible even if you have not used the AS WINDOW addition in the definition of the selection screen. However, you are recommended to do so, since warnings and error messages that occur during selection screen processing will then also be displayed as modal dialog boxes (see example below).
    When it returns from the selection screen to the program, the CALL SELECTION-SCREEN statement sets the return value SY-SUBRC as follows:
    SY-SUBRC = 0 if the user has chosen Execute on the selection screen
    SY-SUBRC = 4 if the user has chosen Cancel on the selection screen
    Any time a selection screen is processed, the selection screen events are triggered. System field SY-DYNNR of the associated event blocks contains the number of the selection screen that is currently active.
    REPORT SELSCREENDEF.
    SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TIT1.
      PARAMETERS: CITYFR LIKE SPFLI-CITYFROM,
    CITYTO LIKE SPFLI-CITYTO.
    SELECTION-SCREEN END OF BLOCK SEL1.
    SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
      SELECTION-SCREEN INCLUDE BLOCKS SEL1.
      SELECTION-SCREEN BEGIN OF BLOCK SEL2
    WITH FRAME TITLE TIT2.
        PARAMETERS: AIRPFR LIKE SPFLI-AIRPFROM,
    AIRPTO LIKE SPFLI-AIRPTO.
      SELECTION-SCREEN END OF BLOCK SEL2.
    SELECTION-SCREEN END OF SCREEN 500.
    INITIALIZATION.
      TIT1 = 'Cities'.
    AT SELECTION-SCREEN.
      CASE SY-DYNNR.
        WHEN '0500'.
          MESSAGE W159(AT) WITH 'Screen 500'.
        WHEN '1000'.
          MESSAGE W159(AT) WITH 'Screen 1000'.
      ENDCASE.
    START-OF-SELECTION.
      TIT1 = 'Cities for Airports'.
      TIT2 = 'Airports'.
      CALL SELECTION-SCREEN 500 STARTING AT 10 10.
    TIT1 = 'Cities again'.
      CALL SELECTION-SCREEN 1000 STARTING AT 10 10.
    This executable program contains definitions for the standard selection screen and the user-defined screen number 500. Selection screen 500 is defined to be displayed as a modal dialog box and contains the SEL1 block of the standard selection screen. Note the phase in which the titles of the screens are defined. For the purpose of demonstration, the program calls warning messages with message class AT during the AT SELECTION-SCREEN event.
    reward if helpful.
    regards,
    kiran kumar k

  • At Selection-screen Events!

    Hi!
      Pls tell me the order of selection screen events in sequence
    Pls give some sample program for validation of selection screen i/p without using search helps.
      Thanks

    Hi Rahul
    Basic form
    AT SELECTION-SCREEN.
    Additions
    1. ... ON psel
    2. ... ON END OF sel
    3. ... ON VALUE-REQUEST FOR psel_low_high .
    4. ... ON HELP-REQUEST FOR psel_low_high
    5. ... ON RADIOBUTTON GROUP radi
    6. ... ON BLOCK block
    7. ... OUTPUT
    Effect
    This event only makes sense in reports, i.e. in programs set to type 1 in the attributes. Type 1 programs are started via a logical database and always have a selection screen where the user can specify the database selections.
    The event is processed when the selection screen has been processed (at the end of PAI ).
    If an error message ( MESSAGE Emnr ) is sent during the event, all fields on the selection screen become ready for input.
    After further user input, AT SELECTION-SCREEN is executed again.
    Note
    You should only perform very expensive checks with AT SELECTION-SCREEN if the program is then started (not every time the user presses ENTER). Here, you can read the system field SSCRFIELDS-UCOMM (provided a statement TABLES SSCRFIELDS exists). If the field has one of the values 'ONLI' (= Execute) or 'PRIN' (= Execute and Print), the report is then started, i.e. the selection screen is closed and the processing continues with START-OF-SELECTION . Remember that the selection screen (and thus also AT SELECTION-SCREE N ) is also processed in variant maintenance and with SUBMIT VIA JOB . You can determine which of these applies by calling the function module RS_SUBMIT_INFO .
    Addition 1
    ... ON psel
    Effect
    This event is assigned to the selection screen fields corresponding to the report parameter or selection criterion psel .
    If the report starts an error dialog at this point, precisely these fields become ready for input.
    Addition 2
    ... ON END OF sel
    Effect
    For each selection criterion sel on the selection screen, you can call a further screen by pressing a pushbutton. On this screen, you can enter any number of single values and ranges for the selection criterion sel .
    When this screen has been processed (i.e. at the end of PAI for this screen), the event AT SELECTION-SCREEN ON END OF sel is executed.
    At this point, all the values entered are available in the internal table sel .
    Addition 3
    ... ON VALUE-REQUEST FOR psel_low_high
    Effect
    With this addition, the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH , where sel is the name of a selection criterion. The effect of this is twofold:
    The pushbutton for F4 (Possible entries) appears beside the appropriate field.
    When the user selects this pushbutton or presses F4 for the field, the event is executed. You can thus implement a self-programmed possible entries routine for the input/output fields of the selection screen. If the program contains such an event and the user presses F4 , the system processes this rather than displaying the check table or the fixed values of the Dictionary field - even if the report parameter or the selection option with LIKE or FOR points to a Dictionary field. You can, for example, use the CALL SCREEN statement to display a selection list of possible values. The contents of the field psel_low_high at the end of this processing block are copied to the appropriate input/output field.
    This addition is only allowed with report-specific parameters (PARAMETERS ) or selection options (SELECT-OPTIONS ). For database-specific parameters or selection options, you can achieve the same effect by using the addition VALUE-REQUEST FOR ... with the key word PARAMETERS or SELECT-OPTIONS in the include DBxyzSEL (where xyz = name of logical database). In this case, you must program the value help in the database program SAPDBxyz .
    Addition 4
    ... ON HELP-REQUEST FOR psel_low_high
    Effect
    As with the addition ON VALUE-REQUEST the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH , where sel is the name of a selection criterion. When the user presses F1 on the relevant field, the subsequent processing block is executed. You can thus implement a self-programmed help for the input/output fields of the selection screen. If the program contains such an event and the user presses F1 , the system processes this rather than displaying the documentation of the Dictionary field - even if the report parameter or the selection option with LIKE or FOR points to a Dictionary field.
    This addition is only allowed with report-specific parameters (PARAMETERS ) or selection options (SELECT-OPTIONS ). For database-specific parameters or selection options, you can achieve the same effect by using the addition HELP-REQUEST FOR ... with the key word PARAMETERS or SELECT-OPTIONS in the include DBxyzSEL (where xyz = name of logical database). In this case, you must program the help in the database program SAPDBxyz .
    Addition 5
    ... ON RADIOBUTTON GROUP radi
    <u><b>Effect</b></u>
    This event is assigned to the radio button groups on the selection screen defined by PARAMETERS par RADIOBUTTON GROUP radi .
    If the report starts an error dialog at this point, precisely these fields of the radio button group radi become ready for input again.
    <b>
    Addition 6</b>
    ... ON BLOCK block
    Effect
    <b><i>This event is assigned to the blocks on the selection screen defined by SELECTION-SCREEN BEGIN/END OF BLOCK block .
    If the report starts an error dialog at this point, precisely these fields of the block block become ready for input again.</i></b>
    <u><b>Note</b></u>
    In which sequence are the events AT SELECTION-SCREEN ON psel ... , AT SELECTION-SCREEN ON RADIOBUTTON GROUP ... , AT SELECTION-SCREEN ON BLOCK ... , AT SELECTION-SCREEN processed?
    <i>The AT SELECTION-SCREEN ON psel ... events assigned to the parameters or selection options are executed in the sequence they are declared in the program, i.e. in the sequence they appear on the selection screen.
    The events assigned to the radio button groups are executed according to the first parameter of the radio button group.
    The events assigned to the blocks are executed "from the inside to the outside".</i>
    <b>Example</b>
    SELECT-OPTIONS SEL0 FOR SY-TVAR0.
    SELECTION-SCREEN BEGIN OF BLOCK BL0.
    SELECT-OPTIONS SEL1 FOR SY-TVAR1.
    SELECTION-SCREEN BEGIN OF BLOCK BL1.
    PARAMETERS P0 RADIOBUTTON GROUP RADI.
    PARAMETERS P1 RADIOBUTTON GROUP RADI.
    SELECTION-SCREEN BEGIN OF BLOCK BL2.
    PARAMETERS P3.
    SELECTION-SCREEN END   OF BLOCK BL2.
    SELECT-OPTIONS SEL2 FOR SY-TVAR2.
    SELECTION-SCREEN END   OF BLOCK BL1.
    SELECTION-SCREEN END   OF BLOCK BL0.
    <b>Sequence:</b>
    AT SELECTION-SCREEN ON...
    SEL0
    SEL1
    RADIOBUTTON GROUP RADI
    P3
    BLOCK BL2
    SEL2
    BLOCK BL1
    BLOCK BL0
    AT SELECTION-SCREEN is executed at the very end.
    <b>Addition 7</b>
    ... OUTPUT
    <u>Effect</u>
    <b>This event is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION . Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified values.
    Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the input/output attributes of selection screen fields.</b>
    <u><b>Example</b></u>
    <b>Output all fields of the
    SELECT-OPTION NAME
    highlighted:</b>
    SELECT-OPTIONS NAME FOR SY-REPID MODIF ID XYZ.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
         CHECK SCREEN-GROUP1 = 'XYZ'.
         SCREEN-INTENSIFIED = '1'.
         MODIFY SCREEN.
      ENDLOOP.
    <i><b>The addition MODIF ID XYZ to the key word SELECT-OPTIONS assigns all fields of the selection option NAME to a group you can read in the field SCREEN-GROUP1 . At PBO of the selection screen, all these fields are then set to highlighted.
    </b></i>
    check these links
    http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/10/e7dbde82ba11d295a40000e8353423/content.htm
    Reward all helpfull answers
    Regards
    Pavan

  • Init & at selection screen o/p

    hi !
    i need the difference between
    initialization and at selection-screen output   events.
    please explain with an example.
    points will be awarded!

    At selection screen o/pevent is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION . Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified values.
    Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the input/output attributes of selection screen fields.
    Example
    Output all fields of the SELECT-OPTION NAME highlighted:
        SELECT-OPTIONS NAME FOR SY-REPID MODIF ID XYZ.
        AT SELECTION-SCREEN OUTPUT.
          LOOP AT SCREEN.
            CHECK SCREEN-GROUP1 = 'XYZ'.
            SCREEN-INTENSIFIED = '1'.
            MODIFY SCREEN.
          ENDLOOP.
    Executed before the selection screen is displayed.
    The parameters (PARAMETERS ) and selection criteria (SELECT-OPTIONS ) defined in the program already contain default values (if specified). You can assign different values here and also change the database-specific selections.
    In contrast to R/2 , this event is also executed during background processing.
    Example
    Define the last day of the previous month as the key date:
        PARAMETERS QUAL_DAY TYPE D DEFAULT SY-DATUM.
        INITIALIZATION.
          QUAL_DAY+6(2) = '01'.
          QUAL_DAY      = QUAL_DAY - 1.
    Here, the default value of QUAL_DAY is the current date, e.g. 05.04.88 ( QUAL_DAY = '19880405'). Two subseqent statements set the date first to the beginning of the month, e.g. 01.04.88 ( QUAL_DAY = '19880401') and then, by subtracting one day, to the last day of the previous month, e.g. 31.03.88 ( QUAL_DAY = '19880331').
    Note
    In more precise terms, INITIALIZATION is executed in the following steps:
    Specify default values for the selections. Execute the event INITIALIZATION. Import variant (if used to start the report). On SUBMIT , the values specified for each WHERE clause are also transferred, if necessary. Execute the event AT SELECTION-SCREEN OUTPUT , if it occurs in the report (unlike INITIALIZATION , this event is always executed for PBO of a selection screen). Display selection screen. Transport the screen fields containing user input to the report fields. Continue with START-OF-SELECTION .

  • Select-screen problem

    Hi all
    I have create one selection screen as follows
      SELECTION-SCREEN BEGIN OF SCREEN 1001 ."AS WINDOW.
      SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TEXT-101.
      SELECT-OPTIONS  :  SO_PLANT  FOR  ZTAB_PP_PARAM-ZPLANT NO INTERVALS NO-EXTENSION OBLIGATORY.
      SELECTION-SCREEN END OF BLOCK B0 .
      SELECTION-SCREEN END OF SCREEN 1001.
    and call in follows
      CALL SELECTION-SCREEN  1001 STARTING AT 5 5  ENDING AT 50 2.
    its working properly
    my problem if in the appear window has scroll in there end.
    if i removed Block part its working
    you can check Tcode CEWB that is standred code inthe bigining nice window displayed  i want to create that type window. 
    please try to help me.

    Hi,
    Call From a Program
    From any program in which selection screens are defined, you can call these screens at any
    point of the program flow using the following statement:
    CALL SELECTION-SCREEN <numb> [STARTING AT <x1> <y1>]
    [ENDING AT <x2> <y2>].
    This statement calls selection screen number <numb>. The selection screen called must be
    defined in the calling program either as the standard selection screen (screen number 1000) or
    as a user-defined selection screen (any screen number). You must always use CALL
    SELECTION-SCREEN to call selection screens, and not CALL SCREEN. If you use CALL
    SCREEN, the system will not be able to process the selection screen.
    You can display a user-defined selection screen as a modal dialog box using the STARTING AT
    and ENDING AT additions. This is possible even if you have not used the AS WINDOW addition
    in the definition of the selection screen. However, you are recommended to do so, since
    warnings and error messages that occur during selection screen processing will then
    also be displayed as modal dialog boxes (see example below).
    When it returns from the selection screen to the program, the CALL SELECTION-SCREEN
    statement sets the return value SY-SUBRC as follows:
      SY-SUBRC = 0 if the user has chosen Execute on the selection screen
      SY-SUBRC = 4 if the user has chosen Cancel on the selection screen
    Any time a selection screen is processed, the selection screen events are triggered.
    System field SY-DYNNR of the associated event blocks contains the number of the selection
    screen that is currently active.
    REPORT SELSCREENDEF.
    SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TIT1.
    PARAMETERS: CITYFR LIKE SPFLI-CITYFROM,
    CITYTO LIKE SPFLI-CITYTO.
    SELECTION-SCREEN END OF BLOCK SEL1.
    SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
    SELECTION-SCREEN INCLUDE BLOCKS SEL1.
    SELECTION-SCREEN BEGIN OF BLOCK SEL2
    WITH FRAME TITLE TIT2.
    PARAMETERS: AIRPFR LIKE SPFLI-AIRPFROM,
    AIRPTO LIKE SPFLI-AIRPTO.
    SELECTION-SCREEN END OF BLOCK SEL2.
    SELECTION-SCREEN END OF SCREEN 500.
    INITIALIZATION.
    TIT1 = 'Cities'.
    AT SELECTION-SCREEN.
    CASE SY-DYNNR.
    WHEN '0500'.
    MESSAGE W159(AT) WITH 'Screen 500'.
    WHEN '1000'.
    MESSAGE W159(AT) WITH 'Screen 1000'.
    ENDCASE.
    START-OF-SELECTION.
    TIT1 = 'Cities for Airports'.
    TIT2 = 'Airports'.
    CALL SELECTION-SCREEN 500 STARTING AT 10 10.
    TIT1 = 'Cities again'.
    CALL SELECTION-SCREEN 1000 STARTING AT 10 10.
    This executable program contains definitions for the standard selection screen and
    the user-defined screen number 500. Selection screen 500 is defined to be displayed
    as a modal dialog box and contains the SEL1 block of the standard selection screen.
    Note the phase in which the titles of the screens are defined. For the purpose of
    demonstration, the program calls warning messages with message class AT during
    the AT SELECTION-SCREEN event.
    When you start the program, the following sequence of screens is displayed:
    1. The standard selection screen. If the user chooses Execute, the system displays
    the warning SCREEN 1000 in the status bar.
    2. Once the user has confirmed the warning by choosing Enter, selection screen 500
    is called as a modal dialog box. When the user chooses Execute, the system
    displays the warning SCREEN 500, also in a dialog box.
    3. When the user has confirmed this warning, the standard selection screen is called
    again, but this time as a modal dialog box. Since you cannot define the standard
    selection screen as a modal dialog box, the warning message displayed when the
    user chooses Execute appears in the status bar and not as a modal dialog box.
    Consequently, you can only exit this selection screen using Cancel, since there is no
    Enter function in the dialog box to confirm the warning message.
    Regards,
    Bhaskar

  • Issue with tabbed block in selection screen

    Hi All,
    I have created a report program with the following code.
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    PARAMETERS: p1 TYPE c LENGTH 10.
    SELECTION-SCREEN END OF SCREEN 100.
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    PARAMETERS: q1 TYPE c LENGTH 10.
    SELECTION-SCREEN END OF SCREEN 200.
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                      TAB (20) button1 USER-COMMAND push1,
                      TAB (20) button2 USER-COMMAND push2,
                      END OF BLOCK mytab.
    INITIALIZATION.
      button1 = 'Selection Screen 1'.
      button2 = 'Selection Screen 2'.
      mytab-prog = sy-repid.
      mytab-dynnr = 0100.
      mytab-activetab = 'PUSH1'.
    AT SELECTION-SCREEN.
      CASE sy-dynnr.
        WHEN 1000.
          CASE sy-ucomm.
            WHEN 'PUSH1'.
              mytab-dynnr = 100.
            WHEN 'PUSH2'.
              mytab-dynnr = 200.
          ENDCASE.
      ENDCASE.
    Execute the program and click on the second tab-page. Now, click on the 'Execute' button or press F8 (there is no specific functionality coded here).
    The issue now is that the first tab-page is displayed, instead of the second tab remaining displayed. I require the navigation to remain within the second tab-page after the EXECUTE button is clicked.
    Could someone help me out with this issue?
    Regards,
    Dinup
    Edited by: Dinup Sudhakaran on Feb 18, 2008 1:40 PM

    Hi,
    Go through below document with example code.
    It will help you.
    Tabstrip Controls on Selection Screens
    As with screens, you can now use tabstrip controls on selection screens. To do this, you must define a tabstrip area and the associated tab pages, and assign a subscreen to the tab pages. You do not have to (indeed, cannot) declare the tabstrip control or program the screen flow logic in your ABAP program, since both are automatically generated.
    To define a tabstrip area with tab pages, use the following statements in your selection screen definition:
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK <tab_area> FOR <n> LINES,
                      TAB (<len>) <tab1> USER-COMMAND <ucom1>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      TAB (<len>) <tab2> USER-COMMAND <ucom2>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      END OF BLOCK <tab_area>.
    This defines a tabstrip control <tab_area> with size <n>. The tab pages <tab1>, <tab2>… are assigned to the tab area. <len> defines the width of the tab title. You must assign a function code <ucom> area to each tab title. You can find out the function code from the field SY-UCOMM in the AT SELECTION-SCREEN event.
    For each tab title, the system automatically creates a character field in the ABAP program with the same name. Before the selection screen is displayed, you can assign a text to the field. This then appears as the title of the corresponding tab page on the selection screen.
    You must assign a subscreen to each tab title. This will be displayed in the tab area when the user chooses that title. You can assign one of the following as a subscreen:
    A subscreen screen defined using the Screen Painter.
    A selection screen subscreen, defined in an ABAP program.
    You can make the assignment either statically in the program or dynamically at runtime. If, at runtime, one of the tab titles has no subscreen assigned, a runtime error occurs.
    Static assignment
    Use the DEFAULT addition when you define the tab title. You can specify an ABAP program and one of its subscreens. If you do not specify a program, the system looks for the subscreen in the current program. When the user chooses the tab title, it is activated, and the subscreen is assigned to the tabstrip area. The static assignment is valid for the entire duration of the program, but can be overwritten dynamically before the selection screen is displayed.
    Dynamic assignment
    For each tab area, the system automatically creates a structure in the ABAP program with the same name. This structure has three components – PROG, DYNNR, and ACTIVETAB. When you assign the subscreens statically, the structure contains the name of the ABAP program containing the subscreen, the number of the subscreen, and the name of the tab title currently active on the selection screen (and to which these values are assigned). The default active tab page is the first page. You can assign values to the fields of the structure before the selection screen is displayed, and so set a subscreen dynamically.
    If you assign a normal subscreen screen to a tab title, the dialog modules containing its flow logic must be defined in the current ABAP program. If the subscreen is a selection screen, user actions will trigger the AT SELECTION-SCREEN event and its variants (see Selection Screen Processing). This includes when the user chooses a tab title. If one selection screen is included on another, AT SELECTION-SCREEN will be triggered at least twice – firstly for the "included" selection screen, then for the selection screen on which it appears.
    REPORT demo_sel_screen_with_tabstrip.
    DATA flag(1) TYPE c.
    SUBSCREEN 1
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p1(10) TYPE c,
                p2(10) TYPE c,
                p3(10) TYPE c.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF SCREEN 100.
    SUBSCREEN 2
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
    PARAMETERS: q1(10) TYPE c OBLIGATORY,
                q2(10) TYPE c OBLIGATORY,
                q3(10) TYPE c OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF SCREEN 200.
    STANDARD SELECTION SCREEN
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                      TAB (20) button1 USER-COMMAND push1,
                      TAB (20) button2 USER-COMMAND push2,
                      TAB (20) button3 USER-COMMAND push3
                                       DEFAULT SCREEN 300,
                      END OF BLOCK mytab.
    INITIALIZATION.
      button1 = text-010.
      button2 = text-020.
      button3 = text-030.
      mytab-prog = sy-repid.
      mytab-dynnr = 100.
      mytab-activetab = 'BUTTON1'.
    AT SELECTION-SCREEN.
      CASE sy-dynnr.
        WHEN 1000.
          CASE sy-ucomm.
            WHEN 'PUSH1'.
              mytab-dynnr = 100.
              mytab-activetab = 'BUTTON1'.
            WHEN 'PUSH2'.
              mytab-dynnr = 200.
              mytab-activetab = 'BUTTON2'.
          ENDCASE.
        WHEN 100.
          MESSAGE s888(sabapdocu) WITH text-040 sy-dynnr.
        WHEN 200.
          MESSAGE s888(sabapdocu) WITH text-040 sy-dynnr.
      ENDCASE.
    MODULE init_0100 OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'MOD'.
          CASE flag.
            WHEN 'X'.
              screen-input = '1'.
            WHEN ' '.
              screen-input = '0'.
          ENDCASE.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      MESSAGE s888(sabapdocu) WITH text-050 sy-dynnr.
      CASE sy-ucomm.
        WHEN 'TOGGLE'.
          IF flag = ' '.
            flag = 'X'.
          ELSEIF flag = 'X'.
            flag = ' '.
          ENDIF.
      ENDCASE.
    ENDMODULE.
    START-OF-SELECTION.
      WRITE: / 'P1:', p1,'Q1:', q1,
             / 'P2:', p2,'Q2:', q2,
             / 'P3:', p3,'Q3:', q3.
    This program defines two selection screens – 100 and 200, as subscreens, and places a tabstrip control area with three tab pages on the standard selection screen. A subscreen screen 300 (from the same program) is assigned statically to the third tab page.
    The layout of screen 300 is:
    The input/output fields P1 to Q3 are defined by using the parameters from the ABAP program The pushbutton has the function code TOGGLE.
    The screen flow logic for screen 300 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE init_0100.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
    Both dialog modules are defined in the ABAP program.
    When you run the program, the standard selection screen appears. In the INITIALIZATION event, the texts are defined on the tab titles, the subscreen selection screen 100 is assigned to the tab area, and the first tab title is activated.
    User actions on the selection screen are processed in the AT SELECTION-SCREEN event block. In particular, it is here that the subscreens are assigned and tab titles activated when the user chooses one of the first two tab titles. This is not necessary for the third tab title, since the dynamic assignment (screen 300) is always placed in the structure MYTAB when the user chooses it.
    Before the subscreen screen is displayed, the PBO module INIT_100 is executed. User actions on the subscreen screen trigger the PAI module. This includes when the user chooses a tab title. After that, the AT SELECTION-SCREEN event is triggered.
    Messages in the status line show where an action has been processed.

Maybe you are looking for

  • Address bar too long

    How can I list addon icons in a row as in Firefox 30? See attached picture for detail. Update 1: If you customize icons, they will stand in a row, as expected. However they squeeze after firefox restart. Moving around search bar doesn't seem to help.

  • NW04s BI SPS 20 and ECC 6.0 SPS 16 - SP Update question

    Hi SDN, We are planning for SP update project. Our current landscape is NW04s BI SPS13 (BI ABAP), NW04s Portal SPS13 (BI Java),  and ECC SPS 11. All the common components like SAP_BASIS (SP13), SAP_BW(SP15), SAP_ABA(SP13) are in same SP level in all

  • Can I free transform individual buttons within the menu widget?

    When using the menu widget, 1. Is it possible to break individual buttons from their row/column and free transform them? 2. Could I delete an individual button while keeping the other buttons intact and not having to delete the page it was linked to?

  • How parse the wsdl types?

    Hi, I have created a wsdl parser with the wsdl4j that return the interface of my web service. If, for example, this is a part of my wsdl file: <definitions name="TemperatureService" targetNamespace="http://www.xmethods.net/sd/TemperatureService.wsdl"

  • Flash crashing, but won't uninstall from my Mac

    Flash is crashing when I try playing video in Safari, Firefox or Google Chrome. Chrome says that I have two almost identical versions of flash installed. I have downloaded the uninstaller - it completes and says it has uninstalled, but does absolutel