cancel
Showing results for 
Search instead for 
Did you mean: 

regarding populating dropdowns

jnmurthi
Participant
0 Kudos

Hi All,

I am using two dropdowns(dropdown by key) in my application. One is used to populate a/c numbers and the other for a/c names.

Both the dropdowns get populated from a BAPI.

The problem is:

When I select a a/c number in a dropdown, the corresponding a/c name should be automatically selected in the a/c name dropdown. Also, if i select a a/cname in the dropdown, then the corresponding a/c number should get automatically selected in the a/cnumber dropdown.

Is it possible in Webdynpro???

If so, How could I do that???

Please help me in this context.

Also, suggest me if there is any other solution for this.

Regards,

Murthy.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Karan,

thank you for this helpful posting. By the way I have a question.

Firstly:

In your posting you are saying:

Insert the data coming from BAPI into this node.

Can you tell me how to do this?

Secondly:

How can I insert or assing multiple values into the drop down if

the data doesn't come from Bapi

bye

sas

Former Member
0 Kudos

Hi,

<b>If you take DropDownByIndex...</b>

Take one Context Node "Account" and create two value attributes in that node.

one for "Account Number" and one for "Account Name".

Insert the data coming from BAPI into this node.

Then bind account name attribute attribute for first dropdown list and account number attribute for second dropdown list...

this will solve your problem.....

<b>If you take DropDownByKey..</b>

then create on simpletype ...for example "valuestype".

Then create one value attribute "values" of type that simple type "valuestype"

then insert values into attribute "values" using the following code...

ISimpleTypeModifiable myType=wdThis.wdGetAPI().getContext().getModifiableTypeOf("values");

IModifiableSimpleValueSet values=myType.getSVServices().getModifiableSimpleValueSet();

values.put("account number 1","account name 1");

values.put("account number 2","account name 2");

like this...

After that take one DropDownByKey and InputField Ui elements...

and bind value attribute to those ui elements....

this may solve your problem...