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: 

what are the uses of table control and tabstrip control

Former Member
0 Kudos

can anyone tell me the uses of table control and tabstrip control

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Wehenever you wants to display a multiple records based on a single Header record we use this table control

Take any application doc like Sales order, Pur order, Pur reqn etc

for one header record there will be multiple item records which were displayed in the table control

Tabstrip is also used to display different views for the same header data

for example for a material you have General data view, Sales view, Plant view, MRP view, Accounting view

for different viws we use one tabstrip and it is easy to view all related data of that material easily using the tab strip.

We design these table control and tab strip using the module pool programming

see the concepts of them

Check the below link:

http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F

http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm

http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm

http://sap.mis.cmich.edu/sap-abap/abap09/index.htm

http://www.geocities.com/ZSAPcHAT

http://www.allsaplinks.com/files/using_table_in_screen.pdf

http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm

http://www.sapdevelopment.co.uk/dialog/dialoghome.htm

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

http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm

http://www.sapgenie.com/links/abap.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm

You can also check the transaction ABAPDOCU which gives you lot of sample programs.

Also you can see the below examples...

Go to se38 and give demodynpro and press F4.

YOu will get a list of demo module pool programs.

One more T-Code is ABAPDOCU.

YOu can find more examples there.

See the prgrams:

DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement

DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB

http://www.geocities.com/ZSAPcHAT

http://www.allsaplinks.com/files/using_table_in_screen.pdf

Reward points for useful Answers

Regards

Anji

6 REPLIES 6

Former Member
0 Kudos

Hi

Wehenever you wants to display a multiple records based on a single Header record we use this table control

Take any application doc like Sales order, Pur order, Pur reqn etc

for one header record there will be multiple item records which were displayed in the table control

Tabstrip is also used to display different views for the same header data

for example for a material you have General data view, Sales view, Plant view, MRP view, Accounting view

for different viws we use one tabstrip and it is easy to view all related data of that material easily using the tab strip.

We design these table control and tab strip using the module pool programming

see the concepts of them

Check the below link:

http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F

http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm

http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm

http://sap.mis.cmich.edu/sap-abap/abap09/index.htm

http://www.geocities.com/ZSAPcHAT

http://www.allsaplinks.com/files/using_table_in_screen.pdf

http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm

http://www.sapdevelopment.co.uk/dialog/dialoghome.htm

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

http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm

http://www.sapgenie.com/links/abap.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm

You can also check the transaction ABAPDOCU which gives you lot of sample programs.

Also you can see the below examples...

Go to se38 and give demodynpro and press F4.

YOu will get a list of demo module pool programs.

One more T-Code is ABAPDOCU.

YOu can find more examples there.

See the prgrams:

DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement

DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB

http://www.geocities.com/ZSAPcHAT

http://www.allsaplinks.com/files/using_table_in_screen.pdf

Reward points for useful Answers

Regards

Anji

Former Member
0 Kudos

Hi,

table control is more comfortable for customizing.scroll bars all possible in this.where as it is not possible in step loops.

check this example.

PROGRAM ZBHTCTRL.

TABLES: LFA1, EKKO.

DATA: OKCODE1 LIKE SY-UCOMM,

OKCODE2 LIKE SY-UCOMM.

CONTROLS TABC TYPE TABLEVIEW USING SCREEN 1001.

DATA: BEGIN OF ITAB OCCURS 0,

MANDT LIKE EKKO-MANDT,

EBELN LIKE EKKO-EBELN,

BSTYP LIKE EKKO-BSTYP,

BSART LIKE EKKO-BSART,

END OF ITAB.

MODULE USER_COMMAND_1000 INPUT.

CASE OKCODE1.

WHEN 'BACK'.

SET SCREEN 0.

WHEN 'NEXT'.

SET SCREEN 1001.

SELECT * FROM EKKO INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE

LIFNR = LFA1-LIFNR.

ENDCASE.

ENDMODULE. " USER_COMMAND_1001 INPUT

MODULE MOVE_DATA OUTPUT.

EKKO-MANDT = ITAB-MANDT.

EKKO-EBELN = ITAB-EBELN.

EKKO-BSTYP = ITAB-BSTYP.

EKKO-BSART = ITAB-BSART.

ENDMODULE. " MOVE_DATA OUTPUT

MODULE USER_COMMAND_1001 INPUT.

CASE OKCODE2.

WHEN 'BACK'.

SET SCREEN 1000.

ENDCASE.

ENDMODULE. " USER_COMMAND_1001 OUTPUT

MODULE STATUS_1001 OUTPUT.

SET PF-STATUS 'MENU'.

SET TITLEBAR 'TIT'.

ENDMODULE. " STATUS_1001 OUTPUT

MODULE STATUS_1000 OUTPUT.

SET PF-STATUS 'DMENU'.

  • SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_1000 OUTPUT

FORM ON_CTMENU_FORM1 USING CMENU TYPE REF TO CL_CTMENU.

CALL METHOD CMENU->LOAD_GUI_STATUS

EXPORTING

PROGRAM = ' ZBHTCTRL'

STATUS = 'CMENU'

MENU = CMENU.

CALL METHOD CMENU->ADD_FUNCTION

EXPORTING

FCODE = 'RX'

TEXT = 'RECIEVE'.

ENDFORM.

FLOW LOGIC:

PROCESS BEFORE OUTPUT.

MODULE STATUS_1000.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_1000.

PROCESS BEFORE OUTPUT.

MODULE STATUS_1001.

LOOP AT ITAB WITH CONTROL TABC CURSOR TABC-TOP_LINE.

MODULE MOVE_DATA.

ENDLOOP.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_1001.

LOOP AT ITAB.

ENDLOOP.

for more info check this link.

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm

thanks

Ashu.

Former Member
0 Kudos

Hi babu,

Table Control :

Table Control is used in Module Pool Programming.

Table Control is used to display data of any internal table of ur program or the data from dictionary table directly ino a table format.

Using table control with the help of screen painter, data can be easily displayed.

It can be created manually through coding or using Table Control Wizard given in the sreen painter.

Tabstrip control :

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.

Thanks,

Reward If Helpful.

Former Member
0 Kudos

Hi,

Table control and Tabstrip are special type of GUI elements, called as Controls. The structure for both these elements are defined in the type-pool CXTAB.

You need to use type-pools CXTAB. statement in you program to use them.

And you need to define them using the keywork CONTROLS.

Check these programs in SE38

TabStrips

demo_dynpro_tabstrip_local

demo_dynpro_tabstrip_server

Table Control

demo_dynpro_tabcont_loop

demo_dynpro_tabcont_loop_at

These are the standard SAP examples on table contorls and tab strips.

Tabstrip:

In a simple definition Tabstrip is nothing but a series of subscreens attached together , and the control is on the tabs related to them . you can use a same subscreen area or different subscreen area for designing the screens with elements .

Table control :

Table control is a replica of a table present in the database on the screen .

Use of Tabstrip in SAP :

You esp. use tabstrip control when you want to display many subscreens together in one area ion your main screen . In Transaction MM01 , after you provide the values in the 1st screen , you are headed towards the next screen which has got many views linked . There for each view , when you click the control ( like basic view 1 / basic view 2 / MRP etc ) , the respective subscreen area appear on the screen .And you provide the values in their respective fields . this is a good example for understanding what are tabstrip controls . there may be any number of fields from any number of tables in a table control , I mean you can not take the fields directly from different tables and put it into the Tab. control , instead you can create a structure or itab collecting fields you want to present in the TC and the crete a table control taking reference from that structure .. I hope these explanations are satisfactory to you ...

Check these too.

Table Control

http://help.sap.com/saphelp_nw2004s/helpdata/en/45/adee2396f711d1b46b0000e8a52bed/frameset.htm

Tab Strips

http://help.sap.com/saphelp_nw2004s/helpdata/en/6d/5da5428295c911e10000000a1550b0/frameset.htm

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

http://help.sap.com/saphelp_nw2004s/helpdata/en/04/10f2469e0811d1b4700000e8a52bed/frameset.htm

Regards,

Padmam.

Former Member
0 Kudos

hi,

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.

Also Check these links......

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/022ba607-0301-0010-e382-fdedca55...

http://help.sap.com/saphelp_46c/helpdata/en/fd/02da2a61d811d295750000e8353423/frameset.htm

thanks

Ashu.