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

create object

Former Member
0 Likes
1,463

hi

i am new to OO-ABAP.

i am creating an object with ref to a class.


data:       g_custom_container type ref to cl_gui_custom_container,

create object g_custom_container
                  exporting container_name = 'CUST_CONT'.

could anybody pls clarify that what is the parameter <b>CONTAINER_NAME</b> is for? i cannot see that parameter in the class. could somebody pls explain me the same.

thanks in advance.

srini

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,063

You have to go in se24 to display "cl_gui_custom_container"

see the signatur of the CONSTRUCTOR method

and container_name is "Name of the dynpro CustCtrl name to link this container to".

You have first to define in your DYNPRO a custom container with the SCREEN PAINTER and give it a name, for ex 'CUST_CONT'.

Then you create the object and can use it (for example to display a grid...)

3 REPLIES 3
Read only

uwe_schieferstein
Active Contributor
0 Likes
1,063

Hello Srinivasan

Have a look at the sample report <b>BCALV_GRID_DEMO</b>. The container name is the name of the custom control on the dynpro where you want to display your ALV list. This way you "attach" your container instance to this custom control element on the screen.

Regards

Uwe

Read only

Former Member
0 Likes
1,064

You have to go in se24 to display "cl_gui_custom_container"

see the signatur of the CONSTRUCTOR method

and container_name is "Name of the dynpro CustCtrl name to link this container to".

You have first to define in your DYNPRO a custom container with the SCREEN PAINTER and give it a name, for ex 'CUST_CONT'.

Then you create the object and can use it (for example to display a grid...)

Read only

Former Member
0 Likes
1,063

Hello srinivasan

container-name is a parameter in constructor of cl_gui_custom_container class, it holds the name of th 'custom control' which u have pasted on the screen and this inturn holds the alv grid at run time.

so when u create an instance of cl_gui_custom_container it asks for the parameter container_name, give the name of the custom control u have pasted in your screen.