cancel
Showing results for 
Search instead for 
Did you mean: 

differnce between drop down by key and index.

Former Member
0 Kudos

what is the difference between drop down by key and drop down by index.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Venki,

DropDownByKey

-


A DropDownByKey UI element provides the user with a selection list from which he or she can select no more than one entry. The UI element consists of a text field, a button, and a selection list. Any list entry already selected is displayed in the text field. When you select the pushbutton, a list with all possible values is displayed.

DropDownByIndex

-


A DropDownByIndex UI element provides the user with a dropdown list box. You cannot select more than one entry from the selection list. The UI element consists of a text field, a button, and a selection list. Any list entry already selected is displayed in the text field. When selecting the button, a list with all possible values is displayed.

Differences

-


1.) The DropDownByIndex variant gets the selection from a context node (lead selection). So to select a certain entry, set the lead selection for this node where as The DropDownByKey variant gets its selection from the context attribute to which the "selectedKey" property is bound. To set the selection, set the value of this context attribute to the key

2.) However, the data binding model for the DropDownByKey UI element has a completely different concept.

The two types of DropDown's elements do not differ from each other when displayed on the screen.

With Regards,

Roop Kumar.

Answers (7)

Answers (7)

Former Member
0 Kudos

in DropdownByKey you use with Key value pair. eg if you want to Display names of employees in UI and when user selects particular Employee from DropDown you want to get Employee id for that particular record then go for DropDownByKey. For dropdownbykey when u call get method for attribute binded to UI element you get corresponding key for that value. Where as for dropdownby index only values are (ie in above example Names of employees) binded.

Former Member
0 Kudos

Hi,

Drop down by key

If u r having less than 30 values go to drop down by key.

(it will accept only 30 values).

Drop down by index

if u r getting values from R3 system go to drop down by index

(it will accept 200 values).

Regards,

Sunaina Reddy T

Former Member
0 Kudos

Where did you get this wisdom?

Armin

srinivas_sistu
Active Contributor
0 Kudos

Hi Sunaina,

If u r having less than 30 values go to drop down by key.

(it will accept only 30 values).

Dropdown by key accepts more than 30 values, if you dont believe just try.

Regards,

Srinivas.

Former Member
0 Kudos

Hi venki,

dropdownby key is used for fetching data from web dynpro simpe type which is created in local dictionry..

n drop downby index is used for fetching values from code.

]

Regards

Khushboo

Former Member
0 Kudos

hi

Theres a differrence in the type of bindin the data with bothe these ui elemnts

go thru this link it will surely clear all your doubts

http://help.sap.com/saphelp_nw04/helpdata/en/74/450e8af57065468e88e4b86de47e4b/frameset.htm

Former Member
0 Kudos

hi,

Drop down by key will be used to map simple types created in dictionary . This simple type will have Key and the value. The value will be displayed in the drop down and by selecting it, we can get the corresponding key.

Drop down by index will be used to map the context of 0..n cardinality and we will get mapped index.

You can refer the following link to get more details

http://help.sap.com/saphelp_nw04/helpdata/en/74/450e8af57065468e88e4b86de47e4b/frameset.htm

Also check this forum,

I hope it helps

Former Member
0 Kudos

hi,

A DropDownByIndex UI element provides the user with a dropdown list box. You cannot select more than one entry from the selection list. The UI element consists of a text field, a button, and a selection list. Any list entry already selected is displayed in the text field. When selecting the button, a list with all possible values is displayed.

http://help.sap.com/search/highlightContent.jsp

DropDownByKey

http://help.sap.com/saphelp_nw70/helpdata/EN/08/13dbfb6e779743bb2ca641ebcb3411/frameset.htm

Former Member
0 Kudos

Hi,

refer this thread

Regards,

ramesh