Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Tabstrip control

Former Member
0 Likes
813

Hello All,

can any tell me about tabstrip control with simple example.

Thanks and Regard.

Rajesh

6 REPLIES 6
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
787

Hi

Tabstrip control is used to display related data in subscreens using tab buttons.

Regards,

kumar

Read only

Former Member
0 Likes
787

check this link

<a href="http://help.sap.com/saphelp_46c/helpdata/en/fd/02da2a61d811d295750000e8353423/frameset.htm">http://help.sap.com/saphelp_46c/helpdata/en/fd/02da2a61d811d295750000e8353423/frameset.htm</a>

Read only

Former Member
0 Likes
787

Hi Rajesh,

Tabstrip control is like a menu in which you can access all the screens in onepage.

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/04/10f2469e0811d1b4700000e8a52bed/frameset.htm">Tabstrip controls</a>

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/04/10f2469e0811d1b4700000e8a52bed/frameset.htm">Creating tabStrip control</a>

Rgds,

Jothi.P

Read only

Former Member
0 Likes
787

Hi Rajesh,

Please refer the link,

Regards,

Hema.

    • Reward points if it is useful.

Read only

Former Member
0 Likes
787

Hi,

Subscreens and Tabstrip Controls

Subscreens

You can incorporate other screens into the screen of Dynpros in the form of subscreens using the statement CALL SUBSCREEN. To do this, you have to define subscreen areas on the screen of the current dynpro. Each subscreen area has an unique name and can be adjusted to support screen-size changes. If this is set, every change of the screen-size of the current screen triggers the event PAI.

Subscreens are the screens of special subscreen dynpros. When you incorporate subscreens, you also incorporate the flow logic of the subscreen dynpros. Subscreens can incorporate other subscreens by themselves. A subscreen does not possess an own OK-field. Instead, the function codes are put into the OK-field of the incorporating dynpro at every user action on subscreens. In the PAI event block of a subscreen dynpro, a statement MODULE with the addition AT EXIT-COMMAND is never executed.

Note

Subscreen dynpros are defined as normal dynpros in the Screen Painter and are indicated as such there. Selection screens can also be defined as subscreen-dynpros.

Tabstrip Controls

A tabstrip control is a screen element that consists of multiple tabstrip pages. Every tabstrip page contains a single-line tab title which is linked with a function code which makes it possible to access the tabstrip page with a double-click. Below the tab title, a tabstrip page consists of a subscreen area. A subscreen area must be assigned to every tab title. To do this, you have two options:

Scrolling in the SAP GUI

A tab title is assigned to each subscreen area and the function codes of the individual tab titles are defined with the function type "P". If the user selects a tab title, the event PAI is not raised. The corresponding subscreens are incorporated once into every individual subscreen area using the statement CALL SUBSCREEN of the flow logic. If the user selects a tab title, then the SAP GUI scrolls to the corresponding tabstrip page and displays its content.

Scrolling in the ABAP program

To each tab title, the same subscreen area is assigned and the function codes of the individual tab titles are defined without typing. If the user selects a tab title, then the event PAI is triggered. The corresponding subscreen is dynamically incorporated into the subscreen area CALL SUBSCREEN when scrolling using the statement CALL SUBSCREEN of the flow logic. In the ABAP-program, you must activate the corresponding tabstrip title CONTROLS and the correct subscreen dynpro must be scheduled for the subscreen area.

Note

When you scroll in the SAP GUI and select a tab title, then no input checks are carried out and no data is transported to the ABAP program. Not until an user action, which triggers the event PAI, are all entries checked and the data of all subscreens is transported. When scrolling in the ABAP program, the entries are checked at every selection of a tab title and the data of the current tabstrip page is transported to the ABAP program of the subscreen dynpro.

Syntax

CONTROLS contrl TYPE TABSTRIP.

Effect

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.

During the 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 thus be initialized. 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.

During PAI processing, the component ACTIVETAB contains the function code of the active tab title. When scrolling in the SAP GUI, you can thus ascertain which tabstrip page is currently displayed.

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.

Regards

Gaurav

Read only

Former Member
0 Likes
787