cancel
Showing results for 
Search instead for 
Did you mean: 

DropdownByIndex in WebDynpro for abap

Former Member
0 Kudos

Hi

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

regards

Arjun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

HI,

THX FOR UR ANSWER.

MY PROBLEMIS SOLVED.

REWARDED POINTS.

Answers (0)