cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing dropdown in webdynpro application

Former Member
0 Kudos

Is it that we use this dropdownbyindex in a specific condition and dropdownbykey in some other specific? which one should i use for my application??

I need to have a dropdown list which reterive a list of data from the bapi function module. then i can select one data from list and that one get place in that dropdown in my webdynpro application.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi gunja,

The basic difference between the DDBKEY and DDBI is that if you bind the DDKEY to the context attribute at runtime the attribute will store the key displayed and DDBI's binded attribute will store the value.

What is important to know in this case is when to use them over each other.

Look using DDbyKey is preferable when you importing an RFC where the simple types are getting created at automatically and gets populated on a call so there is no work required from our side and also for dynamic changing values.

DDByIndex are more like showing a list on the UI and so are they populated an attribute of type list is binded and populated at runtime.More used for displaying the static data.

You can find out minor technical details associated with it in SAP Netweaver Documentatio

DropdownbyIndex:

http://help.sap.com/saphelp_nw70/helpdata/en/dd/b0884118aa1709e10000000a155106/frameset.htm

http://help.sap.com/saphelp_nw70/helpdata/en/3b/f1754276e4c153e10000000a1550b0/frameset.htm

DropDownByKey:

http://help.sap.com/saphelp_nw70/helpdata/en/c5/e4884180951809e10000000a155106/frameset.htm

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

Code Example:

http://help.sap.com/saphelp_nw70/helpdata/en/95/93fe1e71a2e44691b1f041e67f71aa/frameset.htm

Dropdown by key:

here used for simple type Static Data's(creating "Enumeration TAB")

here Context Attribute is used

DropDownByKey

Dropdown by index

here used for Dynamic data's(creating Run time),

here context node is used

DropDownByIndex

thats all

Regards,

P.Manivannan

Former Member
0 Kudos

thanks a lot sir,

so is DDbykey is good to use if i need to get a list of data form rfc??

and one morething in DDbykey,If I map the keys to the import parameter of the function module,Then I will directly get the list popup on my screen on runtime.

Is this the only thing i need to do??

Answers (3)

Answers (3)

Former Member
0 Kudos

ok got the basics behind these both.

Former Member
0 Kudos

ok got the basics behind these both.

Former Member
0 Kudos

Hi,

DD by Key is helpful if you know the list that to be displayed in it.

if the values are coming from RFC , you need to use DD by Index and bind the RFC o/p Parameter directly to ur values property..

AM

Message was edited by:

Anoop Mathew

Former Member
0 Kudos

thanks sir,

On mapping the texts value of the DDbyindex with the value node of view conext , i will get the list of data on runtime.?

No need of creating any method or event handler for that?

No need of any coding in the implementation part??? is it so??

former_member182294
Active Contributor
0 Kudos

It depens on when you need data in the drop down. If you want to populate data in Drop down when View is visible then execute the BAPI in wdInit() and copy the values to value node. Otherwise if you want it in any special event then write the logic in onEventhandler, execute BAPI and copy data.

You can directly map the model node to DropDown by index UI element.

Regards

Abhilash