I was hoping someone could help me out.
I have an internal table with fields EINDT, MENGE, MEINS, STAT.
I have to convert this to an internal table of the kind:
So, every line of the second internal table exists of 5 of the lines of the original internal table.
So what I was doing is
loop at internal table1.
wa_line-eindt1 = tdelivdata-eindt.
wa_line-menge1 = tdelivdata-menge.
wa_line-meins1 = tdelivdata-meins.
wa_line-stat1 = tdelivdata-stat.
wa_line-eindt2 = tdelivdata-eindt.
And I would do an append at the fifth line.
The problem is, that it is possible that the original internal table only has 3 lines, or maybe 12.
So then appending on every fifth tabix wouldn't work.
So how do I solve this?