cancel
Showing results for 
Search instead for 
Did you mean: 

Find latest record with hierarchy in display

Former Member
0 Kudos

Hi,

I have to build a small report with just the following display:

                        

                        Restricted Key Figures based on various filters

Hierarchy          Pass      Fail

P1                    2

P1.1                2 

  P1.1.4            2

P1.2                <blank>

The Data in the MultiProvider which will drive this report is the following:

Hiearchy    FL   MEAS DOC MEASDOC__TIMESTAMP (CHAR)  LOGICAL VALUE (this is calculated on runtime and is a restricted key figure)

P1.1.4          X     123             20120304131200                          PASS

P1.1.4          X     124             20120305131200                          FAIL

P1.1.4          X     125             20120306131200                          PASS

P1.1.4          X     126             20120307131200                          PASS

P1.1.4             Y     234             20120304131200                          FAIL

P1.1.4            Y 235     

          20120305131200                          PASS

P1.1.4        Y 236        

20120306131200                                    PASS

So for a FL we check for latest timestamp of all the measuring docs. Whatever is the latest value say Pass for FL = X  and also Pass for FL= Y we count the number of FL i.e.  2 under hierarchy 1.1.4 so against 1.1.4 we display the count 2 in front of Pass and so on for parent nodes.

I would now like to tell you what all i have already tried doing:

1) Top N Condition applied, doesnot work with hierarchy display.

2) Applied Top N with functional location and Meas Doc and TimeStamp in rows and hide them, does work, however the problem is the following in this case Display works as

Hierarchy          Pass      Fail

P1                    1

                        1

P1.1                1

                        1

  P1.1.4            1

                        1

P1.2                <blank>

which is again not correct.

3) Exception Aggregation doesnot work in this case as the Key Figures Pass and Fail cannot be calculated before the aggregation so gives an error.

4) Even if I donot activate hierarchy still to achieve the desried output is nearly impossible with counting functional location after finding the latest record.

Any help in this regard will be great! I have been struggling trying this or that for almost a week now.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186696
Active Contributor
0 Kudos

Hello Pant,

Maybe we can check all BW abap corrections related to TOP N for your current system version.


Could you please check you BW version and SP? (SAPKW7######)

Looking forward

Edward John