Skip to content

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

Screens, Tabstrips with Scrolling on the Applications Server

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

Other versions: 7.31 | 7.40 | 7.54

Source Code

REPORT demo_dynpro_tabstrip_server.

CONTROLS mytabstrip TYPE TABSTRIP.

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

DATA  number TYPE sy-dynnr.

mytabstrip-activetab = 'PUSH2'.
number = '0120'.

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.
  ELSE.
    mytabstrip-activetab = save_ok.
    CASE save_ok.
      WHEN 'PUSH1'.
        number = '0110'.
      WHEN 'PUSH2'.
        number = '0120'.
      WHEN 'PUSH3'.
        number = '0130'.
    ENDCASE.
  ENDIF.
ENDMODULE.

Description

The static subsequent screen number of screen 100 is 100. The layout of screen 100 and the subscreens 110 to 130 is the same as for the example with local scrolling. The function codes of the three tab titles are not typed and a common subscreen area sub is assigned to all tab titles.

In the screen flow logic of screen 100, there is a dynamic connection to PBO, a subscreen in the subscreen area sub. The screen flow logic of the subscreens 110 to 130 contains no module calls.

This example has exactly the same functionality as the example with local scrolling except that scrolling between the tabstrip pages is programmed in the ABAP program. Every time a tab title is selected, it is assigned the function code of the OK field in the activetab component of the mytabstrip structure. At the same time, the variable number is supplied with the screen number of the subscreen which is to be shown in the subscreen area SUB of the tabstrip.