Code: Alles auswählen.
data: begin of g_stat,
werks like werks_d,
nr_start(10) type n,
nr_ende(10) type n,
end of g_stat.
data: gt_stat like table of g_stat.
sort eingabe by werks, nr.
LOOP at eingabe into esatz.
at new werks.
g_stat-werks = esatz-werks.
g_stat-start = nr.
g_stat-ende = 0.
collect g_stat into gt_stat.
andat.
at end of werks.
g_stat-werks = esatz-werks.
g_stat-start = 0.
g_stat-ende = nr.
collect g_stat into gt_stat.
endat.
endloop.