ABAP Keyword Documentation → ABAP − Reference → SAP GUI User Dialogs → General Dynpros → ABAP Statements for Dynpros → CONTROLS
CONTROLS - TYPE TABSTRIP
Other versions: 7.31 | 7.40 | 7.54
Syntax
CONTROLS contrl TYPE TABSTRIP.
Effect
Declares a tabstrip control. If the type TABSTRIP
is specified in the statement CONTROLS
, 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. It must also be ensured that the required
subscreen is included in the
dynpro flow logic using the statement CALL SUBSCREEN
.
In PAI processing, the component ACTIVETAB contains the function code of the active tab title. When scrolling in the SAP GUI, the tabstrip page currently being displayed can be determined 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 dynpro, 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 required
subscreen dynpro is
assigned to the data object dynnr
that is used for including the subscreen
in the dynpro flow logic. The associated programming of the dynpro 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.