cancel
Showing results for 
Search instead for 
Did you mean: 

Enumerated Dropdown list

Former Member
0 Kudos

Hi Experts,

I placed the enumerated dropdown list in my interactive form. ( am getting data from database using BAPI).

i binded this data to the context node. now i need to bind this values to this drop down using java script in my interactive form.

How i can do this.

Thanks,

Raju.

Edited by: raj.nov85 on May 25, 2010 1:15 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

you don´t need javascript to bind values from backend to the drop down. You use binding tab, specifically the binding string, to do this. Otto

Former Member
0 Kudos

Hi Otto,

Thanks for your response. i bind the data using binding tab only. now the data is getting populated.

Now i need to select the value from that dropdown and i need to populated the corresponding value in another dropdown list.

For example i select the country name in my first dropdown,and i need to display the state name in second drop down list.

(note: am having states value in another value attribute to the context).

i think it can be achieve through java script only. so can u tell what java script code i have to write to achieve this,

and on which event i have to place this script code.

Thanks,

Raju.

OttoGold
Active Contributor
0 Kudos

Populate drop-down from a second drop-down:

Former Member
0 Kudos

Hi Otto,

Thanks for your Continuous reply. but still am facing this issue.

I am attaching my context value attribute to enumerated dropdown(from webdynpro native library) then the data is getting populated,its fine.

But when i am binding the value attribute to the normal dropdown list(from standard library) the data is not getting populated, whats the reason. i have to poulate the data in the standad dropdown list only, through binding tab the data is not getting poulated,whats the reason, how can i do this.

Thanks,

Raju.

OttoGold
Active Contributor
0 Kudos

enumerated drop down should be used for WD with binding to the context.

"ordinary" drop down strange behavior in WD (or maybe it is the right one, but I was not able to confirm this in the manuals) has been reported many times around here. You didn´t search and I am doing my best to help you. Rephrasing the question and asking on and on will not help.

Otto

Private_Member_52584
Participant
0 Kudos

Hi,

Here plant and storage locations are two dropdowns.........and storage location is dependency drop down to the plant........

i.e., Based on the selected value in the plant dropdown the values are populated in the storage location dropdown......

For this you can create a method for storage location , write the code and assign the method to the OnSelect Event of the plant dropdown properties...............

you can solve your problem using this code........

//code for plant Element

Rfc_Read_Table_Input plantinput = new Rfc_Read_Table_Input();

wdContext.nodeRfc_Read_Table_Input().bind(plantinput);

plantinput.setQuery_Table("T001W");

plantinput.setDelimiter(":");

wdContext.currentRfc_Read_Table_InputElement().modelObject().execute();

IPublicVenkatprComp.IPlantElement plantElement;

for(int i=0;i<wdContext.nodeData1().size();i++)

{

String strWa = wdContext.nodeData1().getData1ElementAt(i).getWa();

String[] arrayWa = strWa.split(":");

plantElement = wdContext.createPlantElement();

plantElement.setKey(arrayWa[1]);

plantElement.setValue(arrayWa[2]);

wdContext.nodePlant().addElement(plantElement);

}

wdContext.nodePlant().setLeadSelection(-1);

//code for storage location

Rfc_Read_Table_Input input = new Rfc_Read_Table_Input ();

input.setQuery_Table("T001L");

input.setDelimiter(":");

Rfc_Db_Opt rfcOpt = new Rfc_Db_Opt();

String strText = "WERKS = '"wdContext.currentPlantElement().getKey()"'";

rfcOpt.setText(strText);

input.addOptions(rfcOpt);

wdContext.nodeRfc_Read_Table_Input().bind(input);

wdContext.currentRfc_Read_Table_InputElement().modelObject().execute();

IPublicVenkatprComp.IStorageLocationElement storageLocationElement;

wdContext.nodeStorageLocation().invalidate();

for(int i=0;i<wdContext.nodeData1().size();i++)

{

String strWa = wdContext.nodeData1().getData1ElementAt(i).getWa();

String[] arrayWa = strWa.split(":");

storageLocationElement = wdContext.createStorageLocationElement();

storageLocationElement.setKey(arrayWa[2]);

storageLocationElement.setValue(arrayWa[3]);

wdContext.nodeStorageLocation().addElement(storageLocationElement);

}

Regards,

Venkat.