Lately, all my posts started with "In my current project", so now something else, even if it was developed in the current project. The problem we are facing with is that we get a data extraction which deliver us only the new data records, not the reverse data record.
So we need to build your "own reversal entry" to set the values of a record to 0. For this we write our ADSO in itself with a formula which delivers the negative value.
I build a transformation which the formula above and the magic will be done in the DTP filter. First, let me briefly explain our data model. We use the following layers:
- Acquisition Layer
- Propagation Layer
- Transformation Layer
But back to the magic. The routine is writen in the DTP Transformation Layer in Transformation Layer.
First I determine all requests from the Acquistion Layer DSO.
After I have all requests in my internal table, I sort it descending to get the right order.
Now I select the first request. It is the newst.
Now we know the right request and select all data from the advanced DSO (Aquisition Layer).
After we now have all necessary information in our internal table, we have to fill the DTP filter.
After I execute the DTP and activate the request in the transformation layer advanced DSO you see there are only 18 entries which are corrected.
When you now look into the active table of the advanced DSO, you see all values which are shown above are now 0.
The changelog also show the new, the before and the after image for the entries. So you can understand what was booked.
And when we now execute all DTPs to write the data from the Acquistion Layer to the Tranformation Layer, we see that there are only 18 entries which are new.
And also the new booked values are the same we have above in our second extract.
As you can see it is very easy to create your own reversal entry if the source system don't deliver one. I hope someone can need it.