Gib doch mal 'n paar Details:
- Loopst Du die Tabelle durch?
- Gibt es möglicherweise Brüche in der Folge der Belegnummern? (Also z.B. 1-10, 15-20)
- Welches Release benutzt Du?
data: z type i.
describe table itab lines i_lines.
clear z.
loop at itab.
add 1 to z.
case z .
when 1.
first-vbeln = itab-vbeln.
when i_lines.
last-vbeln = itab-vbeln.
endcase.
endloop.