cancel
Showing results for 
Search instead for 
Did you mean: 

diff bw DROPDOWNBYINDEX & DROPDOWNBYKEY

Former Member
0 Kudos

Hi,

Kindly tell me the differences between the UI elements "DROPDOWNBYINDEX" and "DROPDOWNBYKEY"..

Please explain with an example scenario.

Regards,

Kalai

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Here are some main differences between DropDownByIndex and DropDownByKey.

1) The data type of the attribute which is binded to DDBK, is a simple dictionary type, and DDBI is a simple data type.

2) DDBK will return the 'Key' when an item is selected --- DDBI will return the 'index' of the selected element.

regards,

Prabhakar.

Former Member
0 Kudos

Hi,

The diff between DDK and DDI is

The values u need to display in dropdown by using the Array u can utilize DDI.

The values u need to display in dropdown by using KEY VALUE pairs puprose u use DDK.

Here we have fecility Value help in WD we can utilize the DDK.

DDK Example

http://help.sap.com/saphelp_nw70/helpdata/en/86/16e13d82fcfb34e10000000a114084/frameset.htm

DDI Example

http://help.sap.com/saphelp_nw70/helpdata/en/86/16e13d82fcfb34e10000000a114084/frameset.htm

Thanks,

Lohi

Former Member
0 Kudos

DropDownByKey provides static data in DropDown and DropDownByIndex makes it dynamic.

DropDownByKey: Is used when u want to use data dictionary type.For this create a dictionary of simple type in the dictionary.

Creating the Simple Type:

Ur project>dictionaries>Data Types-->Simple Types right click and select Create Simple Type.

After entering the name and package, open that and click on "enumeration" tab at the bottom of the same. Now add the Value and Description to be displayed.The created simple type can be used for DropDownByKey.

Binding it to the UI element:

Now create a valueattribute and change the type to the dictionary type(created simple type). Finally bind the DropDownByKey UI element to the value attribute.

DropDownByIndex: Is used while we have to get the data from the database. Here we directly bind the DropDownByIndex UI element to the context node(attribute