Hi,

This is a build-up over the post from Monissha Agil

http://scn.sap.com/docs/DOC-63775

Below are the instructions of how from a table with different states of a record you can obtain the latest modification based on the date of the modification and other categorical variables such as type of the record.

Use case; Pick the amount of latest record of for an specific organization and type of liability

The data;

/wp-content/uploads/2016/06/data1_973193.png

As it can be observed on the first organization there is different amounts for the same type of liability, only been different on when they were updated, we are inserted into obtain the most recent.

The View;

data_2.JPG

The Rank Node definition;

data_3.JPG

Here is where the real trick happens, as in this case we are interest in just the newest record we sort the rank descending and limit the threshold to a constant 1, which will return the top record of the descending list.

Then equally important is to define what are the partition for the rank to be executed, as in this case we are interested in the latest record for an specific organization AND type of liability, both are required, this is critical to define it correctly.

The outcome;

data_4.JPG

Using the organization that had most duplicated we have a final clean one record per organization and type using the latest update of the combinaton

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply