cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Find option not Filter in my webdynpro app

Former Member
0 Kudos

Hi,

I have a table which displays data extracted from R/3 System.

Now if i want to see a particular number record how to do that with out using Right and Left arrows of table.

Here i tried by using filters..but i want to enter the record Number not the data of the record.

Can anyone please let me know how to do this...

Thanks and regards,

Chandrashekar.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

1:Take another node same as the <TableNode> bound to the table say <SearchNode>

2: take on input filed and bind it's value property to a context attribute

3:get the entered search element ,say 'searchEle'

Use following code to search

ArrayList al=new ArrayList();

for(int i=0;i<wdContext.node><TableNode>.size();i++)

if (i==searchEle)

{

// bind the the i'th row of <TableNode> to <searchNode>

I<SearchNode>Element s=wdContext.create<SearchNode>Element();

s.set<field1>(s1);

s.set<field2>(s2);

s.set<field3>(s3);

al.add(s);

}

}

wdContext.node<TableNode>.bind(al);

Now u get matching rows of your input..

One more...

Take one refreshButton in Table

in Action of this button, call the method which executes the WS and Fills <TableNode>

Regards

LakshmiNarayana

Former Member
0 Kudos

Hi,

Add a search button to your table toolbar. Onclick of that you can take the user to the specified record entered in the input field. Add this inputField also to your toolbar.

Add the following lines of code to your search button event:

if(wdContext.nodeSearchRec().currentSearchRecElement().getSearch() == null){

wdComponentAPI.getMessageManager().reportException("Please enter a record Id",false);

}

else {

int leadSelect = wdContext.nodeSearchRec().currentSearchRecElement().getSearch();

wdContext.nodeEmployee.setLeadSelection(leadSelect);

}

where node SearchRec.Search is the attribute bound to your search inputField.

And nodeEmployee is the datasource of your table.

If you have any further queries, you can come back to me.

thanks & regrads,

Manoj

Message was edited by:

Manoj

Manoj Kumar

Former Member
0 Kudos

Hi chandra,

can u tell me clearly about ur requirement..

Karthik.