Skip to Content
author's profile photo Former Member
Former Member

create tabstrip in seletion screen

HOw can i create tabstrip in seletion screen?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 04:45 AM

    REPORT zanid_test LINE-SIZE 120

    NO STANDARD PAGE HEADING.

    TABLES: ekko, ekpo, eket, marc, t134h.

    ----


    • Tab Strips 1

    ----


    SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.

    SELECTION-SCREEN BEGIN OF BLOCK vendor WITH FRAME TITLE text-t00.

    SELECT-OPTIONS vendor FOR ekko-lifnr.

    SELECTION-SCREEN SKIP.

    SELECTION-SCREEN BEGIN OF LINE.

    SELECTION-SCREEN COMMENT (10) text-m01.

    SELECTION-SCREEN END OF LINE.

    SELECTION-SCREEN SKIP.

    SELECT-OPTIONS vplant FOR ekko-reswk.

    SELECTION-SCREEN END OF BLOCK vendor.

    SELECTION-SCREEN END OF SCREEN 101.

    ----


    • Tab Strips 2

    ----


    SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.

    SELECTION-SCREEN BEGIN OF BLOCK data1 WITH FRAME TITLE text-t02.

    SELECT-OPTIONS: busarea FOR t134h-gsber,

    plant FOR ekpo-werks,

    puorg FOR ekko-ekorg.

    SELECTION-SCREEN END OF BLOCK data1.

    SELECTION-SCREEN SKIP.

    SELECTION-SCREEN BEGIN OF BLOCK data2 WITH FRAME TITLE text-t03.

    SELECT-OPTIONS sched FOR ekko-ebeln.

    SELECT-OPTIONS matl FOR ekpo-matnr.

    SELECTION-SCREEN END OF BLOCK data2.

    SELECTION-SCREEN END OF SCREEN 102.

    ----


    • Tab Strips 3

    ----


    SELECTION-SCREEN BEGIN OF SCREEN 103 AS SUBSCREEN.

    SELECTION-SCREEN BEGIN OF BLOCK rype WITH FRAME TITLE text-t04.

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS del RADIOBUTTON GROUP one.

    SELECTION-SCREEN COMMENT 4(35) text-c05 FOR FIELD del.

    SELECTION-SCREEN END OF LINE.

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS fix RADIOBUTTON GROUP one.

    SELECTION-SCREEN COMMENT 4(35) text-c06 FOR FIELD fix.

    SELECTION-SCREEN END OF LINE.

    SELECTION-SCREEN END OF BLOCK rype.

    SELECTION-SCREEN SKIP.

    SELECTION-SCREEN BEGIN OF BLOCK interval WITH FRAME TITLE text-t05.

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS mon RADIOBUTTON GROUP two.

    SELECTION-SCREEN COMMENT 4(15) text-c01 FOR FIELD mon.

    PARAMETERS evalmon TYPE spbup.

    SELECTION-SCREEN END OF LINE.

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS wek RADIOBUTTON GROUP two.

    SELECTION-SCREEN COMMENT 4(15) text-c02 FOR FIELD wek.

    PARAMETERS evalweek TYPE sptag.

    SELECTION-SCREEN COMMENT 35(30) text-i01.

    SELECTION-SCREEN END OF LINE.

    SELECTION-SCREEN END OF BLOCK interval.

    SELECTION-SCREEN SKIP.

    SELECTION-SCREEN BEGIN OF BLOCK type WITH FRAME TITLE text-t01.

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS ext RADIOBUTTON GROUP thr.

    SELECTION-SCREEN COMMENT 4(15) text-c08 FOR FIELD int.

    SELECTION-SCREEN END OF LINE.

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS int RADIOBUTTON GROUP thr.

    SELECTION-SCREEN COMMENT 4(15) text-c07 FOR FIELD ext.

    SELECTION-SCREEN END OF LINE.

    SELECTION-SCREEN END OF BLOCK type.

    SELECTION-SCREEN BEGIN OF BLOCK pre WITH FRAME TITLE text-t06.

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS vn RADIOBUTTON GROUP slv.

    SELECTION-SCREEN COMMENT 4(15) text-c09 FOR FIELD vn.

    SELECTION-SCREEN END OF LINE.

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS bp RADIOBUTTON GROUP slv.

    SELECTION-SCREEN COMMENT 4(17) text-c10 FOR FIELD bp.

    SELECTION-SCREEN END OF LINE.

    SELECTION-SCREEN END OF BLOCK pre.

    SELECTION-SCREEN END OF SCREEN 103.

    SELECTION-SCREEN BEGIN OF TABBED BLOCK uno FOR 20 LINES.

    SELECTION-SCREEN TAB (15) name1 USER-COMMAND ucomm1

    DEFAULT SCREEN 101.

    SELECTION-SCREEN TAB (17) name2 USER-COMMAND ucomm2

    DEFAULT SCREEN 102.

    SELECTION-SCREEN TAB (23) name3 USER-COMMAND ucomm3

    DEFAULT SCREEN 103.

    SELECTION-SCREEN END OF BLOCK uno.

    INITIALIZATION.

    name1 = '200'.

    name2 = '300'.

    name3 = '400'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 04:43 AM

    Hi,

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

    Thanks,

    Ruthra

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 19, 2005 at 04:52 AM

    Hi,

    This link helps you in that.

    http://www.sapdevelopment.co.uk/reporting/selscr/selscr_tabstrip.htm

    Kindly reward points by clicking the star on the left of reply,if it helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 05:37 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 04:41 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 04:49 AM

    Kishan,

    you can do this in another way,

    create a screen '0100' (say) and make a tabstrip there.

    and put the i/o control in different subscreens.

    The you can fullfill the requirement by call screen '0100'.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.