Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

SQ01 query - count headers in an item level report

$
0
0

Hi!

 

I have the following query, that contains invoice data, at item level, for example

Invoice nr, Position, Material, Value

12345678, 0010, 22222, 10 EUR

12345678, 0020, 33333, 40 EUR

12345678, 0030, 44444, 5 EUR

12345679, 0010, 55555, 15 EUR

 

I have to add a new column, which could be used for counting the invoices. I was thinking about a solution like this:

Invoice nr, Position, Material, Value, invoice counter

12345678, 0010, 22222, 10 EUR, 1

12345678, 0020, 33333, 40 EUR, 0

12345678, 0030, 44444, 5 EUR, 0

12345679, 0010, 55555, 15 EUR, 1

 

So the column's value will be set to 1 at a new invoice number, otherwise it is zero. (I know there could be inaccurate values, if hte report is filtered, but this risk is acceptable).

 

Please suggest.

 

Thank you

Tamas


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>