Application Development 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: 

Tab strip

Former Member
0 Kudos
149

Hi ,

I need to create a tab strip with 3 tabs with name a , b , c using the selection screen statement only from se38 . Not from SE51 . Just give me the syntax. Any Help is appreciated .

Kumar

5 REPLIES 5

Former Member

Former Member
0 Kudos
80

kumar,

Tabstrip Controls on Selection Screens

As with screens, you can now use tabstrip controls on selection screens. To do this, you must define a tabstrip area and the associated tab pages, and assign a subscreen to the tab pages. You do not have to (indeed, cannot) declare the tabstrip control or program the screen flow logic in your ABAP program, since both are automatically generated.

To define a tabstrip area with tab pages, use the following statements in your selection screen definition:

SELECTION-SCREEN: BEGIN OF TABBED BLOCK <tab_area> FOR <n> LINES,

TAB (<len>) <tab1> USER-COMMAND <ucom1>

[DEFAULT [PROGRAM <prog>] SCREEN <scrn>],

TAB (<len>) <tab2> USER-COMMAND <ucom2>

[DEFAULT [PROGRAM <prog>] SCREEN <scrn>],

...

END OF BLOCK <tab_area>.

This defines a tabstrip control <tab_area> with size <n>. The tab pages <tab1>, <tab2>… are assigned to the tab area. <len> defines the width of the tab title. You must assign a function code <ucom> area to each tab title. You can find out the function code from the field SY-UCOMM in the AT SELECTION-SCREEN event.

For each tab title, the system automatically creates a character field in the ABAP program with the same name. Before the selection screen is displayed, you can assign a text to the field. This then appears as the title of the corresponding tab page on the selection screen.

You must assign a subscreen to each tab title. This will be displayed in the tab area when the user chooses that title. You can assign one of the following as a subscreen:

A subscreen screen defined using the Screen Painter.

A selection screen subscreen, defined in an ABAP program.

You can make the assignment either statically in the program or dynamically at runtime. If, at runtime, one of the tab titles has no subscreen assigned, a runtime error occurs.

Static assignment

Use the DEFAULT addition when you define the tab title. You can specify an ABAP program and one of its subscreens. If you do not specify a program, the system looks for the subscreen in the current program. When the user chooses the tab title, it is activated, and the subscreen is assigned to the tabstrip area. The static assignment is valid for the entire duration of the program, but can be overwritten dynamically before the selection screen is displayed.

Dynamic assignment

For each tab area, the system automatically creates a structure in the ABAP program with the same name. This structure has three components – PROG, DYNNR, and ACTIVETAB. When you assign the subscreens statically, the structure contains the name of the ABAP program containing the subscreen, the number of the subscreen, and the name of the tab title currently active on the selection screen (and to which these values are assigned). The default active tab page is the first page. You can assign values to the fields of the structure before the selection screen is displayed, and so set a subscreen dynamically.

If you assign a normal subscreen screen to a tab title, the dialog modules containing its flow logic must be defined in the current ABAP program. If the subscreen is a selection screen, user actions will trigger the AT SELECTION-SCREEN event and its variants (see Selection Screen Processing). This includes when the user chooses a tab title. If one selection screen is included on another, AT SELECTION-SCREEN will be triggered at least twice – firstly for the "included" selection screen, then for the selection screen on which it appears.

Don't forget to reward if useful...

Former Member
0 Kudos
80

hi kumar

Check these programs in SE38

TabStrips

demo_dynpro_tabstrip_local

demo_dynpro_tabstrip_server

also c the following link these will be really helpfull

http://help.sap.com/saphelp_nw2004s/helpdata/en/24/23b937ba187121e10000009b38f8cf/frameset.htm

http://help.sap.com/saphelp_47x200/helpdata/en/17/5bf1b52ba211d2954f0000e8353423/content.htm

regards

navjot

reward points if helpfull

Former Member
0 Kudos
80

hI ,

i NEED TO CREATE 3 TAB WITH JUST HEADING A , B , C that all , Can you provide exact coding ?

0 Kudos
80

Hi,

this is a one with three tabs check it.

TABLES:SSCRFIELDS.

SELECTION-SCREEN BEGIN OF SCREEN 2001 AS SUBSCREEN.

PARAMETERS:NAME(6) TYPE C DEFAULT 'BHARAT'.

SELECTION-SCREEN END OF SCREEN 2001.

SELECTION-SCREEN BEGIN OF SCREEN 2002 AS SUBSCREEN.

PARAMETERS:NUM(2) TYPE N DEFAULT 10.

SELECTION-SCREEN END OF SCREEN 2002.

SELECTION-SCREEN BEGIN OF SCREEN 2003 AS SUBSCREEN.

PARAMETERS:NUM1(2) TYPE N DEFAULT 10.

SELECTION-SCREEN END OF SCREEN 2003.

SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 4 LINES.

SELECTION-SCREEN TAB (6) tabs1 USER-COMMAND ucomm1

DEFAULT SCREEN 2001.

SELECTION-SCREEN TAB (6) tabs2 USER-COMMAND ucomm2

DEFAULT SCREEN 2002.

SELECTION-SCREEN TAB (6) tabs3 USER-COMMAND ucomm3

DEFAULT SCREEN 2003.

SELECTION-SCREEN END OF BLOCK tabb1.

WRITE:/ NAME,NUM,num1.

INITIALIZATION.

tabs1 = 'afhf'.

tabs2 = 'bfhg'.

tabs3 = 'hjhj'.

AT SELECTION-SCREEN.

CASE SSCRFIELDS-UCOMM.

WHEN 'UCOMM1'.

tabb1-prog = SY-CPROG.

tabb1-dynnr = 2001.

tabb1-activetab = 'TABLE1'.

WHEN 'UCOMM2'.

tabb1-prog = SY-CPROG.

tabb1-dynnr = 2002.

tabb1-activetab = 'TABLE2'.

WHEN 'UCOMM3'.

tabb1-prog = SY-CPROG.

tabb1-dynnr = 2003.

tabb1-activetab = 'TABLE3'.

ENDCASE.

rgds,

bharat.