cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown in a table

Former Member
0 Kudos

Hi,

I have an application in which a table has 5 columns as dropdowns. Whatever the user selects using these dropdowns are being sent to the backend and updated in a table. I am using the following piece of code in order to achieve this.

for (int i=0;i<rows;i++)

{

alloc_ele = wdContext.nodeLi_Allocations().getLi_AllocationsElementAt(i);

broker_ele = alloc_ele.nodeBroker_DD().currentBroker_DDElement();

shipper_ele = alloc_ele.nodeShipper_DD().currentShipper_DDElement();

customer_ele = alloc_ele.nodeCustomer_DD().currentCustomer_DDElement();

exporter_ele = alloc_ele.nodeExporter_DD().currentExporter_DDElement();

consignee_ele = alloc_ele.nodeConsignee_DD().currentConsignee_DDElement();

alloc.setShipper(shipper_ele.getPartner());

alloc.setCustomer(customer_ele.getPartner());

alloc.setConsignee(consignee_ele.getPartner());

alloc.setExporter(exporter_ele.getPartner());

alloc.setBroker(broker_ele.getPartner());

}

The problem here is, when I use the above lines for one or two of the dropdowns it works fine. The data gets updated in the backend. But when I do it for more than 2 dropdowns the Bapi is not even getting executed and the data is not getting updated.

Can someone tell me a better way of doing this?

Thanks and regards,

Reena

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Reena,

In the code you are showing that sets the values, I'm assuming it is suppose to be 'alloc_ele' not 'alloc' and that is just a typo in this post.

It sounds like one of the drop down values is not being liked by the BAPI. Is it possible that the first 2 are ok values but one of the other 3 remaining is not setting the correct type of value? That seems more likely than an issue with how many drop downs are in the table.

-Cindy

Answers (2)

Answers (2)

Dheerendra
Participant
0 Kudos

Hi Reene....

The Code U provided seems correct,but elaborate some more informetion about ur's code....as what values u r setting in the node..viz for what does

...................................................

"getPartner()" stands in the line

"alloc.setShipper(shipper_ele.getPartner());"

n what is the purpose of this method..

.................................................

plz provide some more information regarding your application..........

regard's

Dheerendra Shukla

former_member205624
Contributor
0 Kudos

hi, reena

every thing seems fine but check the for loop conditions.

regards

jitender kumar