Skip to Content
avatar image
Former Member

Implementing dropdown in webdynpro application

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 22, 2007 at 10:11 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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??

  • avatar image
    Former Member
    Aug 22, 2007 at 12:52 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Oct 25, 2007 at 06:01 AM

    ok got the basics behind these both.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 25, 2007 at 06:01 AM

    ok got the basics behind these both.

    Add comment
    10|10000 characters needed characters exceeded