on 09-22-2008 2:52 PM
Hello Friends,
In the Context of a View there is a Node say DETAIL with a structure of three attributes say ID, NAME and BIRTH_DATE. This Node is mapped to the Node DETAIL in the Component Controller. The Node 'Detail' has the Cardinality of 0...1. Now after calling the Service the Node Detail is filled with Data and shown in a Table in the view.
NOW how can I sort the Node DETAIL say by the attribute NAME in Descending order?
Kind Wishes,
Farhan
Hi,
Declare an internal table in the component controller attributes and fill this internal table in the service call method.
Come to view read this internal table like
wd_comp_controller->itab inthe method WDDOINIT.
now sort this internal table in descending by name.
then bind this table to view context.
you donnot bind the controller context to view context.do in this way your problem will solved.
thanks
Suman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suman,
thnx for the quick reply ;o)
Actually I have simplify the problem in post, just to find out if there is a way for such a context manipulation within the Context API.
You can use the internal tables to sort but in my actual problem there are more then one views and if the component controllers context has been sorted out then it should be available to other views also. Another thing is that with the internal tables i am saving the data two times(not efficient in terms of memory usage): one in the Context and second in the internal table.
I have solved this problem in Web Dynpro for java like this:
wdContext.nodeDetail().setSortCriterion(new CMISortByColumn("NAME"));
It sorts out the Node Detail by the Attribute NAME like sunshine.But I wanted to know if there is way like that in Web Dynpro for ABAP API.
If there is no such a way in WDA then i might have to go the with internal tables which is costly in terms of memory but well thats the only way i think? isn't it?
Best regards,
Farhan Shamim
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.