Show TOC Start of Content Area

Procedure documentation Creating a Tabstrip Control  Locate the document in its SAP Library structure

Use

You use this procedure to define a tabstrip control in the graphical mode of the Screen Painter. To do this, you have to perform the following actions:

...

      Define the tabstrip area

      Define the tab titles

      Define and assign a subscreen area

      Program the flow logic.

Note

For more information about creating a tabstrip control in the alphanumeric mode of the Screen Painter, see Creating Tabstrip Controls in Alphanumeric Mode.

Procedure

Defining a Tabstrip Area

To define a tabstrip area using the graphical layout editor, proceed as follows:

...

       1.      In the Screen Painter, switch to change mode and choose the tabstrip control icon from the element palette.

The cursor changes its shape.

       2.      Define the size of the tabstrip control. For more information, see Basic Operations with Screen Elements.

       3.      Assign a name <tab_strip_name> to the new tabstrip control.

       4.      Maintain any additional tabstrip attributes if required.

Note

The element name of the tabstrip control is the name that you use to declare the tabstrip control in your ABAP program. Use the following statement:

CONTROLS <tab_strip_name> TYPE TABSTRIP.

Defining Tab Titles

Tab titles are special forms of pushbuttons and have to be maintained like pushbuttons. By default, new tabstrip controls have two tab titles. If you want your tabstrip control to have more than two tab titles, you need to create them by choosing new pushbuttons from the element palette and placing them in the tab title row. Then you must change the Tab titles attributes.

...

       1.      To open the corresponding attribute window (for the pushbutton), double-click on a tab title.

       2.      Maintain the tab title attributes:

Attribute

Meaning

Name

Name of the pushbutton that forms the tab title.

Text

Text for the pushbutton.

Icon name

Icon to be displayed as part of the title.

 Note

Not recommended for ergonomic reasons.

Exceptions are icons for status displays or icons that are self-explanatory.

FctCode

Function code that triggers the PAI event. When you choose the tab, the system puts the function code in the system field SY-UCOMM. If you use back-end scrolling, the function code is stored in the OK_CODE field as well.

FctType

A tab title may have the function type <P> or <SPACE>.

      For front-end scrolling, use type <P>. In this case, the PAI event is not triggered when the user chooses a tab title and there is no data transfer to the application server.

      For back-end scrolling, use function type <SPACE> (no special type assignment). In this case, the PAI event is triggered when the user chooses a tab title and the function code is placed in the OK_CODE field.

Note

You can assign dynamic texts to tab titles.

Assigning a Subscreen Area

If you are using front-end scrolling (function type <P>), you must assign a separate subscreen area to each tab page. If you are using back-end scrolling (function type <SPACE>), you can use one shared subscreen area for all tab pages.

To assign a subscreen area to a tab page:

...

       1.      Select a tab title.

       2.      Choose Subscreen area from the element toolbar.

       3.      Position the subscreen area within the tabstrip control and adjust its size.

       4.      Enter a name <subscreen_area> for the subscreen area.

This name also appears as the reference field in the tab title attributes.

Programming Flow Logic

The flow logic described here is restricted to what is necessary to include the appropriate subscreens in the right subscreen areas of the tabstrip control.

Front-end Scrolling

If you use front-end scrolling, you must include subscreens in all the subscreen areas of the tabstrip control. You can do that in the screen flow logic:

...

       1.      Add the following statements to the PBO event of your flow logic:

PROCESS BEFORE OUTPUT.

   CALL SUBSCREEN: <subscreen_area1> INCLUDING [<progname 1>] <subscreen_scrn 1>,

                   <subscreen_area2> INCLUDING [<progname 2>] <subscreen_scrn 2>,

                   <subscreen_area3> INCLUDING [<progname 3>] <subscreen_scrn 3>,

                  ...

Note

You can get the individual subscreens from different ABAP programs.

       2.      Add the following statements to the PAI event of your flow logic:

PROCESS AFTER INPUT.

...

    CALL SUBSCREEN: <subscreen_area1>,

                    <subscreen_area2>,

                    <subscreen_area3>,

                    ...

Application Server Scrolling

If you use application server scrolling, you need to include only one subscreen in one subscreen area.

...

       1.      Add the following statement to the PBO event of your flow logic:

PROCESS BEFORE OUTPUT.

...

CALL SUBSCREEN < subscreen_area> INCLUDING [<progname>] <subscreen_scrn>.

...

       2.      Add the following statement to the PAI event of your flow logic:

PROCESS AFTER INPUT.

...

CALL SUBSCREEN < subscreen_area>.

For more information about using tabstrip controls in your ABAP programs, see the section about Tabstrip Controls in the ABAP Programming Guide.

End of Content Area