The exit before loop is called up before the data lines for a form level is processed; it enables you to carry out initializing activities with regard to the form level.
The interface of the subprogram for the user exit is generated by the Print Workbench during creation of the exit and must not be changed. The internal table is always transferred to the subprogram that is processed next. You can modify the table and its entries in the user exit. For example, you can reassign entries or change values for individual fields. You use the exit before loop to:
· Read additional data from the database
· Initialize summation variables
· Sort the table entries to be processed
· Process SAPscript control commands (for example, NEW-PAGE orPROTECT)
· Process SAPscript protect commands
*&---------------------------------------------------------------------*
*& Form USER_EXIT_SUM_INIT
*&---------------------------------------------------------------------*
FORM user_exit_sum_init
TABLES
xyt_booking STRUCTURE sbook .
CLEAR sum. “defined in user-top-include
SORT xyt_booking BY fldate ASCENDING forcurkey ASCENDING.
ENDFORM. " USER_EXIT_SUM_INIT