I would expect this to be a common problem with the solution easily to google/find, but somehow...
dynamic header generation during alv print_top_of_page:
- i print an oo alv grid, sorted by kunnr
- for each new kunnr a new page
-> now I want during print-out to: at each top of page, read the first (or any) line of the current page, i.e. the current kunnr, and select data on basis of that kunnr to be written to the header.
My problem is that sy-tabix is not being filled correctly (always 1).
Strange thing is that in another report with a non-dynamic itab to display, sy-tabix is actuall being filled more or less correctly. (with the minor drawback that on the first page the tabix might not be 1 but more likely to be 2; but that's easy to fix and for the next pages sy-tabix is correct)
Kind regards, A