cancel
Showing results for 
Search instead for 
Did you mean: 

WD ALV displaying columns just from included structure

Former Member
0 Kudos

Hi everyone,

I am struggling with a problem in Abap Webdynpro application. I have a 'display' structure in which another structure (data structure) is included. I need to display all components of the display structure but, for some reasons ALV displays only those components, which are in included data structure. I am able to get the rest of columns only in runtime via ALV settings in UI (in this case ALV bypasses some settings which I hardcoded - column position, tooltip, and so on).

It's not the first time I do this, although it is the first time I am dealing with this kind of problem. I don't see any reasons for such behavior (I don't delete those columns, neither hide). I did reset the context node, did couple of restarts, I checked settings of these structures, but nothing works, everything seems to be set fine.

Any idea, where could be the problem? Any help would be appriciated.

Thank you guys.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Petr,

did you try the following:

  DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .

  lo_interfacecontroller =   wd_this->wd_cpifc_cpu_alv( ).



   lo_interfacecontroller->set_data(

*     only_if_new_descr =                 " wdy_boolean

      r_node_data =  lo_nd_node                     " ref to if_wd_context_node

   ).



DATA lv_value TYPE REF TO cl_salv_wd_config_table.

lv_value = lo_interfacecontroller->get_model( ).



  DATA: lo_column TYPE REF TO cl_salv_wd_column,

       lo_column_settings TYPE REF TO if_salv_wd_column_settings.



  lo_column_settings ?= lv_value.



  lo_column = lo_column_settings->get_column( 'ATTRIBUTE' ).

  lo_column->set_visible( 02 ).


in NODE choose your node of the structure and in ATTRIBUTE the column you wish to Display.

hope this helps,

regards,

Mathias

Former Member
0 Kudos

Hi Mathias,

I tried it after you replied, but still no effect. Columns are still hidden even though I set it visible.

Former Member
0 Kudos

are you getting all column in context node which you bind with alv component

Former Member
0 Kudos

Hi,

is it possible that you set the columns that have to be presented in any method?

Former Member
0 Kudos

Yes, in context node is the whole structure, all attributes of the structure. Then in method for setting ALV, there are all the columns. It is sure, that for the specific column, the visible property is set to visible (checked by debugging). No errors in set method. All goes fine until the ALV is displayed - without columns..

Former Member
0 Kudos

I don't really understand a question. I have just one method for setting the ALV, where I set the visibility of all columns to visible. As result I get only attributes which are in included data structure of a display structure.

Former Member
0 Kudos

Hi Petr,

perhaps try this command

 

DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .

  lo_interfacecontroller = wd_this->wd_cpifc_cpu_alv( ).



  lo_interfacecontroller->set_data(

*                           only_if_new_descr =                   " wdy_boolean

                            r_node_data       = lo_nd_NODE). " ref to if_wd_context_node

regards,

Mathias

Former Member
0 Kudos

Hello,

of course, that is how I get the data into ALV component from context.

Regards, Petr