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

Need sample code on Tabstrips

Former Member
0 Likes
3,489

Hi all,

Could you please provide me a sample code for Tabstrip handling in Module pool.

Regards,

Ram.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,959

Please check these programs

DEMO_DYNPRO_TABSTRIP_LOCAL

DEMO_DYNPRO_TABSTRIP_SERVER

DEMO_SEL_SCREEN_IN_TABSTRIP

DEMO_SEL_SCREEN_WITH_TABSTRIP

Also check the link below

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

Edited by: Rajesh on Jul 8, 2008 4:16 PM

8 REPLIES 8
Read only

Former Member
0 Likes
1,960

Please check these programs

DEMO_DYNPRO_TABSTRIP_LOCAL

DEMO_DYNPRO_TABSTRIP_SERVER

DEMO_SEL_SCREEN_IN_TABSTRIP

DEMO_SEL_SCREEN_WITH_TABSTRIP

Also check the link below

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

Edited by: Rajesh on Jul 8, 2008 4:16 PM

Read only

Former Member
0 Likes
1,959

Check the std. program DEMO_DYNPRO_TABSTRIP_LOCAL.

Regards,

Joy.

Read only

Former Member
0 Likes
1,959
Read only

former_member386202
Active Contributor
0 Likes
1,959

Hi,

check this code.give the tab strip name as tabs,and okcode as okcode.

i have given flow logic of te screens also check it.

PROGRAM ZBHTSTRIP.

DATA:OKCODE LIKE SY-UCOMM.

DATA: N1 TYPE I, N2 TYPE I, R1 TYPE I, R2 TYPE I.

DATA SCRNO(4) TYPE N VALUE 2001.

CONTROLS TABS TYPE TABSTRIP.

MODULE USER_COMMAND_1001 INPUT.

CASE OKCODE.

WHEN 'ADD'.

R1 = N1 + N2.

SCRNO = 2001.

TABS-ACTIVETAB = OKCODE.

WHEN 'MUL'.

R2 = N1 * N2.

SCRNO = 2002.

TABS-ACTIVETAB = OKCODE.

WHEN 'BACK'.

SET SCREEN 0.

WHEN 'CLEA'.

CLEAR: N1,N2.

ENDCASE.

ENDMODULE. " USER_COMMAND_1001 INPUT

FORM ON_CTMENU_FORM1 USING MENU1 TYPE REF TO CL_CTMENU.

CALL METHOD MENU1->LOAD_GUI_STATUS

EXPORTING

PROGRAM = 'ZBHTSTRIP'

STATUS = 'MENU1'

MENU = MENU1.

CALL METHOD MENU1->ADD_FUNCTION

EXPORTING

FCODE = 'EXIT'

TEXT = 'EXIT'.

ENDFORM.

MODULE STATUS_1001 OUTPUT.

SET PF-STATUS 'xxxxxxxx'.

SET TITLEBAR 'TIT1001'.

ENDMODULE. " STATUS_1001 OUTPUT

FLOW LOGIC:

1001 is a normal screen in which tab srtip should be there.in that create a sub screen area common for both the tabs.

PROCESS BEFORE OUTPUT.

MODULE STATUS_1001.

CALL SUBSCREEN SUBA INCLUDING 'ZBHTSTRIP' SCRNO.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_1001.

CALL SUBSCREEN SUBA.

these two(2001,2002) are the sub screens in which fields should be created.

PROCESS BEFORE OUTPUT.

MODULE STATUS_2001.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_2001.

PROCESS BEFORE OUTPUT.

MODULE STATUS_2002.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_2002.

***************************************************

goto tcode abapdocu.

select ABAP User Dialogs ->Screens ->Complex Screen Elements ->Tabstrip Control - Scrolling in GUI

Regards,

Prashant

Read only

Former Member
0 Likes
1,959

hi,

go through this link

[link|http://www.saptechies.com/tabstrip-control-2/]

regards,

sandeep

Read only

Former Member
0 Likes
1,959

Hi,

Tabstrips belong to type group CXTAB... You can check the components of the structure

case okcode.

when 'MARA' or ' '.

tabcntl-activetab = 'MARA'.

w_number = '0110'.

when 'MARC'.

tabcntl-activetab = 'MARC'.

w_number = '0120'.

when 'EMPL'.

tabcntl-activetab = 'EMPL'.

w_number = '0130'.

when 'BACK' or 'CANCEL' or 'EXIT'.

leave to screen 0.

when 'SAVE'.

endcase.

regards

padma

Read only

Former Member
0 Likes
1,959

Hi Ram,

Check this link for example:

http://sap.niraj.tripod.com/id59.html

http://abap-gallery.blogspot.com/2007/07/tabstrip-in-selection-screen.html

http://www.sap-img.com/ge001.htm

Hope this helps you.

Regards,

Chandra Sekhar

Edited by: Chandrasekhar Gandla on Jul 8, 2008 12:52 PM