In user exists, you can make the process logic of an application form dependent, for example, on data or data constellations.
In the Print Workbench, SAP provides the following ABAP macros that you can call up in the user exits:
If you are in the program loop of a form level, and do not want to (or no longer want to) process the subordinate nodes in the current run, you can make the program branch to the next run by using the ABAP macro mac_next.
You should only define this macro in the exit during loop and text exit.
If you want to terminate processing for the current node, you can define the command mac_exit in the user exit.
This macro is not suitable for the exit after loop. It has no effect there.
You can dynamically deactivate a form level (or 1:1 level) defined in an application form in a user exit if, for example, it is no longer required due to a specific data constellation. When you call this macro, the form level <Name> is no longer processed, regardless of where the macro is called. This deactivation applies for all levels of the same name in the entire form.
You can dynamically reactivate a form level (or 1:1 level) if it was deactivated by the macro mac_deactivate in a user exit. In order to be able to activate a form level, the level must be defined as active in the application form hierarchy. You cannot activate levels that are not named or are not active in the hierarchy.