Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Adding line numbers to groups in a report


I've got a report which is split into two groups, One group for the order number then a group for the product code within the order.

The reason for that is there's often more then 1 product code on the order and then beneath the product code theres maybe 10 lines, for example we may have an order for product code one for 500 cases but we despatch 9 x 50 cases so the total is 450.

So we group them and then do sums within the group.

Is it possible that on the product code group if shows 1 for one product code but if theres two product codes in that group it shows the first product code as 1, then the second 2, third 3 etc... then when order number changes revert back to 1?

Former Member
Former Member replied


Does this help you?


Create a Running Total.


1) Choose Running Total from the field explorer. Select the unique field in your table.

2) Put Count or distinct count

3)Evaluate for each record, or group

4)Reset is Never


Put the following in a formula field and use it:


Global NumberVar x;



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question