cancel
Showing results for 
Search instead for 
Did you mean: 

DropDownByKey Problem!

Former Member
0 Kudos

Hi all,

Does anyone know how can I fill a DropDownByKey UI Element with a table that come from a RFC or a BAPI?

Thanks in advance.

Jesus

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jesus,

Please try the solution that I gave. That is the simplest way to bind a dropdown to an RFC output.I hope it will provide you the required functionlaity.

Instead of DropDownbyKey , use DropDownByIndex. Map the "texts" property to the required output attribute of the RFC. You can choose this from the context through the GUI. Your attribute will be inside Context->'<RFC_Name>.input'->'output'->'node of the attribute(if any)'->'output attribute'.

After this when you execute the RFC, the dropdown box will be automatically filled with the attibute values.

Hope this helps,

Best Regards,

Nibu.

Former Member
0 Kudos

Nibu,

Again...Thanks a lot...It was very helpful your answer.

Best regards,

Jesus

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

1. Create a value node with cardinality 0..n and create a value attribute. say vaNode1 and the attribute as vaAtt1

2. Create a object of type <b>IModifiableSimpleValueSet/b> as follows.

IModifiableSimpleValueSet valueSet =wdContext.nodeVnNode1Node().getNodeInfo().getAttribute(IPrivate<view name>.IVnNode1NodeElement.VA_ATT1).getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();

3. Then populate the values into the valueset as follows from a RFC

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

valueSet.put(wdContext.nodeE_Company_List().getE_Company_ListElementAt(i).getCompany(),wdContext.nodeE_Company_List().getE_Company_ListElementAt(i).getName1());

Here Company List is my RFC where companycode is my key and Name is description.

Let me know if you require furthur help.

Regards

NagaKishore V

Former Member
0 Kudos

Hi NagaKishore,

This solution that you gave me doesn't work!. It doesn't give any error but neither fill the dropdown ui element...Is there another way to do this?

Thanks,

Jesus

Former Member
0 Kudos

Hi,

If you have any ModelAttribute which is of any Simple types then you can directly bind that to DropDownByKey so that during runtime you can see the enumeratedvalues in the simpletype.

Regards, Anilkumar

Former Member
0 Kudos

Hi Jesus,

We generally use Drop down by index UI element to show data from R3. To dispaly this , the steps are :

1) Create a dropdown by index UI element & map it's "texts" property to Your_RFC_Name_Input.Output.outputattribute

When you execute the RC, the dropdown will be automatically populated with the result.

Hope this helps,

Best Regards,

Nibu.

Message was edited by: Nibu Wilson