ABAP Keyword Documentation → ABAP − Reference → SAP GUI User Dialogs → General Dynpros → Statements in the Dynpro Flow Logic → Subscreens, Tabstrips, and Splitter Controls → Subscreens, Tabstrips, and Splitter Controls - Examples
Dynpros, Tabstrips with Scrolling on the ABAP Server
This example demonstrates the use of tabstrip controls with centralized 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 next dynpro number of dynpro 100 is 100. The layout of dynpro 100 and the subscreen dynpros 110 to 130 is the same as in the
executable 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.
The screen flow logic of dynpro 100 makes a dynamic binding to PBO, a subscreen dynpro in the subscreen
area sub
. The screen flow logic of subscreen dynpros 110 to 130 does not contain any module calls.
This example works in exactly the same way as the
example with local scrolling except that
scrolling between the tabstrip pages is programmed in the ABAP program. Each time the user chooses a
tab title, the function code from the OK field is assigned to the activetab
component of structure mytabstrip
. At the same time, the variable number
is given the dynpro number of the subscreen dynpro to be displayed in the subscreen area SUB of the tabstrip.