cancel
Showing results for 
Search instead for 
Did you mean: 

Show dynamically created column in ALV

daniel_humberg
Contributor
0 Kudos

I have an ALV table that shows the 5 colums that are in my context.

When the user presses a certain button, i am adding a new context attribute to the context node dynamically.

  
  DATA lr_node_info      TYPE REF TO if_wd_context_node_info.
  DATA ls_attribute_info TYPE WDR_CONTEXT_ATTRIBUTE_INFO.

  lr_node_info = ir_context_node->get_node_info( ).

 ls_attribute_info-name = 'My_new_attribute'.
 ls_attribute_info-type_name = '\TYPE=WDR_STRING'.

 lr_node_info->add_attribute( ls_attribute_info ).

Now I would like to show this new attribute as a column in my ALV.

How can I get this working.

If I call "GET_COLUMNS" of the ALV configuration, the new column is not available.


lt_columns = ir_table->if_salv_wd_column_settings~get_columns( ).

What can I do?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Please see this: [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783];

Regards.

Answers (0)