cancel
Showing results for 
Search instead for 
Did you mean: 

drop down by key

Former Member
0 Kudos

hi

i m new in WD ABAP. i have 10 values in drop Down by Key. and i want to display a particular value which is selected. tell how to proceed for that.

Accepted Solutions (1)

Accepted Solutions (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

just use the code wizard and read the context attribute value

Abhi

Answers (1)

Answers (1)

I039810
Advisor
Advisor
0 Kudos

Hi,

Say you have those 10 values in a table lt_values.

Now bind the table to the node using bind_table( ) method in the supply function.

Bind the key attribute to the dropdown.

Regards,

Shalini.

Former Member
0 Kudos

Hi Pankaj ,

I think abhi has given you the solution and if u didnt understand it i,ll just breif it..

You have 10 values in your dropdown list and now u want that if u select some value it should get display some where(can be a label , inputfield or textview etc ) correct me if i am assuming wrong.

I ll tell you the process :

step 1: get the data selected in dropdown by using get attribute(by code wizard)

step 2:set the data to the attribute which has been linked with the element where u want to display the data , by using set attribute.

And i think the required code u can write easily.

Now also if you have any quiery feel free to ask

regards

Panky

Former Member
0 Kudos

hi

plz tell me the coding part also and if have any dummy program.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Use the code wizard, anyways

data: lr_node type ref to if_wd_context_node.

data: lr_element type ref to if_wd_context_element.

data: lv_value type <attribute type>

lr_node = wd_context->get_child_node( '<name of the node where your attribute binded to dropdown>' ).

lr_element = lr_node->get_lead_selection( ).

lr_element->get_attribute( exporting name = '<name of the attribute>'

importing value = lv_value ).

you will get the value into

Abhi