I have developed a script based calculation view which accepts one cost center as input parameter and returns all the required fields in the output. I need to create another calculation view which accepts multiple cost centers.
The logic is that this calculation view will call the original calc view with one cost center at a time in a loop, store the results temporarily in an intermediate table. This table (table type object) will store data for all the cost centers and finally return it as the output.
I would appreciate if someone can help me with the code snippet where a table type object will store data from a query when run in a loop.
While () do
tmp = select * from dummy where cost_center = 'xzy'
var_out = tmp;