cancel
Showing results for 
Search instead for 
Did you mean: 

Reg Dropdownbyindex

Former Member
0 Kudos

Hi all,

I need to use Dropdownbyindex UI element in my application.

My requirement is to populate the dropdown with the values from a Ztable in WDDOINIT method through an internal table to the dropdown context node.

Please suggest me possible solutions in using DDbyindex and codes to perform this.

Regards,

Dinesh

Accepted Solutions (0)

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi

place the DropDownByIndex UI Element in your view and bind to the context attribute.

Use the following code to populate some data in the drop down.

data: lr_node type ref to if_wd_context_node.

data: lr_info type ref to if_wd_context_node_info.

data: lt_value_set type WDR_CONTEXT_ATTR_VALUE_LISTGEN.

data: ls_value_set type WDR_CONTEXT_ATTR_VALUE.

lr_node = wd_context->get_child_node( '<node_name>' ).

lr_info = lr_node->get_node_info( )

< select query to get the details from your Z-table

and fill lt_value_set table with Key value pairs >

lr_info->SET_ATTRIBUTE_VALUE_SET( name = '<attribute_name_binded to the dropdown>'

value_set = lt_value_set ).

Abhi