Dear Anshika,
As you mentioned above,
W_EVENTS-NAME = 'END_OF_PAGE'.
W_EVENTS-FORM = 'SUB6'.
APPEND W_EVENTS TO T_EVENTS .
Your end of page is in SUB6 form, I couldn't find the SUB6 form in the above program.
So please create the SUB6 form in the program.
Regards,
Mounika