cancel
Showing results for 
Search instead for 
Did you mean: 

Replace Table content via context node

Former Member
0 Kudos

Hello Everybody,

i do have a view (MAIN) containing a table mapped to a showAll context node.

Means when the view opens a service call getAll gets fired returning values into this node, which is displayed by a table.

(Works fine)

Then i created an inputfield and search button upon my table to give the user the possibility to search using keywords.

And i have implemented a function module returning customers fitting the enteres keyword.

(Works fine)

This search - servicecall results in another context node named searchResult.

What i want is, that the table gets filled by the searchResult after the search-button got clicked.

My approach was to call the serviceCall search and then move the searchresult from its context node into the one binded with the table.

Via:

lo_nd_customers->get_static_attributes_table(
    IMPORTING
      table = customers ).

and

lo_nd_it_cust->bind_table( customers ).

But nothing happens. What is my mistake?

Best regards Philipp

Edited by: Philipp.Heinemann on May 25, 2010 1:38 PM

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Why use two different context nodes in the first place. Is it just becuase you are using the service call wizard. If so I would recommend that you go beyond what the wizard can do and simply write or adapt the code yourself. What you describe really sounds like you only need one context node with two different methods (or even one method with internal logic to perform the query different ways).

Former Member
0 Kudos

Good hint! I have not mapped both on the same context node in the controller and simply binded ths one in my view (and my table).

the getAll fills the table, but the search does not affect. do i have to trigger a refresh or something like that?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>the getAll fills the table, but the search does not affect.

Have you rewritten your search method call to bind the data to the same context node as the getAll method?

Former Member
0 Kudos

actually it is!

i cant see why it isn't working.

the table is bound to ONE node, this one is bound to the ONE in the controller, and BOTH service calls operate on this one...

sounds reasonable. any idea where to search for the error?

Former Member
0 Kudos

Ah i found it.

There was an additionall getAll call in the WDDOAFTERACTION, which is an old "refresh"-call which is no longer necessary.

You really helped me and - and thats even more important - massively improved my understanding of the CONTROLLER concept!

Thanks a lot!

Answers (0)