Hi everybody,
I have an issue with query Bex or perhaps costumer exit variable.
We have a query that contain the planning of industrial maintenance and the period of the planning is different for each plant (0PLANT).
We use two DSO that provide the whole information.
- DSO1 (Maintenance data).
- DSO2 (Planning weekly by plant).
In rows, our query displayed the plants (0PLANT) according the company (0COMP_CODE) selected in the beginning.
My issue here, is how to calculate the total by plant according its range of week
(Using just one key figure).
Follow examples of our DSO.
(DSO-2)
|COMPANY| - |PLANT| - |FROM WEEK| - |TO WEEK|
comp1 - plant1 - 01.2013 - 52.2013
comp1 - plant2 - 52.2012 - 18.2013
comp1 - plant3 - 10.2013 - 03.2014
comp2 - plant4 - 01.2014 - 45.2014
comp2 - plant5 - 05.2014 - 08.2014
(DSO-1)
|COMPANY| - |ORDER| - |PLANT| - |PLAN WEEK| - |HOUR|
comp1 - 000010 - plant1 - 05.2013 - 100
comp1 - 000020 - plant1 - 01.2014 - 50
comp1 - 000040 - plant2 - 30.2011 - 10
comp1 - 000050 - plant2 - 01.2013 - 20
comp1 - 000060 - plant3 - 10.2013 - 100
comp2 - 000060 - plant4 - 10.2013 - 600