abapGit contains predefined user exits which can be used to modify the standard behavior.
If the standalone version is installed, create include
ZABAPGIT_USER_EXIT and add local class
If the development version is installed create global class
To support both versions with the same code, proceed as follows:
ZCL_ABAPGIT_USER_EXITas a global class and test with the developer version.
- Cut & paste the complete code of
ZABAPGIT_USER_EXITand change the beginning to a local class.
CLASS zcl_abapgit_user_exit DEFINITION FINAL CREATE PUBLIC.
- Activate the include.
In either case, add the object in a package different from the main abapGit code.
The list of user exits can change at any time, make sure to syntax check user exits after updating abapGit.
Can be used to set the URL to display a commit. There are default implementations for some providers:
|Provider||Repo URL||Show Commit URL|
This exit can be used to change the path and filename displayed in the repository view (see #5185). For example, you can implement a logic to shorten the path avoiding the output of repetitive details.
Force allowing serialization of SAP objects.
If the hostnames are not properly configured, this exit can be used to modify the settings. This is especially useful when running abapGitServer on the local system.
Adjust the determined maximum number of parallel processes used in parallel serialization. Also see CHANGE_RFC_SERVER_GROUP.
Determine based on the repository URL if authentication is required when accessing the proxy.
Determine the proxy port from the repository URL.
Determine the proxy URL from the repository URL.
Adjust the RFC Server Group used for parallel serialization (default
parallel_generators). The group may be cleared to use parallelization without a server group. Then CHANGE_MAX_PARALLEL_PROCESSES needs to be implemented as well. Also see System Resources.
Add or remove supported data objects. You can add single tables, for example,
TABU, RSADMIN, or a set of tables, for example
Add or remove supported object types
Can be used to skip certain objects, or force a different object setup than currently in TADIR (Example).
Store username and password in RFC connection setup (see #1841).
Allows for a custom serializer to be used for global classes' CLIF sources. See #2321 and #2491 for use cases. This example implementation forces the old class serializer to be used for specific packages.
As of #4953, the exit offers a post-processing option. First, the exit is called with the optional parameter
it_source set to initial. If you do not return any serialization (
rt_source is initial), then abapGit will serialize the object as usual and call the exit a second time. This time
it_source contains the complete source and can be modified in the exit as required. To use this option, use the following code at the beginning of the exit:
" Ignore the first call of exit IF it_source IS INITIAL. RETURN. ENDIF.
Can be used for any postprocessing operation for deserialized objects. Since it is a postprocessing step, only logs can be added to
ii_log and one should not terminate the process by raising an exception, which may lead to inconsistencies.
Set a transport request per repository. If set, no transport request popup appears and the transport is used for pull/delete (see #5916).
With this exit, you can extend the toolbar with your own menu options. Currently, the exit is active for repository settings so you may define your own settings (see #6249).
Add your own repositories to run a complete CI cycle (clone, pull, check, delete) when executing unit tests for object serializer classes (see #3993).
Possibility to change the default
ANONYM SSL ID to something system-specific.
Can be used for setting logon tickets eg. in connection with abapGitServer connections between SAP systems (Example).
This exit allows you to extend abapGit with new features that are not suitable for abapGit itself. For example, you can link to a new page from a wall message. Another use case is redirecting menu items to a custom page rather than standard abapGit, for example using a company-specific solution to replace "Advanced > Run Code Inspector" (see #4722).
Can be used to modify local and remote files before calculating diff status. Useful to remove diffs that are caused by deployment between different system versions (see also abapgit xml stripper plugin).
The exit also receives a repo metadata snapshot (
zif_abapgit_persistence=>ty_repo) to identify the repo and its attributes in the current system (e.g. package). This can be used to enable/disable the exit for specific repos.
This exit is called at the end of the serialize process and gives an opportunity to change the content of the serialized files (see #5194).
Perform custom validations just before pushing into remote while being on the "Commit Message" screen (see #6013).
Can be used to add a message at the list level (repository list, see #4653).
Can be used to add a message at the repo level (repository view, see #4653).