on 02-11-2010 4:21 AM
Hi,
I have two queries in two different views. In order to increase performance i want to write the query only once.
How can i pass the internal table from one view to another so that i can write the query only once. Any sample will be helpful.
Will there be any notable change in performance in doing this?
Thanks in advance.
Hi ,
To pass the data to another view from thec urrent view declare the internal table in the component controller attributes of type you required. Fil that table in the current view and use it in another view.
For example:
in COMPONENT CONTROLLER attributes declare Itab type (table type). Make the attribute as public.
In the view view1 use the reference to fill the table like Wd_comp_controller->Itab = (records)
Use the same refernce in the second view which contains the records.
It wont effect the performance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
U need to create a table type first to achieve this. Go to transaction se11 and create a table type.
Now in the attributes tab u can define a variable of this table type.
Now when u are first executing the query in the view then save the entries in that attrbiute table.
next time in second view u can directly fetch from attribute table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the data is common to both view, then it would be better to move the method to fill data to component controller and bind the context nodes containing data to respective view, this way you can call the method only once and by mapping context nodes containing data to both views will make data available to both views.
Other options could be store the internal table as component controller public attribute, assistance class public attribute
Manas Dua
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.