cancel
Showing results for 
Search instead for 
Did you mean: 

passing internal table between views

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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