cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Table

fabio_bellocchio
Participant
0 Kudos

Please, can anybody tell me how a "CL_SALV_WD_CONFIG_TABLE" object is linked to an UI element, in order to be shown in the View??

I am trying to find it out in the system that I have to debug, but so far, unsuccessfully.

Thank you all!

Fabio

Accepted Solutions (1)

Accepted Solutions (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

to get the object instance

data:

lr_salv_wd_table_usage type ref to if_wd_component_usage.

lr_salv_wd_table_usage = wd_this->wd_cpuse_salv_wd_table( ).

if lr_salv_wd_table_usage->has_active_component( ) is initial.

lr_salv_wd_table_usage->create_component( ).

endif.

*... get ALV component

data:

lr_salv_wd_table type ref to iwci_salv_wd_table.

data: lr_table type ref to cl_salv_wd_config_table.

lr_salv_wd_table = wd_this->wd_cpifc_<component_usage_name>( ).

*... (1) get ConfigurationModel from ALV Component

lr_table = lr_salv_wd_table->get_model( ).

Abhi

fabio_bellocchio
Participant
0 Kudos

Thank you Abhi (pts assigned!).

But, in which moment, exactly, is this code embedding the table into the view? I mean, in which moment are we defining: "this table will appear in the screen inside the "ViewContainer1" UI Element" ?

Thank you!

abhimanyu_lagishetti7
Active Contributor
0 Kudos

At design time only you have embedded the component in the View Container UI element right?

I think you want to ask at which moment the ALV component is getting instantiated, this is not known, which is decided by the framework, that is why we are checking whether there is active component first if not we are creating, if it already exists then the framework internaly created the component

Abhi

fabio_bellocchio
Participant
0 Kudos

Hi Abhi,

my question is exactly about embedding the component in the View Container UI element, because there is nothing graphically defined at design time, in the View Layout (there is only an empty Container, but, when running, the application shows the table).

Would it be coded? Where?

Thanks

0 Kudos

Hi Fabio,

The table is fixed as per the context binding you have made, but you can change the columns, the order of the columns, add buttons to the alv etc.

you can have a method where you can write the code to function at runtime. this method can be called anytime and from anywhere.

is this your requirement?

please let me know.

Regards,

Ritwik.

fabio_bellocchio
Participant
0 Kudos

Hi

is this context binding in the code?

Where can I find the binding of the context node to the ALV?

Thanks

Former Member
0 Kudos

Hi Fabio,

No need to code to show the ALV table.Place Viewcontainer UI element in your view and go to the window drag and drop your view on to the window then right click on that to embed the view ,now a pop up will appear select view TABLE of Interface controller.

Go through this blog to explain steps to create simple ALV in Web Dynpro for ABAP

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3439404a-0801-0010-dda5-8c14514d...

fabio_bellocchio
Participant
0 Kudos

I got it.

Thank you very much!

Fabio

Answers (0)