cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Table

Former Member
0 Kudos

Dear Experts

I imported a function module from R/3 to my devleopment environment through a Model.In my project actually 3 inputs r available and in output 7 columns r available.The o/p node attached to a table,it will display 45 records like that(depends input).i want a search filed depends upon search field the row will be heighlated.

Plz give me the solution.

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>.length();i++)

String s1=wdContext.node<TableNode>().get<TableNode>ElementAt(i).get<field1>;

String s2=wdContext.node<TableNode>().get<TableNode>ElementAt(i).get<field2>;

String s3=wdContext.node<TableNode>().get<TableNode>ElementAt(i).get<field3>;

if (

isRegionMatch(s1,searchelement)||

isRegionMatch(s2,searchelement)||

isRegionMatch(s3,searchelement))

{

// 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

Lakshmi

Thanks for ur answer.For checking ur code ,my sap j2ee engine is in off mode.

After start work it i will give the points

Thanks & Regards

Hazrath.g

Former Member
0 Kudos

Hi Gurram,

If i understand properly, u have a input field, user will enter some data in that & search. depending in that u just need to highlight the corresponding row ??

If thats the case, search for the row no. & set the leadSelect of the node to that particular row number.

like user enters data, which is available in 3rd row. u can do wdContext.node<o/p>.setLeadSelection(3);

in case u want to show multiple rows on selection of ur search criteria, better to go for table filter .

regards

Sumit

former_member197348
Active Contributor
0 Kudos

Hi,

You can use search filter for the table.

See this Weblog /people/peter.vignet/blog/2007/01/03/generic-web-dynpro-java-table-filter

regards,

Siva