cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown in table control

0 Kudos

Hi,

I have a dropdown field in my table control which is bound to an independent node. The rest of the fields in the table are bound

to a different context node.

When i select a value in the dropdown for a particular row, all the values for the particular column get selected with the same value. How do i solve this?

Regards,

Victoria Wilma

Accepted Solutions (0)

Answers (6)

Answers (6)

0 Kudos

Hi,

I have used dropdown by key now but only 1 value is displayed in the dropdown.

The dropdown is bound to an independent context node which has 1 attribute.

In the init, i am populating the dropdown with the values.But now only 1 value is gettin displayed in the dropdown.

How do i make the dropdown display all the values?

Regards,

Victoria Wilma

Former Member
0 Kudos

hi Victoria,

Now as you are using dropdown by key UI inside Table, create a context attribute inside the node binded to Table.

1.Let node be 'ENTERTMNT_DETAILS' binded to Table.

2.HAve once more attribute inside this node only say RELATION.

3. Now bind the Dropdown by key with this attribute Relation.

For populating values to this attribute, you can write below mentioned code in Wddoinit() :

DATA : node_info TYPE REF TO if_wd_context_node_info,

value1 TYPE wdy_key_value,

set TYPE wdy_key_value_table,

k1 type string value '',

v1 type string value 'External',

k2 type string value '1',

v2 type string value 'Internal',

k3 type string value '2',

v3 type string value 'HCP'.

*

value1-key = k1.

value1-value = v1.

APPEND value1 to set.

value1-key = k2.

value1-value = v2.

APPEND value1 to set.

value1-key = k3.

value1-value = v3.

APPEND value1 to set.

node_info = wd_context->get_node_info( ).

node_info = node_info->get_child_node('ENTERTMNT_DETAILS').

node_info->set_attribute_value_set( name = 'RELATION' value_set = set ).

I hope it will help you.

The dropdown is bound to an independent context node which has 1 attribute.

You dont have to bind dropdown with node but in this case , it is to be binded with attribute Relation.

0 Kudos

Hi,

Since my dropdown is bound to a node and the dropdown is in the table. Each time i make a seletion in the drop based on lead index, the element in the context node is set and so all the rows in the table get the same value.

Will dropdown by key help in such scenario?

Regards,

Victoria Wilma

Former Member
0 Kudos

hi,

Dropdown by key will also work if you have the attribute binded to Dropdown by key inside the node binded to Table.

Former Member
0 Kudos

I guess you have to go for only One node for table. Inside this node , have another node for Dropdown by index.

That would work.

Former Member
0 Kudos

Refer this Article on Using Drop Down By Index in Table UI Element with Web Dynpro ABAP

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c03227f9-e48f-2c10-4bad-8ebdec704f3d

Former Member
0 Kudos

hi Victoria ,

1) Under your main Context Node create a Child Node for your drop down list box in a Key Value pair format. {Create your node in component controller}

2) For your Child node create a Supply Function fill in the drop down list based based on respective record of your table.

3) Create a Table UI and change the UI element as the Drop down by index for your desired column.

refer the threads :

for exactly the same requirement

rgds,

amt

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Are you using dropdown by key or dropdown by index in the table.

Priya

0 Kudos

Hi Priya,

Im using drop down by index in my table.

Regards,

Victoria Wilma