on 04-01-2008 6:46 AM
Hi all,
What are the main differences between DropdownByIndex & DropdownByKey?
Regards,
Ravi.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.