AbapGit
A source-verified project description is not available yet. Open the detail page or wait for a manual refresh.
Source facts need a manual refresh
The source repository does not currently provide a readable project description. See the README below for project goals and usage guidance.
The source repository does not currently provide a readable project description. See the README below for project goals and usage guidance.
中文 | English
A logger for function module (RFC)
Let's work with function modules like IDoc.
ABAP Version: 740 or higher
The report ZAFL_VIEWER empowers you to search logs and reprocess specific records.

1, Add the include file ZAFL_MACROS which contains core function of the logger.
FUNCTION-POOL zzxxxx.
INCLUDE zafl_macros.
2, Call the macros on demand in the function.
FUNCTION z_fm.
**initialize logger. It should be always on the top of the FUNCTION.
/afl/log_init.
**optional, you can specify at most 3 fields for search.
/afl/set_custom_fields '2020' '1001' '2000000001'.
**optional, you can save a status code and message text for search.
/afl/set_status 'S' 'message'.
**save logs. It should be called before every exit point of the FUNCTION.
/afl/save.
ENDFUNCTION.
Tip: to avoid calling /afl/save at every exit point when the real logic has
multiple returns, you can sink the business logic into a separate internal FM
(e.g. Z_FM_INT) and keep the logged FM as a single-exit shell that calls it
— then one /afl/save at the end suffices.
Table ZAFL_CONFIG allows for basic configuration.
/afl/save will be bypassed.Schedule the report ZAFL_HISTORY_CLEANER as a job to delete history log.
If you have installed a previous version, when installing a new version please check whether your installed table ZAFL_LOG differs from the latest version. Differences may arise from: 1) you have manually modified the local ZAFL_LOG, or 2) the new version has extended new fields or widened existing field lengths. If differences exist, please manually review the changes to avoid data issues.