Skip to Content
avatar image
Former Member

UNIQUE values from a column in calculated view

Hi SAP community... I am having a really difficult time finding an answer to this question, and I was hoping someone might be able to help out. I need to get UNIQUE (not distinct) values from a column within a calculated view. I've attempted a number of different filter expressions, but nothing has given me the correct output. Here is an example of the output I need:

INPUT TABLE

SystemID

1

1

2

3

3

4

5

OUTPUT TABLE

SystemId

2

4

5

Any help would be greatly appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 24, 2017 at 09:22 PM
    -1

    Sort itab by SystemID.

    delete adjacent duplicated from itab comparing SystemID.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 24, 2017 at 08:52 PM

    I am not familiar with the tools in BW Modeling, but in SQL this seems like a simple GROUP BY. Maybe that helps?

    SELECT systemid
      FROM table
      GROUP BY systemid
      HAVING COUNT(*) = 1;
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Yea, unfortunately it is not the same in the modeling interface. I ended up creating a secondary CV_Script, and utilized the output of that in the original CV, instead of trying to handle it all from the original CV. Thanks