To carry out initial and closing activities pre document, you can define a start/end exit in addition to the user exits of the form levels and the text nodes.
The use of these exits is optional. You can use the exits to carry out initial or closing processing. They can refer, as in all user exits, to all data areas generated by the Print Workbench or own data defined in the user top include.
The start/end exist is an ABAP subroutine. The name of the subroutine is composed of the prefix USER_EXIT and the name specified in the attributes of the application form. Both subroutines have no interface parameters.
subroutine for the start-exit is called up in the generated print program at
the start of form processing before each activity that affects a form. Here
all static, globally defined Print Workbench variables (C-*) and print
parameters have been set.
The end exit is called at the end of the form processing. Here all of the activities that affect the form have been completed.
In the user exits, you must carry out form activities (for example, call OPEN/CLOSE_FORM modules) since this can lead to errors in the internal form control.