cancel
Showing results for 
Search instead for 
Did you mean: 

Diff between DropdownByIndex & Key?

Former Member
0 Kudos

Hi all,

What are the main differences between DropdownByIndex & DropdownByKey?

Regards,

Ravi.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member515618
Active Participant
0 Kudos

Hi ravi,

As Viji said, ther basic differnce come whit the way we dind the data.

With Drop down by Index

We build a sepetate context node with cardinality 0..N, to hold a list of values.

We bind a table to this context node with all possible options as list. This is then bound to the dropdown UI element.

The record that is selected from the list is set at the lead selected record. In the program we read the lead selected of the node and there by identify the selected.

Where as Dropdown by Key

The Attribute information in the node is read to identify the dropdown list values. If the attribute is of type some data dictionary element, the domain in read to identify if there is any

value range is maintained. If yes, those records are displayed.

If no range is maintained, then we can modify/create a new value set for the attribute dynamically by using some std methods like IF_WD_CONTEXT_NODE_INFO=>SET_ATTRIBUTE_VALUE_SET.

When building this value set, we define it as key value pair. Say

Key - AA

Value - American Airlines.

Key - IA

Value - Indian Airlines

When the dropdown is displayed, It comes up like

American Airlines.

Indian Airlines

and if user selects American airlines then in the back end, we get AA as the key selected.

So one basic contrast index is that the UI elements

bind against a context attribute and not against an attribute of a multiple node.

Former Member
0 Kudos

Hi Ravi,

Binding is the main difference between key and Index.

DropdownByKey is achieved by using Key binding and DropdownByindex is achieved by using Index binding.

For more information Check this link,

http://help.sap.com/saphelp_nw2004s/helpdata/en/45/d44e0cdff073b1e10000000a11466f/frameset.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4884180951809e10000000a155106/content.htm

Thanks.

Edited by: Viji on Apr 1, 2008 7:54 AM