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

Difference between table control and ALV container

Former Member
0 Likes
1,481

Hi All,

Please tell me the difference between table control and ALV container.

Thanks & Regards

Gowthami.

3 REPLIES 3
Read only

Former Member
0 Likes
860

Hi,

ALV is used to display the report output whereas table control is used in module pool program to display the line item or any details.

Thanks

Vasudha

Read only

former_member191735
Active Contributor
0 Likes
860

table control is where you display data. container is to tell program where to display the data. On the screen, you can create a container then the table control will be placed automatically if you use alv classes. table control - you can draw the table control on screen and you need to assign work area and need to define all necessary variables.

find the same in help first then post it here.

Read only

Former Member
0 Likes
860

for alv container

Refer the link -

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIDOCK/BCCIDOCK.pdf

here are five kinds of SAP Containers:

1.The SAP Custom Container allows you to display controls in an area defined on a normal

screen using the Screen Painter.

Class: CL_GUI_CUSTOM_CONTAINER

2. The SAP Dialog Box container allows you to display controls in an amodal dialog box or

fullscreen.

Class: CL_GUI_DIALOGBOX_CONTAINER

3. The SAP Docking Container allows you to attach a control to any of the four edges of a screen as a resizable screen area. You can also detach it so that it becomes an independent amodal dialog box.

Class: CL_GUI_DOCKING_CONTAINER

4. The SAP Splitter Container allows you to display more than one control in a given area by dividing it into cells.

Class: CL_GUI_SPLITTER_CONTAINER

5. The SAP Easy Splitter Container allows you to divide an area into two cells with a control in each. The cells are separated by a moveable splitter bar.

Class: CL_GUI_EASY_SPLITTER_CONTAINER

1. DATA: alv TYPE scrfname VALUE 'ALV',

obj_c_container_alv TYPE REF TO cl_gui_custom_container,

obj_grid TYPE REF TO cl_gui_alv_grid.

CREATE OBJECT obj_c_container_alv

EXPORTING

container_name = alv

.

IF obj_grid IS INITIAL.

CREATE OBJECT obj_grid

EXPORTING

i_parent = obj_c_container_alv.

3. CREATE OBJECT w_docking_container

EXPORTING

ratio = 95

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5

others = 6.

CREATE OBJECT w_alv_grid

EXPORTING

i_parent = w_docking_container.

4. CREATE OBJECT obj_c_container_alv

EXPORTING

container_name = alv

.

IF obj_grid IS INITIAL.

CREATE OBJECT v_split

EXPORTING

parent =

obj_c_container_alv

  • left = 0

  • top = 300

  • width = 400

  • height = 200

rows = 2

columns = 1

  • ORIENTATION = 0

  • sash_position = 25

  • with_border = 0

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

others = 3.

  • Set row height for row 1

CALL METHOD v_split->set_row_height

EXPORTING

id = 1

height = 40.

5. CREATE OBJECT obj_c_container_alv

EXPORTING

container_name = alv

.

IF obj_grid IS INITIAL.

CREATE OBJECT v_split

EXPORTING

parent = obj_c_container_alv

ORIENTATION = 0

  • sash_position = 25

  • with_border = 0

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

others = 3.

  • Get the containers of the splitter control

v_contnr_top = v_split->top_left_container.

v_contnr_bot = v_split->bottom_right_container.

CREATE OBJECT obj_grid

EXPORTING

i_parent = obj_c_container_alv.

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

check these links

http://www.sapgenie.com/abap/OO/

http://www.sapgenie.com/abap/OO/index.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm

http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt

http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf

http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt

http://www.allsaplinks.com/

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

http://www.sapgenie.com/

http://help.sap.com

http://www.sapgenie.com/abap/OO/

http://www.sapgenie.com.

http://www.sapgenie.com/abap/OO/index.htm

http://www.sapgenie.com/abap/controls/index.htm

http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf

http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf

http://www.sapgenie.com/abap/OO/index.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm

http://www.sapgenie.com/abap/OO/

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

SAP Custom Container

Use

Use the SAP Custom Container to build a control into an area on a screen or subscreen. You define the area occupied by the control in the Screen Painter.

The default size of the control that you place in the Custom Container is the same as that of the container itself.

Prerequisites

Before you can include a control in a Custom Container, you must define the area that the container will occupy. You do this in the Screen Painter.

http://help.sap.com/saphelp_nw04/helpdata/en/64/9e7759068011d294f000a0c94260a5/frameset.htm

the above link gives the procedure to create a container.

Also, Jus go thro the following links.

http://help.sap.com/saphelp_nw04s/helpdata/en/7f/485382045211d294ed00a0c94260a5/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/83/7a1901de6e11d195460000e82de14a/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/e9/635fa6e01e11d195490000e82de14a/frameset.htm

for table control

chk this SAP help

Table controls are used to display large quantities of data in tables. Like all screen elements, they are defined in the Screen Painter. Within a table control, you can display input/output fields, radio buttons, checkboxes, radio button groups, and pushbuttons. You can have up to 255 columns and each column can have a heading. The first row is always the header row.

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

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

Example

http://members.aol.com/_ht_a/skarkada/sap/table_control/table_control.htm

Table controls are used to display large quantities of data in tables. Like all screen elements, they are defined in the Screen Painter. Within a table control, you can display input/output fields, radio buttons, checkboxes, radio button groups, and pushbuttons. You can have up to 255 columns and each column can have a heading. The first row is always the header row.

1. You can use the resizing attributes to specify whether the table control can resize the screen vertically or horizontally. If the control supports resizing, you can specify a minimum size for it.

2. You can define column headers that are also pushbuttons. You can use the pushbutton to select the column.

3. The width and position of columns can be changed by the user or by the program.

4. You can save the current settings as a default setting for a user.

5. Vertical scrolling with a scroll bar

6. Horizontal scrolling with a scroll bar

7. You can fix a number of lead columns that cannot be moved by the user.

8. A selection column enables you to select rows.

The only actions that trigger a PAI event are changes to the size of the screen (if the resizing attributes are selected), vertical scrolling, and saving settings. All other user actions are handled by the presentation server.

A table control displayed on a screen is a repeated series of table rows. Each row contains one or more screen elements, and all rows have the same structure. The step loop technique is used to pass data between the table controls and the ABAP program. To enable this, the screen flow logic and the ABAP program must be programmed accordingly