Question:
OK, I've been trying to find a way but can't seem to figure out how... Here's my issue:
In an ODS I have data that appears at a certain date (date in 0CREATEDON), over time this data evolves and at some point the data is final and the 0CH_ON field stops being updated (0CREATEDON never changes and 0CH_ON is updated everyday until closed, all this on one row.)
Now I want to show a report that will indicate the evolution of these statuses over a certain time period. See example below:
Data in ODS:
Line # CREATEDON LAST_CH_ON Qty
1 day 1 day 5 1
2 day 1 day 7 1
3 day 1 day 2 1
4 day 2 day 4 1
5 day 3 day 6 1
6 day 4 day 5 1
Report
Date: Qty:
Day 1 3 (includes lines 1,2,3)
Day 2 4 (includes lines 1,2,3,4)
Day 3 4 (includes lines 1,2,4,5)
Day 4 5 (includes lines 1,2,4,5,6)
Day 5 4 (includes lines 1,2,5,6)
Day 6 2 (includes lines 2,5)
Anyone has a clue? Couldn't figure it out with an infoset, cube, multiprovider, etc...
Thanks.
_________________
Eric
Answer:
eric,
this one isn't too difficult, but it is a bit hairy to explain. i created an ODS to your spec and filled it with your example data. the query got the exact answer you were looking for. rather than "day 1" of course i used dates like 0createdon and 0ch_on expects and used key date to establish the starting date. with all that in mind the solution is:
create a restricted structure component with 0p_csdat as the variable against 0created_on but set the selection to "value range" and select the range to be less-than-or-equal-to. then create a CMOD exit variable which reads the value from 0p_csdat (called mine getcsdat). put 0ch_on into the same restricted structure component with getcsdat as its variable. again set the selection to "value range" and this time pick greater-than-or equal-to. that will give you day 1. just copy that structure component and add offsets to it (+1 for day 2; +2 for day 3; and so on). than bring quantity into the keyfigure structure and your done. you could also do it as restricted key figures rather that a characterist structure against one key figure (your choice).
hope that is clear enough.
_________________
when in danger or in doubt, run in circles, scream and shout.
Answer:
Solution is quite clear. I'll see if I can manage the exit variable, if not I'll go talk to one of our abapers... Haven't played with much abap yet.
Thanks for the help.
Eric