How to do Selective Deletion of Time Series Data in SAP APO
Problem – While working on an issue related to data loaded from Legacy systems to APO DP Sales History Key Figure, it was observed that lot of items have the data in Future which should not be the case ideally. (Some places it may be possible to have them due to business requirements but not generally).
Analysis – After much de-bugging & analysis it’s found that the cube from where data is loaded to DP Planning books is not having all that data in Future buckets but still planning book shows this. It was not very clear that how this data is showing up. There may be 2 reasons-
- Either this was loaded manually via XL directly to planning book
- Or, it has been sitting there for long but no one observed this.
We were not sure of the root cause but it’s found that in our design, we don’t clear up all the data in Key figure before loading new ones since we have over-write option while loading the data & not the add but this still leave the possibility to not clear the data on cells where no new data comes & old ones should be deleted.
Now business doesn’t want to see this data in Future buckets & a macro was supposed to be developed to make these cells as initial. This required good amount of effort on development, testing & change etc so we were looking for something pretty standard if available to do this job. We have to delete data for specific periods for specific CVCs. Standard de-initialization can’t be used as we will lose all the data & not the specific ones.
Solution- We found a standard report /SAPAPO/RTSINIT_KF, which is supposed to do just what we wanted. I guess we never used it earlier since this is available only SCM 7.0 onwards. We tested it in Dev & QA & it worked perfectly. More information can be found in note 1676905. Log also can be checked after execution to see what all data has been corrected.
Report /SAPAPO/RTSINIT_KF will need details like – Planning area, Planning version, period, characteristic value selection, key figure selection etc. I am giving few screenshots showing on how to use this.