2007 Jan 12 7:01 AM
Hi,
I want to know the a bit of overview of "containers".
I am aware of what classes ment in C/C++/Java.Is it the same.
It would be a gr8 help if you could give a few example of how to use container in ABAP(Even a gud link will be helpful).
Regards,
Chirantan
2007 Jan 12 7:03 AM
2007 Jan 12 7:11 AM
2007 Jan 12 7:08 AM
Chirantan,
As Amit Tyagi said DWDM is the Tcode to get examples.
Pls. reward if helpful
2007 Jan 12 7:18 AM
Hi chirantan,
There 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.