2021 Sep 29 8:52 AM
Hi, I am very new to ABAP and programming in general. I need to find the number of occurrences of the data in a column. In this report, there should be a new column which would give the count of the sales document number. Like sales No. 40 occurs twice the column should give 2 as the count corresponding to it. 2 next to 45 and 1 next to 46 and so on.
Any help will be appreciated. Thank you.

2021 Sep 29 9:22 AM
Make it simple.
Create a second table, with Sales Document / Count.
Copy your table in this new table, put 1 into the count column.
Use the statement COLLECT it will do the sum for you
2021 Sep 29 9:22 AM
Make it simple.
Create a second table, with Sales Document / Count.
Copy your table in this new table, put 1 into the count column.
Use the statement COLLECT it will do the sum for you
2021 Sep 29 10:03 AM
Try to think of a process that you could use to achieve the result if you only had a pencil and piece of paper. Then write a program that does that.
That's essentially all programming is. (Apart from learning syntax and stuff...).
2021 Sep 29 10:38 AM
I second Matthew. If you don't have the slightest idea about how to start, I think you should first take ABAP Basics training. Optionally a training for algorithms.