on 07-02-2009 12:14 PM
Hi Experts,
I have created one WD project. The WD project fetches some records of backend using BAPI and displays in a table. I have to select some rows from the table and then execute BAPI for selected rows.
How I can select multiple records from the table and then execute another BAPI for selected rows.
Regards,
Gary
Dear Gray
You have asked two Question that is
1) Multiple row Selection in Table for this you can set the property
Selectionmode --> Multi
2) Next is calling the Bapi with the selected Rows
For this you can create an new model with the corresponding BAPI. on the event trigger You can call the Bapi with the Selected row by using the parameter as
node<Node>.currentElement.treeSelected() This will return the node of selected tree and you pass this node to the BAPI
Hope I have answered to your Question
Thanks & Regards
Noel
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 Node which you binded to the table create one more attribute of type boolean.
For example your node is as below:
//Table Node
TableNode
-
> Att1
-
> Att2
-
> isSelected(boolean) - Newly created attribute for this requirement.
//Result Node contains the elements selected in TableNode
ResultNode
-
>Att1
-
>Att2
Now in the table create one more Column with Checkbox as tablecell editor. Now bind this boolean attribute to that check box.
Now in the code you can get the selected rows by user as below:
for(int i=0;i<TableNode().size();i++)
{
if(wdContext.nodeTableNode().getTableNodeElementAt(i).getIsSelected()==true)
{
IPrivateTestView.IResultNode element=wdContext.createResultNodeElement();
element.setAtt1(wdContext.nodeTableNode().getTableNodeElementAt(i).getAtt1());
element.setAtt2(wdContext.nodeTableNode().getTableNodeElementAt(i).getAtt2());
wdContext.nodeResultNode().addElement(element);
}
}
Regards,
Charan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gary
To select many rows in a table you need to change the selectMode properties of table to Multi.
In your controller you could use method <NODE>.getMultiSelection() to retrieve the selected rows.
Regards
Marcos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.