Skip to Content
avatar image
Former Member

Dynamic Drop Down

Hi,

The requirement of my project is that, when a person selects a particular state from a drop down, then with respect to that state, the next drop down must contain the list of cities of that state. This means that the second dropdown field must be dynamic and the drop down values must depend on the value of previous DD.

Cheers

Umang 😊

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    Sep 02, 2008 at 07:51 AM

    Hi,

    From where you are getting the drop down values?

    I mean when user clicks a value in first drop down, then this value to be assed to where? it will be input to what? are you using BAPI's or RFC's?

    if yes,

    then just get a selected value for first drop down and send it (assign it) as a input to second drop down and from the output of that FM, just populate the second drop down.

    I dont think any supply functions needed in this case.

    Let me know where you are passing input and getting output for second drop down?

    PradeeP

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      For the second dropdown create a another value node with an attribute. Now for the attribute of your states as selected in the first dropdown, create a supply function.

      Hope your RFC is returning the list of cities with the name of the state as key. So if key of the state is say "UP" then loop through the BAPI node and populate it to the newly created value node and set the attribute with the names of the city.

      Map this attribute to the second dropdown.

      Hope it helps.

      thanks & regards,

      Manoj

  • avatar image
    Former Member
    Sep 02, 2008 at 12:20 PM

    Hi Umang,

    go thorugh this doc:[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c092333b-0601-0010-e7af-8c227fb6d052]

    here values will b generated at run time accoding to selection.

    hope it hlps...

    Regards

    Khushboo

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 02, 2008 at 07:31 AM

    Hi,

    Make use of supply functions.

    Regards

    Ayyapparaj

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 02, 2008 at 08:01 AM

    HI Umang,

    follow the below link.

    creation-of-dynamic-dropdown

    Thanks

    Suresh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 02, 2008 at 10:42 AM

    hi,

    Refer the following thread.

    Populate Emp_ID and Name in DropdownKey field using RFC

    Thanks

    Abhilasha

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 15, 2008 at 12:22 PM

    Solved By self

    Add comment
    10|10000 characters needed characters exceeded