cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Drop Down

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

PradeepBondla
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Pradeep,

I have not yet designed the drop downs, I'll be using the first drop down by Key and the value selected by the user (say Uttar Pradesh) will decide the value from second DD (Lucknow, Allahabad, Agra...). I do not know, how should the second dropdown be and how to interact the two DDs.

Cheers

Umang

PradeepBondla
Active Contributor
0 Kudos

Hi,

Where the values of second drop down stored?

did they stored any where? or you want to hard code the second drop down values (Lucknow, Allahabad, Agra)///

PradeeP

Former Member
0 Kudos

The values are stored in a back end table.

PradeepBondla
Active Contributor
0 Kudos

Backend table means is it a BAPI???

will this back end table have input (import) parameters and output (export) parameters???

or its a dictionary table???

PradeeP

Former Member
0 Kudos

It would be an RFC

Cheers

Umang

Former Member
0 Kudos

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

Answers (5)

Answers (5)

Former Member
0 Kudos

Solved By self

Former Member
0 Kudos

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

Former Member
0 Kudos

hi,

Refer the following thread.

Thanks

Abhilasha

sureshmandalapu6
Active Contributor
0 Kudos

HI Umang,

follow the below link.

Thanks

Suresh

Former Member
0 Kudos

Hi,

Make use of supply functions.

Regards

Ayyapparaj