on 03-04-2008 12:27 PM
Hi all,
My scenerio is that user selects multiple rows and click a button. i want to pass a unique id of the row to rfc.
means there are userid is unique in the table.
i want to paas the userids of all the selected rows to rfc.
Can any one help me to implement that??
regards
Anoop
Hi,
Use the following code to get the selected data, replace the nodeName to that which is bound to the table
for(int x=0; x<wdContext.nodeOrders().size(); x++)
{
if(wdContext.nodeOrders().isMultiSelected(x))
{
IOrdersElement ordersElement = wdContext.nodeOrders().getOrdersElementAt(x);
wdComponentAPI.getMessageManager().reportSuccess(String.valueOf(x) + " Is Selected");
wdComponentAPI.getMessageManager().reportSuccess(ordersElement.getUserID());
}
}
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used the below for my requiremnt:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You are giving the multiple selected values to rfc, this means its table input for rfc....
For the Table input you must have a structure, for that create a instance and set the values by iterating
Regards
Chandran S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
In the context view the properties of the model node for which you have to pass the table data.
In the properties you will find a property called Structure from where you can get the structure name..in my example scenario the structre name is
Zdp_Str_Shopping_Cart
After adding all the datas to the model node, finally add that instance to the root node....
You want to pass only the selected data in the table right, for that refer the looping concept suggested by of Ayyapparaj KV
Zdp_Str_Shopping_Cart shoppingCart;
for(int i=0;i<wdContext.nodeChnIt_Shopping_Cart().size();i++)
{
shoppingCart = new Zdp_Str_Shopping_Cart();
shoppingCart.setEquipment_No(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getEquipment_No());
shoppingCart.setIbase(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getIbase());
shoppingCart.setKbetr(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getKbetr());
shoppingCart.setMaktx(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getMaktx());
shoppingCart.setMatnr(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getMatnr());
shoppingCart.setQuantity(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getQuantity());
shoppingCart.setSerial_No(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getSerial_No());
shoppingCart.setUnit(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getUnit());
shoppingCart.setUnit_Of_Wt(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getUnit_Of_Wt());
shoppingCart.setWaers(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getWaers());
shoppingCart.setWeight(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getWeight());
createProductOrder.addIt_Shopping_Cart(shoppingCart);
}
wdContext.nodeZdp_Bapi_Create_Product_Order_Input().bind(createProductOrder);
Let me know whether you got an idea and your problem get solved......
Regards
Chandran S
Hi
In table add a checkbox field and that lets you to select multiple rows. And while you set action to the button put a condition and check the status of the checkboxes and pass rows accordingly..
Regards
- Vinod
*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.