Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Values for dynamically created attributes not being displayed in ALV

Hi experts,

I have created a Web Dynpro application where the user enters a range of months, and certain cash amounts are displayed in each month in an ALV based on a set of predefined criteria. To create these months, I created a node, and to this node I added the dynamic attributes as shown below.

LOOP AT lt_dates INTO lv_date.

alv_node_info = alv_node->get_node_info( ).

"GET THE NAME OF THE COLUMN BASED ON THE BUSINESS RULES

lv_name = zcl_dpr_shared=>get_date_name( lv_date ).

attr_info-name = lv_name.

attr_info-type_name = 'NUMC15'.

alv_node_info->add_attribute( attr_info ).

ENDLOOP.

This piece of code works. I then add elements of this type to the alv_node as follows

lr_alv_data_elem = lr_node->create_element( ).

......

lr_alv_data_elem->set_attribute( name = 'lv_name'

value = lv_amount ).

.....

lr_alv_data_elem->set_attribute( name = lv_date_name

value = lv_amount ).

The node has already been bounded to the ALV, and all the static attributes are displayed, but not the dynamic attributes

Any idea why?

Thanks in advance

Johan Kriek

replied

Hi there,

for everyone who is still struggling with this issue the SAP Help gives a hint:

http://help.sap.com/saphelp_nwpi711/helpdata/en/49/3e09af347d3ef0e10000000a421937/frameset.htm (see context node, 3rd requirement)

Dynamical Attributes are not supported! That's it

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question