I need to insert new lines in order. The order line has a field called 'suborder code' and I need to insert a line per 'suborder code'.
To achieve this I created a key in the order line table with (suborder code, line no).
Then created a processing report. In the processing report, I added the order line table and add sort by the new key.
I wrote the code to insert a line at the last of the table but I want to insert a new line every time when 'suborder code' is change.