ABAP Keyword Documentation → ABAP - Reference → User Dialogs → Screens → ABAP Statements for Screens → CONTROLS
CONTROLS - TYPE TABSTRIP
Other versions: 7.31 | 7.40 | 7.54
Syntax
CONTROLS contrl TYPE TABSTRIP.
Effect
Declares a tabstrip control. If you specify the type TABSTRIP
in the CONTROLS
statement, a
deep structure is created with the name of the
control and the type CXTAB_TABSTRIP of the
type group CXTAB. From this structure, only the component ACTIVETAB is required in the program.
In PBO processing, the active tabstrip page is specified by assigning the function code of a
tab title to the component ACTIVETAB. The first tabstrip page is active by default. When
scrolling in the SAP GUI, the tabstrip control can be initialized in this way. For any
scrolling in an ABAP program, the tabstrip page selected by the user must be activated by this assignment. You must also ensure that the desired
subscreen is included in the
screen flow logic using the CALL SUBSCREEN
statement.
In PAI processing, the component ACTIVETAB contains the function code of the active tab title. When scrolling in the SAP GUI, you can determine which tabstrip page is currently displayed in this way.
Note
The same applies to the inclusion of subscreens of tabstrips using CALL SUBSCREEN
as for normal subscreens.
Example
If, on a subscreen, a tabstrip control is defined with three untyped tab titles with the function codes
"TAB1", "TAB2", and "TAB3" and a subscreen area SUB, the scrolling can be programmed in ABAP as follows.
In a PBO module, prepare_tabstrip
, the component activetab
of the structure tab_strip
created using CONTROLS
is assigned the function code of the first tab title. After a tab title has been selected, this component is set to the relevant function code in the PAI module handle_user_command
. The number of the desired
subscreen screen is
assigned to the data object dynnr
that is used for including the subscreen
in the screen flow logic. The corresponding programming of the screen flow logic can be seen in the example for CALL SUBSCREEN
.
CONTROLS tab_strip TYPE TABSTRIP.
DATA: ok_code TYPE sy-ucomm,
dynnr TYPE sy-dynnr.
...
MODULE prepare_tabstrip OUTPUT.
IF tab_strip-activetab IS INITIAL OR
dynnr IS INITIAL.
tab_strip-activetab = 'TAB1'.
dynnr = '0110'.
ENDIF.
ENDMODULE.
MODULE handle_user_command INPUT.
CASE ok_code.
WHEN 'TAB1'.
dynnr = '0110'.
WHEN 'TAB2'.
dynnr = '0120'.
WHEN 'TAB3'.
dynnr = '0130'.
...
ENDCASE.
IF ok_code(3) = 'TAB'.
tab_strip-activetab = ok_code.
ENDIF.
ENDMODULE.