Skip to Content

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

DropdownByIndex in WebDynpro for abap

Hi

I am new to Dynpro form ABAP. Anybody tell how to create DropdownByIndex. Please help me.

regards

Arjun

Former Member
Former Member replied

Hi,

You have UI Elements Drop Down by index and Drop down by Key.You can drag and drop on to view and write the following code to populate values for 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_valueset type WDR_CONTEXT_ATTR_VALUE_LIST.
data: ls_valueset type line of WDR_CONTEXT_ATTR_VALUE_LIST.

ls_valueset-value = '1'.
ls_valueset-text = 'first option'.
append ls_valueset to lt_valueset.

ls_valueset-value = '2'.
ls_valueset-text = 'second option'.
append ls_valueset to lt_valueset.

lr_node = wd_context->get_child_node( '<Attribute node which is binded to Dropdown' ).
lr_info = lr_node->get_node_info( ).

lr_info->SET_ATTRIBUTE_VALUE_SET( name = '<attribute name binded to dropdown>'
value_set = lt_valueset ).

also check this example

WDR_TEST_UI_ELEMENTS

WDR_TEST_EVENTS.

Thanks

Suman

Edited by: suman kumar chinnam on Sep 10, 2008 9:40 AM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question