Title in a selection-screen

Hi.
How i can insert a title in this selection-screen:
SELECTION-SCREEN BEGIN OF BLOCK 2  WITH FRAME TITLE modifica.
PARAMETERS: manual RADIOBUTTON GROUP modf  DEFAULT 'X',
            fichero RADIOBUTTON GROUP modf.
SELECTION-SCREEN END OF BLOCK 2.
thanks.

http://help.sap.com/saphelp_nw04/helpdata/en/e4/2adbec449911d1949c0000e8353423/content.htm
Eg.
SELECTION-SCREEN BEGIN OF BLOCK BL_1 WITH FRAME TITLE TEXT-000.
SELECTION-SCREEN BEGIN OF BLOCK BL_7.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN END OF BLOCK BL_7.
SELECTION-SCREEN BEGIN OF BLOCK BL_2 WITH FRAME TITLE TEXT-001.
PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',
R2 RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK BL_2.
SELECTION-SCREEN END OF BLOCK BL_1.
The plant selection screen.
SELECTION-SCREEN BEGIN OF SCREEN 1111.
SELECTION-SCREEN BEGIN OF BLOCK BL_4 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS S_WERKS FOR MARC-WERKS NO INTERVALS.
SELECTION-SCREEN INCLUDE : SELECT-OPTIONS S_MATNR.
SELECTION-SCREEN END OF BLOCK BL_4.
SELECTION-SCREEN END OF SCREEN 1111.
*The sales selection screen.
SELECTION-SCREEN BEGIN OF SCREEN 2222.
SELECTION-SCREEN BEGIN OF BLOCK BL_5 WITH FRAME TITLE TEXT-000.
SELECT-OPTIONS S_VKORG FOR MVKE-VKORG NO INTERVALS.
SELECTION-SCREEN INCLUDE : SELECT-OPTIONS S_MATNR.
SELECTION-SCREEN END OF BLOCK BL_5.
SELECTION-SCREEN END OF SCREEN 2222.
START-OF-SELECTION.
IF R1 = 'X'.
CALL SELECTION-SCREEN 1111.
ELSEIF R2 = 'X'.
CALL SELECTION-SCREEN 2222.
ENDIF.
http://help.sap.com/saphelp_nw2004s/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/content.htm
reward  points  if it is usefull ..
Girish

Similar Messages

  • How can i set a Title to Parameters(Selection-Screen)?

    Hi,
    i have a Selection-Screen with two Parameters. Both Parameters should be have an Title.
    But how can I set a Title two this Parameters? Is there existing any options????
    For example, the Parameters "I_WRBTR" and "I_NBDOCS" needs two Title´s.
    Every Parameter must have a title, but how can I realize this???
    *I have know only a title for "IWRBTR" but i need also a title for "I_NBDOCS"*_.
    DATA: FIELD_BUKRS(10).
    SELECTION-SCREEN BEGIN OF SCREEN 0100.
      SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
         SELECT-OPTIONS SEL_BUKR FOR FIELD_BUKRS OBLIGATORY.
         SELECTION-SCREEN BEGIN OF LINE, COMMENT (25) text-005 FOR FIELD IWRBTR_, POSITION 33.
             PARAMETERS: I_WRBTR(10),
                                      I_NBDOCS(3).
         SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN END OF SCREEN 0100.
    Thanks for Helps.
    ETN

    Hi,
    try this short example:
    DATA: FIELD_BUKRS(10).
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK WITH FRAME TITLE T_BLOCK.
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE T_BLOCK1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (29) T_SEL_BU.
    SELECT-OPTIONS SEL_BUKR FOR FIELD_BUKRS OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BLOCK1.
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK2 WITH FRAME TITLE T_BLOCK2.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (32) T_WRBTR.
    PARAMETERS: I_WRBTR(10).
    SELECTION-SCREEN COMMENT 50(15) T_NBDOCS.
    PARAMETERS: I_NBDOCS(3).
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BLOCK2.
    SELECTION-SCREEN END OF BLOCK BLOCK.
    INITIALIZATION.
      T_BLOCK  = 'parameter'.
      T_BLOCK1 = '1. parameter'.
      T_BLOCK2 = '2. parameter'.
      T_SEL_BU = 'Buchungskreis'.
      T_WRBTR  = 'Parameter wrbtr'.
      T_NBDOCS = 'Parameter nbdocs'.
    Regards, Dieter

  • How to haveour own titles/captions in selection screen & in column headings

    we have SAP B1 2005 A, MS SQL 2005
    though i am new to MSSQL/T-SQL programming, purely through lot of trials & errors i have learnt & managed to develop many reports/queries !
    but, i am facing some problems : how to have our own captions/title for the options in selection screen & aso in reports/queries column headings.
    e.g. :
    for Customer Aging analysis, i would like to accept a set of 3 parameters (aging days) from the user. where the user may enter the values 30, 60 & 90 OR any other values.
    i have the following codes for this purpose (considering my question's (over) size, only small portions of my program are given below)
    declare @mdue1 int,
               @mdue2 int,
                @mdue3 int
    set @mdue1 = [%1]
    set @mdue2 = [%2]
    set @mdue3 = [%3]
    but, in the selection screen, the system displays "%1 Debit Amount   Greater than" as the caption & 0.00 as the default value. the same is the case for the other two parameters [%2] & [%3] also.
    i tried defining the variable @mdue1 as smallint & also tinyint, but the result is the same.
    how to have our own captions/title for the options in selection screen instead of the ones displayed by t-sql based on our SELECT statement.
    how to have our own column headings, dynamically defined/coined using variables instead of hard coded columns headings (within quotes).
    e.g. in the select statement, instead of defining a column as '<= 30 Days' = T0.due_1
    i would like to get the number of days from the user, who may enter 30 or 40 or whatever.
    i would like to display the value that the user entered in the column heading using a variable say @mcol1
    declare @mcol1 varchar(10)
    set @mcol1 = '<= 'convert(varchar(10), @mdue1)' Days'
    SELECT T0.CardCode,@mcol1 = T0.due_1 from #CustAging T0
    but, this ends up in error.
    i have already searched the net for ebooks, articles, etc. for a solution to this problem, but till now, i could not find any addressing these problems.
    i have just registered in this forum with a hope to get a solution. thanks a lot in advance.
    Thanks & Regards,
    Raghu Iyer
    Place : Vapi, Gujarat, India

    thanks a lot, lstvan.
    i think, it i a good "trick" worth trying out.
    well, i will now mark this question as answered, but still, if anyone has a direct solution "problem", please do share with us.
    i am able to write queries (in fact, full fledged programs) in T-SQL & getting the desired output and for such a trivial thing i do not want to go for an add-on SDK module. but, considering the limitations of T-SQL and the complex requirements of real business world, i think, we have to go the .net way only.
    regarding add-ons, i heard that add-ons will slow down SAP B1. is it true ?
    Thanks & Regards,
    Raghu iyer

  • Title + subtitle on selection screen?

    On executing the report that I am creating,
    the selection screen should show a title and a subtitle below the title.
    I put the title in the attributes of the report.
    How should I define the subtitle to appear below this title?
    ThX!

    Hi,
    As Thomas said, it's not possible. In your "simulated screen capture", above the application toolbar (it contains the buttons execute + info), you have 2 titles, but only the title bar area is available in the SAP GUI. I think the most probable is that the person who asked you to develop that selection screen has made an error. Note: I tried to use the GOS toolbox container which is located in the left of the title bar, by inserting an HTML control with 2 lines (small title + even smaller subtitle, as the height of the title bar can't be changed), and that gives something very ugly :-D
    Sandra

  • 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.

  • How to configure selection screen in report

    Hi all,
          could anyone help me in configuring the selection screen in the report.
    Advance Thanks
    Regards
    Guhapriyan

    Here is some basic code to generate a selection screen.
    tables: afko.
    selection-screen begin of block b1 with frame title text-001 .
    select-options: s_gltrp for afko-gltrp.
    parameters: p_gltrp type afko-gltrp.
    selection-screen begin of line.
    selection-screen comment (25) text-005.
    selection-screen position 33.
    parameters: p_pln as checkbox default ' '.
    selection-screen end of line.
    selection-screen end of block b1.
    selection-screen begin of block b2 with frame title text-004 .
    selection-screen begin of line.
    selection-screen comment (20) text-002.
    selection-screen position 33.
    parameters: p_det as checkbox default 'X'.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment (20) text-003.
    selection-screen position 33.
    parameters: p_sum as checkbox.
    selection-screen end of line.
    selection-screen end of block b2.
    Regards,
    Rich Heilman

  • Report should executed based on the radio buttons on the selection screen

    Hi everyone,
    Greets....................
    My scenario is I have 2 selection screen blocks on same screen..
    One selection screen block contains input parameters as follows
    Company Code  -  S_BUKRS
    Business Area -  S_GSBER
    Customer Code -  S_KUNNR
    Fiscal Area  -   S_GJAHR
    GL Account - S_HKONT
    Posting Date  -S_ZFBDT
    Ledger Type  -P_RLDNR
    Open Item Key Date -  P_ZFBDT
    Another selection screen block contains 2 radio buttons with the option as follows
    Collection Plan
    *Credit days summary.
    If i click Collection plan the report output should come based on the input parameters in first selection-screen block.
    If i click Credit days summary the report output should come based on the input parameters in first selection-screen block.
    Pls send me the sample code for this.
    Thanks in Advance
    Regards
    Raj kumar

    See the below folling example : it will have radio buttons and depends on radio button it will show output.
    REPORT ZPPR_BOM_INFOL_REPORT no standard page heading
                     line-size 160
                     line-count 60.
    ======================================================================
    Program Name : ZPPR_BOM_INFOL_REPORT
    Description  : This Program would be used for BOM List for a material*
                   and the component's where used list                   *
    Author       : Seshu                                                 *
    Date         : 07/24/2006                                            *
    MODIFICATION HISTORY                                                 *
    DATE    | AUTHOR   | CHANGE #   | DESCRIPTION OF MODIFICATION        *
    |----
    |----
    |----
    *12/04/06 | Seshu    | DEVK921821 | Removed new page for each material *
    ======================================================================
    Table definition                                                    *
    TABLES: mast,
            stko,
            stpo,
            T418,
            makt.
    TYPE - POOLS
    TYPE-POOLS: slis.
    Constants
    constants : c_tcode(4) type c value 'CS03',
                gc_formname_top_of_page TYPE slis_formname
                VALUE 'TOP_OF_PAGE'.
    Variables
    data : v_maktx like makt-maktx,
           wa_stko like stko.
    DATA:
    Objekttyp 'Material'
       otyp_mat(1) TYPE c VALUE '1',
       ootyp_mat(1) TYPE c VALUE 'M',
    Objekttyp 'kein Objekt'
       otyp_noo(1) TYPE c VALUE '2',
    Objekttyp 'Dokument'
       otyp_doc(1) TYPE c VALUE '3',
    Objekttyp 'Klasse'
       otyp_kla(1) TYPE c VALUE '4',
    Objekttyp 'Intramaterial'
       otyp_ntm(1) TYPE c VALUE '5'.
    maximal anzeigbare Menge
    data:   max_num(7)  TYPE p DECIMALS 3 VALUE '9999999999.999',
            ueberl_kz(1) TYPE c VALUE '*',
            min_num(7)  TYPE p DECIMALS 3 VALUE '9999999999.999-',
            b_flag(1) TYPE c VALUE 'X',
            ecfld(250) TYPE c,
            v_flag type c.
    ALV Variables
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
          gs_layout   TYPE slis_layout_alv,
          gs_keyinfo  TYPE slis_keyinfo_alv,
          gt_sp_group TYPE slis_t_sp_group_alv,
          gt_events   TYPE slis_t_event.
    DATA: g_repid LIKE sy-repid.
    DATA: gt_list_top_of_page TYPE slis_t_listheader,
                g_tabname_header TYPE slis_tabname,
                g_tabname_item   TYPE slis_tabname,
                g_save(1) TYPE c,
                gx_variant LIKE disvariant,
                g_variant LIKE disvariant,
                g_default(1) TYPE c,
                g_exit(1) TYPE c.
    Includes                                                             *
    INCLUDE .
    Internal Table Declaration                                           *
    DATA: t_mast LIKE STANDARD TABLE OF mast WITH HEADER LINE.
    *DATA: t_makt LIKE STANDARD TABLE OF makt WITH HEADER LINE.
    BOM Function module Related
    DATA: t_matcat  LIKE cscmat OCCURS 0 WITH HEADER LINE.
    Internal Table for Level by Level Function module
    DATA: t_stb  LIKE stpox OCCURS 0 WITH HEADER LINE.
    Get the Relevant data from FM
    DATA: BEGIN OF hd_tab OCCURS 0,
             stufe LIKE stpox-stufe,
             vwegx LIKE stpox-vwegx,
          END OF hd_tab.
    Final Output
    DATA: BEGIN OF alv_stb OCCURS 0.
            INCLUDE STRUCTURE stpox_alv.
    DATA:   info(3)   TYPE c,
          END OF alv_stb.
    DATA: BEGIN OF stb_orig.
            INCLUDE STRUCTURE stpox.
    DATA: END OF stb_orig.
    DATA: BEGIN OF stb_add.
            INCLUDE STRUCTURE stpol_add.
    DATA: END OF stb_add.
    Internal Table for STPO
    *-- BOM Line item
    TYPES: BEGIN OF ty_stpo,
           stlty TYPE stpo-stlty,
           stlnr TYPE stpo-stlnr,
           stlkn TYPE stpo-stlkn,
           stpoz TYPE stpo-stpoz,
           idnrk TYPE stpo-idnrk,
           meins TYPE stpo-meins,
           menge TYPE stpo-menge, "Component Qty
           END OF ty_stpo.
    DATA: t_stpo TYPE STANDARD TABLE OF ty_stpo WITH HEADER LINE.
    *-- BOM Header
    TYPES: BEGIN OF ty_stko,
           stlty TYPE stko-stlty,
           stlnr TYPE stko-stlnr,
           stlal TYPE stko-stlal,
           stkoz TYPE stko-stkoz,
           bmein TYPE stko-bmein,
           bmeng TYPE stko-bmeng,
           END OF ty_stko.
    DATA: t_stko TYPE STANDARD TABLE OF ty_stko WITH HEADER LINE .
    data : t_makt like makt occurs 0 with header line.
    DATA: BEGIN OF cl_clstab OCCURS 0,                          "YHG079407
             class LIKE klah-class,                             "YHG079407
             klart LIKE klah-klart,                             "YHG079407
             chked LIKE csdata-xfeld,                           "YHG079407
             noobj LIKE csdata-xfeld,                           "YHG079407
             dsply LIKE csdata-xfeld,                           "YHG079407
          END OF cl_clstab.
    *-- Header table
    TYPES: BEGIN OF ty_main_material,
           matnr TYPE mast-matnr, "Material
           werks TYPE mast-werks, "Plant
           maktx TYPE makt-maktx, "Description
           stlal TYPE mast-stlal, "Alternative BOM
           stlnr TYPE stko-stlnr, "BOM Number
           bmein TYPE stko-bmein, "UOM
           bmeng TYPE stko-bmeng, "Base Qty
           expand(1) TYPE c,      "Expanding Field
           END OF ty_main_material.
    DATA: t_main_material TYPE STANDARD TABLE OF ty_main_material WITH
          HEADER LINE.
    *-- Item (Component) Table
    TYPES: BEGIN OF ty_item_material,
           matnr TYPE mast-matnr, "Material
           werks TYPE mast-werks, "Plant
           idnrk TYPE stpo-idnrk, "Component (Material)
           maktx TYPE makt-maktx, "Description
           stlal TYPE mast-stlal, "Alternative BOM
           stlnr TYPE stpo-stlnr, "BOM Number
           meins TYPE stpo-meins, "UOM
           menge TYPE stpo-menge, "Base Qty
           END OF ty_item_material.
    DATA: t_item_material TYPE STANDARD TABLE OF ty_item_material WITH
          HEADER LINE.
    Selection Screen                                                     *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_werks LIKE marc-werks DEFAULT '1000' OBLIGATORY.
    SELECT-OPTIONS s_stlal FOR mast-stlal .
    SELECT-OPTIONS s_stlan FOR mast-stlan DEFAULT '1'.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_bomlst RADIOBUTTON GROUP g1 DEFAULT 'X'.
    SELECT-OPTIONS s_matnr FOR mast-matnr.
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_compon RADIOBUTTON GROUP g1.
    SELECT-OPTIONS: s_idnrk FOR stpo-idnrk.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF BLOCK b1.
    selection-screen begin of block b03 with frame title text-b03.
    selection-screen begin of line.
    selection-screen comment 1(40) text-005.
    parameters: p_all radiobutton group r1 default 'X'.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(40) text-006.
    parameters: p_one radiobutton group r1 .
    selection-screen end of line.
    selection-screen end of block b03.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS: p_vari LIKE disvariant-variant.
    SELECTION-SCREEN END OF BLOCK b3.
    At slection screen events                                            *
    *-- Process on value request
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
      PERFORM f4_for_variant.
    Intitialisation
    INITIALIZATION.
      g_repid = sy-repid.
      g_tabname_header = 'T_MAIN_MATERIAL'.
      g_tabname_item   = 'T_ITEM_MATERIAL'.
    *-- define keyinformation
      CLEAR gs_keyinfo.
      gs_keyinfo-header01 = 'MATNR'.
      gs_keyinfo-item01   = 'MATNR'.
      PERFORM e03_eventtab_build USING gt_events[].
      PERFORM e04_comment_build  USING gt_list_top_of_page[].
      PERFORM e07_sp_group_build USING gt_sp_group[].
      PERFORM e08_layout_build   USING gs_layout.
    Set Options: save variants userspecific or general
      g_save = 'A'.
      PERFORM variant_init.
    Get default variant
      gx_variant = g_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save     = g_save
           CHANGING
                cs_variant = gx_variant
           EXCEPTIONS
                not_found  = 2.
      IF sy-subrc = 0.
        p_vari = gx_variant-variant.
      ENDIF.
    S T A R T - O F - S E L E C T I O N *******************
    start-of-selection.
      if p_all = 'X'.
    Get the data from MAST and MAKT Table
        if p_bomlst = 'X'.
      Get the data Based On Material #
          perform get_data.
        else.
      Get the data Based On Component
          perform get_data_component.
        endif.
      else.
    Get the Single Level Report
    *-- Moved the fiedl catalog here inorder to change the layout based on
    *-- Selection
        PERFORM e01_fieldcat_init  USING gt_fieldcat[].
        PERFORM select_data.
      endif.
    E N D - O F - S  E  L  E  C  T  I  O  N *******************
    end-of-selection.
      if p_one = 'X'.
        perform alv.
      endif.
    User Command
    at line-selection.
    Interactive to CS03 Transaction
      case sy-ucomm.
        when 'PICK' or 'F2'.
          if not alv_stb-idnrk is initial .
            if not alv_stb-werks is initial.
              if not alv_stb-objty is initial.
                SET PARAMETER ID 'MAT' FIELD alv_stb-idnrk.
                SET PARAMETER ID 'WRK' FIELD alv_stb-werks.
                SET PARAMETER ID 'CSV' FIELD alv_stb-OBJTY.
                call transaction c_tcode and skip first screen.
              endif.
            endif.
          endif.
          clear alv_stb.
      endcase.
    *&      Form  get_data
          Get data from MAST and MAKT Table
    FORM get_data.
      data : wa_lines type sy-index.
      REFRESH : T_MAST,
                t_STB,
                t_MATCAT,
                alv_STB.
      CLEAR : T_MAST,
                t_STB,
                t_MATCAT,
                alv_STB.
    Get the data from MAST Table
    Get all the information from MAST - BOM Table
      SELECT * FROM mast INTO TABLE t_mast WHERE matnr IN s_matnr AND
                                                 werks = p_werks  AND
                                                 stlan IN s_stlan AND
                                                 stlal IN s_stlal.
      describe table t_mast lines  wa_lines.
      if wa_lines is initial.
        Write:/2 'List contains no data'.
        stop.
      endif.
      loop at t_mast.
        clear : v_maktx.
    Start of change  Seshu
    Reason - Remove the new page option
        if sy-tabix ne 1.
          skip 1.
        endif.
    End of Change  Seshu
    Get the material Description
        select single maktx from makt into  v_maktx
                                 where matnr = t_mast-matnr
                                 and   spras = 'E'.
    Get the material details from STKO Table
        select single * from stko into wa_stko
                        where STLTY = 'M'
                        and   STLNR = t_mast-stlnr
                        and   STLAL = t_mast-stlal.
    Main Header for Each Material
        format color 5 on.
        write:/2 'Material',20 'Material Description',65 'Alternative BOM',
             90 'Base Qty', 115 'Base Unit'.
        format color 5 off.
        format color 1 on.
        write:/2 t_mast-matnr,20 v_maktx,65 wa_stko-STLAL, 85 wa_stko-BMENG,
               115 wa_stko-BMEIN.
        format color 1 off.
    Use the Function Module and get the format level by level
        perform get_level_level.
      endloop.
    ENDFORM.                    " get_data
    Top of page                                                  *
    top-of-page.
      perform report_header .
    *&      Form  report_header
          text
    -->  p1        text
    <--  p2        text
    FORM report_header.
      new-page line-size 160 .
      format color col_heading intensified on.
      write:/ sy-uline(160) .
    *--- Write Company Name.
      perform calc_col_and_write using    text-h00
                                          sy-linsz.
    *--- Write Report Title.
      perform calc_col_and_write using    sy-title
                                          sy-linsz.
    *--- Write User Id, Date / Time, Program Id, Page etc.
      perform write_other_hdr_details.
      write:/ sy-uline(160) .
    ENDFORM.                    " report_header
    *&      Form  calc_col_and_write
          text
         -->P_TEXT_H00  text
         -->P_SY_LINSZ  text
    FORM calc_col_and_write USING    P_TEXT
                                     P_LINSZ.
      data: col1 type i,
             col2 type i,
              len  type i,
              str  type i.
      str  = strlen( p_text ).
      col1 = ( p_linsz / 2 ) - ( str / 2 ) .
      len  = p_linsz - col1 - 2.
      write: at  /1  '|'.
      write: at  col1 p_text,
             at  sy-colno(len) space.
      write  at  160 '|'.
    ENDFORM.                    " calc_col_and_write
    *&      Form  write_other_hdr_details
          text
    -->  p1        text
    <--  p2        text
    FORM write_other_hdr_details.
      data: col1 type i,
              col2 type i,
              len  type i.
      col1 = 3.
      write:/1 '|'.
      write: at  col1 'UserId  : ',
                      sy-uname.
      len = sy-linsz - 1.
      write at sy-colno(len) space.
      col2 = sy-linsz - 18.
      write: at col2 'Date: ',
                     sy-datum mm/dd/yyyy.
      write: at sy-linsz '|'.
      write:/1 '|'.
      write: at  col1 'ReportId: ',
                      sy-repid.
      write at sy-colno(len) space.
      col2 = sy-linsz - 18.
      write: at col2 'Page: ',
                      sy-pagno.
      write: at sy-linsz '|'.
    ENDFORM.                    " write_other_hdr_details
    *&      Form  get_data_component
          Get the data based on Component level
    FORM get_data_component.
      data wa_lines type i.
    *-- Get the BOM item details
      SELECT  stlty stlnr stlkn stpoz idnrk meins menge
              FROM stpo
              INTO TABLE t_stpo
      WHERE   idnrk IN s_idnrk.
      IF sy-subrc = 0.
        CLEAR wa_lines.
        DESCRIBE TABLE t_stpo LINES wa_lines.
        IF wa_lines > 0.
          SELECT  stlty stlnr stlal stkoz bmein bmeng
                  FROM stko
                  INTO TABLE t_stko
                  FOR ALL ENTRIES IN t_stpo
          WHERE stlnr = t_stpo-stlnr.
          CLEAR wa_lines.
          DELETE ADJACENT DUPLICATES FROM t_stko COMPARING ALL FIELDS.
          DESCRIBE TABLE t_stko LINES wa_lines.
          IF wa_lines > 0.
    *-- Get the BOM item details
            SELECT * FROM mast INTO TABLE t_mast FOR ALL ENTRIES IN t_stko
                                                WHERE werks = p_werks  AND
                                                  stlnr = t_stko-stlnr
                                                  and stlal in s_stlal.
          ENDIF.
        ENDIF.
      else.
        Write:/2 'List contains no data'.
        stop.
      endif.
      loop at t_mast.
        clear : v_maktx.
    Start of change  Seshu
    Reason - Remove the new page option
        if sy-tabix ne 1.
          skip 1.
        endif.
    End of change    Seshu
    Get the material Description
        select single maktx from makt into  v_maktx
                                 where matnr = t_mast-matnr
                                 and   spras = 'E'.
    Get the material details from STKO Table
        select single * from stko into wa_stko
                        where STLTY = 'M'
                        and   STLNR = t_mast-stlnr
                        and   STLAL = t_mast-stlal.
    Main Header for Each Material
        format color 5 on.
        write:/2 'Material',20 'Material Description',65 'Alternative BOM',
             90 'Base Qty', 115 'Base Unit'.
        format color 5 off.
        format color 1 on.
        write:/2 t_mast-matnr,20 v_maktx,65 wa_stko-STLAL, 85 wa_stko-BMENG,
               115 wa_stko-BMEIN.
        format color 1 off.
    Use the Function Module and get the format level by level
        perform get_level_level.
        clear : t_mast.
      endloop.
    ENDFORM.                    " get_data_component
    *&      Form  obj_ident
          text
    FORM obj_ident.
    weder Mat noch Doc
      CHECK: T_stb-objty NE otyp_mat,
             T_stb-objty NE ootyp_mat,
             T_stb-objty NE otyp_doc,
             T_stb-objty NE otyp_ntm.
    ?T418-WA schon ok
    nein
      IF T_stb-postp NE t418-postp.
        T418 einlesen
        PERFORM t418_lesen USING T_stb-postp.
      ENDIF.
      PERFORM cl_clstab_maint.
    ?MatNr-Eingabe bei diesem PosTyp moeglich
      und keine Textposition
    trifft zu
      IF     t418-matin NE '-'
         AND t418-txpos IS INITIAL.
        aktuelles Objekt ist Material NLAG
        T_stb-objty = '1'.
        PosKurztext in ObjKurztext uebernehmen.
        T_stb-ojtxp = T_stb-potx1.
        MODIFY T_stb.
      ELSE.
        IF T_stb-objty IS INITIAL.
          T_stb-objty = '2'.
          MODIFY T_stb.
        ENDIF.
      ENDIF.
    ENDFORM.                    " obj_ident
    *&      Form  t418_lesen
          text
         -->P_T_STB_POSTP  text
    FORM t418_lesen USING   lkl_postp LIKE stpo-postp.
    T418-WA initialisieren
      CLEAR:
         t418.
    Key angeben
      t418-postp = lkl_postp.
    PosTypDefinition lesen
      READ TABLE t418.
    ENDFORM.                    " t418_lesen
    *&      Form  cl_clstab_maint
          text
    FORM cl_clstab_maint.
    nur fuer Klassenpositionen
      CHECK t_STB-OBJTY EQ OTYP_KLA.
    Teilkey der Klassenpositionentabelle
      CL_CLSTAB-CLASS = t_STB-CLASS.
      CL_CLSTAB-KLART = t_STB-KLART.
    Klassenpositionentabelle lesen
      READ TABLE CL_CLSTAB
         WITH KEY CL_CLSTAB(21)
         BINARY SEARCH.
    aktuelle Klassenposition bereits in Klassenpositionentabelle
    nein
      IF SY-SUBRC <> 0.
        Klassenposition in Klassenpositionentabelle hinzufuegen
        INSERT CL_CLSTAB INDEX SY-TABIX.
      ENDIF.
    ENDFORM.                    " cl_clstab_maint
    *&      Form  alv_stb_prep
          Printing the data as LEVEL BY LEVEL
    FORM alv_stb_prep.
      CLEAR:
          alv_stb,
          stb_orig,
          stb_add.
      IF t_stb-hdnfo IS INITIAL.
        stb_orig = t_stb.
        IF t_stb-mngko >= max_num.
          stb_add-ovfls = ueberl_kz.
        ELSE.
          IF t_stb-mngko <= min_num.
            stb_add-ovfls = ueberl_kz.
          ELSE.
            CLEAR: stb_add-ovfls.
          ENDIF.
        ENDIF.
        IF NOT t_stb-xtlnr IS INITIAL.
          stb_add-bomfl = b_flag.
        ENDIF.
        IF    NOT t_stb-knobj IS INITIAL
           OR NOT t_stb-class IS INITIAL
           OR NOT t_stb-kzclb IS INITIAL.
          stb_add-knofl = 'X'.
        ENDIF.
      ELSE.
        CHECK t_stb-stufe > 1.
        alv_stb-info = 'C30'.
        IF t_stb-ttidx <> t_matcat-index.
          READ TABLE t_matcat INDEX t_stb-ttidx.
        ENDIF.
        stb_orig-hdnfo = t_stb-hdnfo.
        stb_orig-stufe = t_stb-stufe - 1 .
        stb_orig-ojtxp = t_stb-ojtxb.
        IF NOT t_stb-altst IS INITIAL.
          stb_orig-stlal = t_stb-stlal.
          IF stb_orig-stlal(1) EQ '0'.
            stb_orig-stlal(1) = ' '.
          ENDIF.
        ENDIF.
        stb_orig-idnrk = t_matcat-matnr.
      ENDIF.
      CLEAR:
        stb_add-dobjt,
        stb_add-objic.
      CASE t_stb-objty.
        WHEN otyp_mat.
          WRITE: stb_orig-idnrk TO ecfld.
          stb_add-objic = '@A6@'.
        WHEN 'M'.
          WRITE: stb_orig-idnrk TO ecfld.
          stb_add-objic = '@A6@'.
        WHEN otyp_noo.
          WRITE: stb_orig-potx1 TO ecfld.
          stb_add-objic = '@0Q@'.
        WHEN otyp_doc.
          write stb_orig-doknr to ecfld.                        "note 489354
          IF ecfld CP '*# '. ENDIF.                             "note 489354
          sy-fdpos = sy-fdpos + 1.                              "note 489354
          CONCATENATE
    *d      stb_orig-doknr                                      "note 489354
            stb_orig-dokar
            stb_orig-doktl
            stb_orig-dokvr
    *d      INTO ecfld                                          "note 489354
            INTO ecfld+sy-fdpos                                 "note 489354
            SEPARATED BY space.
          stb_add-objic = '@AR@'.
        WHEN otyp_kla.
          CONCATENATE
            stb_orig-class
            stb_orig-klart
            INTO ecfld
            SEPARATED BY space.
          stb_add-objic = '@7C@'.
        WHEN otyp_ntm.
          WRITE: stb_orig-intrm TO ecfld.
        WHEN OTHERS.
      ENDCASE.
    *d CONDENSE ecfld.                                          "note 515408
      stb_add-dobjt = ecfld(40).
      CLEAR: ecfld.
      WRITE stb_orig-stufe TO stb_add-dstuf NO-SIGN.
    *d  MOVE-CORRESPONDING stb_orig TO alv_stb.                 "note 331962
      MOVE-CORRESPONDING stb_add TO alv_stb.
      MOVE-CORRESPONDING stb_orig TO alv_stb.                   "note 331962
      APPEND alv_stb.
    ENDFORM.                    " alv_stb_prep
    *&      Form  get_level_level
          text
    FORM get_level_level.
      REFRESH : T_STB,
                T_MATCAT,
                ALV_STB.
      CLEAR : T_STB,
              T_MATCAT,
              ALV_STB.
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
           EXPORTING
                capid                 = 'PP01'
                datuv                 = sy-datum
                mktls                 = 'X'
                mehrs                 = 'X'
                mtnrv                 = t_mast-matnr
                stlal                 = '01'
                stlan                 = '1'
                stpst                 = 0
                svwvo                 = 'X'
                werks                 = p_werks
                vrsvo                 = 'X'
           TABLES
                stb                   = t_stb
                matcat                = t_matcat
           EXCEPTIONS
                alt_not_found         = 1
                call_invalid          = 2
                material_not_found    = 3
                missing_authorization = 4
                no_bom_found          = 5
                no_plant_data         = 6
                no_suitable_bom_found = 7
                conversion_error      = 8
                OTHERS                = 9.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CLEAR: hd_tab.
            Entry der KlassenstatusTab. initialisieren
             cl_clstab,
            Entry 'Objekte von Klassen' initialisieren
             cl_objmemo.
      REFRESH: hd_tab.
      SORT t_matcat BY index ASCENDING.
    Get the All levels
      loop at t_stb.
        IF NOT t_stb-hdnfo IS INITIAL.
          EXIT.
        ENDIF.
    Object Identification
        PERFORM obj_ident.
        READ TABLE hd_tab
            WITH KEY stufe = t_stb-stufe
                     vwegx = t_stb-vwegx
            BINARY SEARCH
            TRANSPORTING NO FIELDS.
        ?gibt es diesen Satz schon
        nein
        IF sy-subrc <> 0.
           dann in SFP-Infosatzverweistab. aufnehmen
    *d       APPEND HD_TAB.                                       "HGH054648
          hd_tab-stufe = t_stb-stufe.
                                                                "HGH054648
          hd_tab-vwegx = t_stb-vwegx.
                                                                "HGH054648
          INSERT hd_tab                                         "HGH054648
            INTO hd_tab                                         "HGH054648
            INDEX sy-tabix.                                     "HGH054648
           PosNr initialisieren
          CLEAR: t_stb-posnr.
           SFP-InfosatzKz setzen
          t_stb-hdnfo = 'X'.
            stb-objty = otyp_mat.
                                                                "HGE246532
           als SFP-Infosatz in die STB aufnehmen
          append t_stb.
        ENDIF.
    *del  ENDIF.
        clear t_stb.
      endloop.
      SORT t_stb ASCENDING BY stufe
                  index ASCENDING
    *del        POSNR ASCENDING.                                  "HGC062735
                  posnr ASCENDING                               "HGC062735
                  hdnfo DESCENDING.
      LOOP AT t_stb.
        T_stb-index = sy-tabix.
        MODIFY T_stb.
        PERFORM alv_stb_prep.
      ENDLOOP.
    Displays the Value as Level by Level
      loop at ALV_stb.
        if sy-tabix = 1.
          format color 3 on.
          write:/2 'Level',12 'Item',22 'Component',
          42 'Material Description',82 'Base Qty',
          107 'Base Unit',120 'Assembly Indicator'.
          format color 3 on.
        endif.
        if alv_stb-MEINs is initial.
          v_flag = 'X'.
        endif.
        if v_flag = 'X'.
          format color 5 on.
          write:/2 ALV_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                 42 alv_stb-OJTXP.
          format color 1 off.
        else.
          if alv_stb-STUFE = '1'.
            format color 1 on.
            write:/2 ALV_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs, 120 alv_stb-bomfl .
            format color 1 off.
          elseif alv_stb-STUFE = '2'.
            format color 2 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs,120 alv_stb-bomfl.
            format color 2 off.
          elseif alv_stb-STUFE = '3'.
            format color 3 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color 3 off.
          elseif alv_stb-STUFE = '4'.
            format color 4 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color 4 off.
          elseif alv_stb-STUFE = '5'.
            format color 5 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color 5 off.
          elseif alv_stb-STUFE = '6'.
            format color 7 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs,120 alv_stb-bomfl.
            format color 6 off.
          elseif alv_stb-STUFE = '7'.
            format color 7 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color  7 off.
          else.
            format color 1 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color  1 off.
          endif.
        endif.
        hide: alv_stb.
        clear : alv_stb.
        clear v_flag.
      endloop.
    ENDFORM.                    " get_level_level
    *&      Form  f4_for_variant
          text
    FORM f4_for_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
             EXPORTING
                  is_variant          = g_variant
                  i_save              = g_save
                  i_tabname_header    = g_tabname_header
                  i_tabname_item      = g_tabname_item
              it_default_fieldcat =
             IMPORTING
                  e_exit              = g_exit
                  es_variant          = gx_variant
             EXCEPTIONS
                  not_found = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S'      NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF g_exit = space.
          p_vari = gx_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f4_for_variant
          FORM E03_EVENTTAB_BUILD                                       *
    -->  E03_LT_EVENTS                                                 *
    FORM e03_eventtab_build USING e03_lt_events TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type = 0
           IMPORTING
                et_events   = e03_lt_events.
      READ TABLE e03_lt_events WITH KEY name = slis_ev_top_of_page
                               INTO ls_event.
      IF sy-subrc = 0.
        MOVE gc_formname_top_of_page TO ls_event-form.
        APPEND ls_event TO e03_lt_events.
      ENDIF.
    ENDFORM.
          FORM E04_COMMENT_BUILD                                        *
    -->  E04_LT_TOP_OF_PAGE                                     

  • Can I define a vertical SELECTION-SCREEN block ?

    Hi, I started getting to know the SELECTION-SCREEN statements now, I was wondering if there's a way to define a vertical screen block instead of an horizontal one.
    Also, can I set the size of a given block ? Let's say I don't want it to extend to the right margin of the screen. Can I limit it to the middle, for instance ?
    Here's a code excerpt so you can understand a little what I'm intending to do (I want to place the operators vertically on the screen).
    SELECTION-SCREEN BEGIN OF BLOCK BOX1 WITH FRAME TITLE S_TBOX1.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 20(10) S_COMM.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF BLOCK BOX2 WITH FRAME TITLE S_TBOX2.
        SELECTION-SCREEN BEGIN OF LINE.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB1 USER-COMMAND 'XXX'.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB2 USER-COMMAND 'XXX'.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB3 USER-COMMAND 'XXX'.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB4 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN END OF BLOCK BOX2.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN PUSHBUTTON (3) S_PB5 USER-COMMAND 'XXX'.
      SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BOX1.
    INITIALIZATION.
      S_COMM = 'CALCULATOR'.

    Ok, I thought of that but... now I need the answer for the 2nd question I posted: is it possible to limit the extension of the block, so it ends right after the 4 buttons column ?
    SELECTION-SCREEN BEGIN OF BLOCK BOX1 WITH FRAME TITLE S_TBOX1.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 20(10) S_COMM.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF BLOCK BOX2 WITH FRAME TITLE S_TBOX2.
        SELECTION-SCREEN BEGIN OF LINE.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB1 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN SKIP.
        SELECTION-SCREEN BEGIN OF LINE. 
          SELECTION-SCREEN PUSHBUTTON (3) S_PB2 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE. 
        SELECTION-SCREEN SKIP.
        SELECTION-SCREEN BEGIN OF LINE. 
          SELECTION-SCREEN PUSHBUTTON (3) S_PB3 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE. 
        SELECTION-SCREEN SKIP.
        SELECTION-SCREEN BEGIN OF LINE.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB4 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN END OF BLOCK BOX2.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN PUSHBUTTON (3) S_PB5 USER-COMMAND 'XXX'.
      SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BOX1.
    INITIALIZATION.
      S_COMM = 'CALCULATOR'.

  • Push buttons are not triggering on the selection screen

    selection-screen begin of block a with frame title text-001.
    selection-screen skip.
    parameters:z like vbap-vbeln.
    selection-screen skip.
    selection-screen begin of block b with frame title text-002.
    selection-screen skip.
    parameters:sales radiobutton  group g default 'X',
               trans radiobutton  group g.
    selection-screen end of block b.
    selection-screen skip.
    selection-screen pushbutton 10(12) pu_text  user-command CANC.
    selection-screen pushbutton 30(12) qu_text  user-command STAT.
    selection-screen end of block a.
    Initialization.
    pu_text = 'Cancel Order'.
      qu_text = 'Status'.
    TABLES SSCRFIELDS.
    AT SELECTION-SCREEN.
    CASE SSCRFIELDS.
    WHEN 'CANC'.
    WRITE 'CANCEL'.
    WHEN 'STAT'.
    WRITE 'STATUS'.
    ENDCASE.

    hi,
    in your program declare SSCRFIELDS table before defining selection-screen with push-buttons.
    To create a pushbutton on the selection screen, you use:
    <b>SELECTION SCREEN PUSHBUTTON [/]<pos(len)> <push>
                                USER-COMMAND <ucom> [MODIF ID <key>].</b>
    The [/]<pos(len)> parameters and the MODIF IF addition have the same function as for the formatting options for underlines and comments.
    <b>follow this sample program.</b>
    REPORT DEMO.
    TABLES SSCRFIELDS.
    DATA FLAG.
    SELECTION-SCREEN:
      BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,
        BEGIN OF LINE,
          PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,
          PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,
        END OF LINE,
        BEGIN OF LINE,
          PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,
          PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,
        END OF LINE,
      END OF SCREEN 500.
    AT SELECTION-SCREEN.
      CASE SSCRFIELDS.
        WHEN 'CLI1'.
          FLAG = '1'.
        WHEN 'CLI2'.
          FLAG = '2'.
        WHEN 'CLI3'.
          FLAG = '3'.
        WHEN 'CLI4'.
          FLAG = '4'.
      ENDCASE.
    START-OF-SELECTION.
      TIT  = 'Four Buttons'.
      BUT1 = 'Button 1'.
      BUT3 = 'Button 3'.
      CALL SELECTION-SCREEN 500 STARTING AT 10 10.
      CASE FLAG.
        WHEN '1'.
          WRITE / 'Button 1 was clicked'.
        WHEN '2'.
          WRITE / 'Button 2 was clicked'.
        WHEN '3'.
          WRITE / 'Button 3 was clicked'.
        WHEN '4'.
          WRITE / 'Button 4 was clicked'.
        WHEN OTHERS.
          WRITE / 'No Button was clicked'.
      ENDCASE.
    regards,
    Ashok Reddy

  • How to make selection-screen block as unvisible?

    hi,
    in report program there are two selection screen blocks like this.
    SELECTION-SCREEN BEGIN OF BLOCK b1.
         parameters: rb1 as radiobutton group r1 user-command ucomm,
                  rb2 as radiobutton group r1,
                  rb3 as radiobutton group r1,
                  rb4 as radiobutton group r1,
         SELECTION-SCREEN BEGIN OF BLOCK b2.
              parameters: ip1 type string.
              select-options: date for pernr-begda.
         SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OD BLOCK b1.
    Now when i clicked on rb4 the selecetion screen block b2 has to be visible.
    And rest of things i.e for rb1, rb2, rb3 it should not visible. it should be disabled.
    Regards,
    Shankar.

    hi,
    i am doing like this.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text.
      SELECTION-SCREEN SKIP 1.
      SELECT-OPTIONS: pernr FOR person-pernr.
      SELECTION-SCREEN SKIP 1.
      PARAMETERS: tempname LIKE rlgrap-filename.
      SELECTION-SCREEN SKIP 1.
      PARAMETERS: rb_p1 TYPE c RADIOBUTTON GROUP r1 USER-COMMAND rbg,
                  rb_p2 TYPE c RADIOBUTTON GROUP r1,
                  rb_p3 TYPE c RADIOBUTTON GROUP r1,
                  rb_p4 TYPE c RADIOBUTTON GROUP r1.
      SELECTION-SCREEN SKIP 1.
        SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text1.
            PARAMETERS: country(25) TYPE c MODIF ID ccc.
            SELECT-OPTIONS:Fromdate FOR person-begda NO-EXTENSION MODIF ID ccc.
        SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN OUTPUT.
    IF rb_p4 = ' ' .
      LOOP AT SCREEN.
          IF SCREEN-NAME = 'COUNTRY'
          OR SCREEN-NAME = 'FROMDATE-LOW'
          OR SCREEN-NAME = 'FROMDATE-HIGH'
          OR SCREEN-GROUP1 = 'CCC'.
              screen-input = 0. "Disable
          ENDIF.
          MODIFY SCREEN.
      ENDLOOP.
    ENDIF.
    IF rb_p4 = 'X' .
      LOOP AT SCREEN.
          IF SCREEN-NAME = 'COUNTRY'
          OR SCREEN-NAME = 'FROMDATE-LOW'
          OR SCREEN-NAME = 'FROMDATE-HIGH'
          OR SCREEN-GROUP1 = 'CCC'.
              screen-input = 1. "Disable
          ENDIF.
          MODIFY SCREEN.
      ENDLOOP.
    ENDIF.
    Now it's making as disabled the fields which are in block B2.
    Acutually my requirement is when i ever user selects RB_P4 then only that screen has to appear. and for rest of 3 RB it should not visible. it should be invisible.
    for this wat to do....
    Regards,
    Shankar.

  • Selection screen in one line

    this is ma code SELECTION-SCREEN : BEGIN OF BLOCK A WITH FRAME TITLE TEXT_001.
    *SELECTION-SCREEN : BEGIN OF LINE .
    *SELECTION-SCREEN : COMMENT 3(20) TEXT_002 for field s_fkart.
    *SELECT-OPTIONS   : S_FKART FOR VBRK-FKART NO INTERVALS NO-DISPLAY.
    *SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE .
    SELECTION-SCREEN : COMMENT 3(23) TEXT_003.
    PARAMETERS       : P_VKORG TYPE VBRK-VKORG OBLIGATORY.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE .
    SELECTION-SCREEN : COMMENT 3(20) TEXT_004.
    SELECT-OPTIONS   : S_VTWEG FOR VBRK-VTWEG NO INTERVALS.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE .
    SELECTION-SCREEN : COMMENT 3(23) TEXT_007.
    PARAMETERS       : P_SPART TYPE VBRK-SPART OBLIGATORY.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE .
    SELECTION-SCREEN : COMMENT 3(23) TEXT_006.
    PARAMETERS       : S_FKDAT2(4) TYPE C OBLIGATORY.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE .
    SELECTION-SCREEN : COMMENT 3(23) TEXT_008.
    PARAMETERS       : P_MONTH(2) TYPE C OBLIGATORY.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : END OF BLOCK A.
    i want s_fkdat and p_month in same line how to do ?

    Hi,
        SELECTION-SCREEN : BEGIN OF LINE .
        SELECTION-SCREEN : COMMENT 3(23) TEXT_006.
        PARAMETERS : S_FKDAT2(4) TYPE C OBLIGATORY.
        SELECTION-SCREEN : COMMENT 45(23) TEXT_008.
        PARAMETERS : P_MONTH(2) TYPE C OBLIGATORY.
        SELECTION-SCREEN : END OF LINE.
    Change the Position of the comment for second parameter.
    Regards
    Bala Krishna
    Edited by: Bala Krishna on Sep 12, 2008 12:57 PM

  • How to hide block on selection screen?

    Hi All,
    I want to hide a block on the selection screen. I implemented the following logic to hide the block the fields are getting hided but the block is displayed. is there any way to hide block also.
    SELECTION-SCREEN BEGIN OF BLOCK processing WITH FRAME TITLE text-030.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 1.
    PARAMETERS pa_xmanu LIKE rm08mrbr-manu DEFAULT 'X'
                       RADIOBUTTON GROUP val MODIF ID ID1.
    SELECTION-SCREEN COMMENT 3(30) text-040 FOR FIELD pa_xmanu.
    SELECTION-SCREEN POSITION 40.
    PARAMETERS pa_xauto LIKE rm08mrbr-auto
                       RADIOBUTTON GROUP val MODIF ID ID1.
    SELECTION-SCREEN COMMENT 43(30) text-050 FOR FIELD pa_xauto.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pa_xskto LIKE rm08mrbr-skto AS CHECKBOX MODIF ID ID1.
    SELECTION-SCREEN COMMENT 3(30) text-055
                                   FOR FIELD pa_xskto.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK processing.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-GROUP1 = 'ID1'.
          SCREEN-ACTIVE = 0.
          modify screen.
        ENDIF.
      ENDLOOP.
    Thanks,
    Anil.

    Make sure you hide your comment lines with the MODIF ID as well.  
    selection-screen begin of block processing with frame title text-030.
    selection-screen begin of line.
    selection-screen position 1.
    parameters pa_xmanu like rm08mrbr-manu default 'X'
    radiobutton group val modif id id1.
    selection-screen comment 3(30) text-040 for field pa_xmanu modif id id1.  "<---  Here
    selection-screen position 40.
    parameters pa_xauto like rm08mrbr-auto
    radiobutton group val modif id id1.
    selection-screen comment 43(30) text-050
                                   for field pa_xauto modif id id1.  "<---  Here
    selection-screen end of line.
    selection-screen begin of line.
    parameters: pa_xskto like rm08mrbr-skto as checkbox modif id id1.
    selection-screen comment 3(30) text-055
    for field pa_xskto modif id id1.          "<---  Here
    selection-screen end of line.
    selection-screen end of block processing.
    at selection-screen output.
      loop at screen.
        if screen-group1 = 'ID1'.
          screen-active = 0.
          modify screen.
        endif.
      endloop.
    Regards,
    Rich Heilman

  • Option ( Radio button  or check box)  on selection - screen , to go to CNR2

    <b>Subject - Option ( Radio button  or check box)  on selection - screen  , to go to Tcode CNR2</b>
    Hi all,
          I have developed  a report   , which  has  a  selection screen  with  one select-option ,  where i enter employee number     and  two radio buttons   ,  one is for all workcentres  and  other one   for active workcentre.   so when i enter  employee number  and  choose  either of the radio button  i wil get the  output  properly.  the output   displays ,  employee no,  employee name ,  work centre  and project  of that employee .   an employee may have  many workcentres   and   a corresponding project  for that work centre.
    Now the  Problem is  ,  from the same   report  i need to add  a option  on the selection -screen ,  ( plz  tell me whether to use  radio button  or check box   and if it is radio button    should  i  use it seperately  or  group it  in the above two buttons.) .
    so that when user selects  the  option   , the control should  go to  transaction code CNR2,  from where  i  can enter workcentre  and   in the next screen i have  HR assigntment tab , after choosing that it will dsplay persons   linked to the workcentre  and there is a delete icon  , from where i can delete the person.
    The only thing is  now to move / Navigate to the screen   or  go to transaction code CNR2   from  the report  or  from the selection screen.
    Your valuable Inputs are awaited, PLz  do lemme know 
    Thanks  in advance ,
    regards,
    Shuja

    Shuja,
    A radio button nor a checkbox should be used for navigation.  I would suggest a COMMAND BUTTON. 
    Something like this:
    Report ZZZZZZ.
    TABLES: sscrfields.
    SELECTION-SCREEN BEGIN OF BLOCK ONE WITH FRAME TITLE TEXT-001.
    selection-screen: PUSHBUTTON /10(20) but1 USER-COMMAND cli1.
    SELECTION-SCREEN END OF BLOCK ONE.
    initialization.
      but1 = 'Button Text Goes Here'.
    AT SELECTION-SCREEN.
      CASE sscrfields.
        WHEN 'CLI1'.
          call transaction 'CNR2'.
    start-of-selection.
    Your code here

  • 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.

  • Selection-Screen : Subscreen

    Hi,
    I have defined 3 subscreen using this template 100 / 200 / 300
    Selection-screen begin of screen 100 as subscreen  .
       selection-screen begin of block B_plan with frame title box_plan.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_0007 USER-COMMAND _0007.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_0030 USER-COMMAND _0030.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_0031 USER-COMMAND _0031.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_0035 USER-COMMAND _0035.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_2800 USER-COMMAND _2800.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_3250 USER-COMMAND _3250.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_4300 USER-COMMAND _4300.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_4350 USER-COMMAND _4350.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_4360 USER-COMMAND _4360.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_4370 USER-COMMAND _4370.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_6150 USER-COMMAND _6150.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_6170 USER-COMMAND _6170.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_6630 USER-COMMAND _6630.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_7440 USER-COMMAND _7440.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_7460 USER-COMMAND _7460.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_8140 USER-COMMAND _8140.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_8142 USER-COMMAND _8142.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_8143 USER-COMMAND _8143.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_8450 USER-COMMAND _8450.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_86D0 USER-COMMAND _86D0.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_9070 USER-COMMAND _9070.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_9360 USER-COMMAND _9360.
       selection-screen end of block B_plan .
    Selection-screen end of screen 100.
    <b>I'd like to include these screens into One selection screen BUT IT DOES WORK :)</b>
    Like this
    selection-screen begin of screen 333.
      include subscreen 100.
      include subscreen 200.
      include subscreen 300.
    selection-screen end of screen 333.

    You can include your selection screen blocks like this...
    Selection-screen begin of screen 100 as subscreen  .
       selection-screen begin of block B_plan with frame title box_plan.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_0007 USER-COMMAND _0007.
       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 B2_plan with frame title b2_plan.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_2800 USER-COMMAND _2800.
       selection-screen end of block B2_plan.
    Selection-screen end of screen 200.
    Selection-screen begin of screen 300 as subscreen  .
       selection-screen begin of block B3_plan with frame title b3_plan.
    SELECTION-SCREEN PUSHBUTTON /1(20) p_4360 USER-COMMAND _4360.
       selection-screen end of block B3_plan.
    Selection-screen end of screen 300.
    selection-screen begin of block b1.
      SELECTION-SCREEN INCLUDE BLOCKS b_plan.
      SELECTION-SCREEN INCLUDE BLOCKS b2_plan.
      SELECTION-SCREEN INCLUDE BLOCKS b3_plan.
    selection-screen end of block b1.
    Ps: Reward points if helpful.

Maybe you are looking for

  • Dynamic Header names in Discoverer Plus

    Hopefully someone have a solution for the following problem! :-) In Discoverer Plus, all the numeric datapoints, create as a default, the following column header: "<Item name> SUM" (or AVG, COUNT, etc) Our end users are not very pleased with this kin

  • Which driver do I need for Broadcom4311?

    Hello, I'm using a dell Inspirion E1505, with a Broadcom4311 chipset. I read in the wiki and apparently I have a few options: 1. ndiswrapper - will use as a last resort only, I prefer to find a more linux-y solution 2. BCM4312 driver which apparently

  • Opens in New Window

    Does anyone know how to fix this? I must have hit a toggle at some point recently. While on the net and clicking on a link it now opens in a different window. Is there a way to keep on the same on which results in a new tab instead of a window? Thank

  • Where can I find a countdown timer?

    I have been looking for a countdown program for my Mac similar to this Windows one: A program where I can choose a date in the future from a calendar, give it a name, and have the countdown display the days left as well as hours minutes seconds. I ha

  • In pages it shows and error message when I try to share a document

    I get and error message when I try to use Share in sharing a document in pages and cannot email any documents