Hi,
unfortunately, the subroutibe SUB has no good name and it is your secret at what time (event) you want it called. If you need it for the top-of-page
I_CALLBACK_TOP_OF_PAGE parameter can be used.
Regards Clemens
P.S. There are so many sample programs B*ALV*