Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  User Dialogs →  Dynpros →  Statements in the Screen Flow Logic →  Subscreens, Tabstrips, and Splitter Controls →  Subscreens, Tabstrips, and Splitter Controls - Examples 

Screens, Tabstrips with scrolling in the SAP GUI

This example demonstrates the use of tabstrip controls with local scrolling.

Other versions: 7.31 | 7.40 | 7.54

Source Code

REPORT demo_dynpro_tabstrip_local.

CONTROLS mytabstrip TYPE TABSTRIP.

DATA: ok_code TYPE sy-ucomm,
      save_ok TYPE sy-ucomm.

mytabstrip-activetab = 'PUSH2'.

CALL SCREEN 100.

MODULE status_0100 OUTPUT.
  SET PF-STATUS 'SCREEN_100'.
ENDMODULE.

MODULE cancel INPUT.
  LEAVE PROGRAM.
ENDMODULE.

MODULE user_command INPUT.
  save_ok = ok_code.
  CLEAR ok_code.
  IF save_ok = 'OK'.
    MESSAGE i888(sabapdemos) WITH 'MYTABSTRIP-ACTIVETAB ='
                                 mytabstrip-activetab.
  ENDIF.
ENDMODULE.

Description

The static subsequent screen number of screen 100 is 100. It is a tabstrip page called mytabstrip created with three tabs, PUSH1, PUSH2, PUSH3 and function codes with the same names (type p). One of three identically sized subscreen areas, sub1 to sub3, is assigned to each tab. The button is called BUTTON and has the function code 'OK'. In addition three subscreens, 110 to 130, are defined. These subscreens fit into the above mentioned subscreen areas. The screen flow logic of the subscreens 110 to 130 does not contain any module calls.

When the program is executed, the user sees a screen, the second tab page of which is active because before screen 100 is called, the component activetab of the structure mytabstrip is set to PUSH2. The user can scroll between the tab pages without triggering the PAI event. Each tab page has one of the three subscreens attached to it.

By selecting the Continue button, the PAI event is triggered and a message shows the function code of the tab assigned to the currently active tab page.