abap-fm-logger
A logger for ABAP function modules (RFC) that stores each call's parameters as JSON in one table, with a viewer report to search the log and reprocess a record, akin to WE10 and WE19.
A logger for function module (RFC): each call's parameters are saved to a single general table in JSON format, with up to three custom fields searchable afterwards, akin to WE10 for IDocs. The report ZAFL_VIEWER searches these logs and reprocesses a specific record, akin to WE19. Logging is added by including ZAFL_MACROS in the function pool and calling its macros at the start and before every exit point, or by routing the business logic through a separate internal function module so a single exit calls /afl/save once. A configuration table, ZAFL_CONFIG, switches logging and per-parameter capture on or off per function module, and a separate report schedules deletion of old log history.
Facts
Where it sits
Who is behind it
In the atlas: maintains 3, contributes to 6@hhelibebmaintainerfrozenraindropContributes to this
In the atlas: contributes to 1@frozenraindroprmezrivContributes to this
In the atlas: contributes to 1@rmezriv2 contributors
What it declares
Every artifact
- Type
- Package
- Origin
- Independently maintained
As a package
- Where it runs
- Inside its host
- Distributed through
- does not say
Connections
Seeing what a running service did, in a readable form
Download
README
quoted from hhelibeb/abap-fm-logger under Apache-2.0, read中文 | English
abap-fm-logger
A logger for function module (RFC)
Let's work with function modules like IDoc.
ABAP Version: 740 or higher
Design Goals
- Save FM logs in a single general table.
- Store parameters in JSON format.
- Enable reprocessing of records using log id, akin to WE19.
- Search logs by FM & field value, akin to WE10.
Log Report
The report ZAFL_VIEWER empowers you to search logs and reprocess specific records.

How to Use
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.
Configuration
Table ZAFL_CONFIG allows for basic configuration.
Basic Settings
- FNAME: Name of Function Module
- ENABLED: If checked, log function will be enabled.
- EXPORT: If checked, logs for export parameters will be enabled.
- IMPORT: If checked, logs for import parameters will be enabled.
- TABLE_IN: If checked, logs for tables parameters (at the start of the FM) will be enabled.
- TABLE_OUT: If checked, logs for tables parameters (at the end of the FM) will be enabled.
- CHANGE: If checked, logs for changing parameters (both in and out) will be enabled.
Additional Settings
- NO_COMMIT: If checked, the COMMIT statement in
/afl/savewill be bypassed. - NO_AUTH_CHECK: If checked, the authority check statement in the reprocess method will be bypassed.
Log Cleaner
Schedule the report ZAFL_HISTORY_CLEANER as a job to delete history log.
⚠️ Upgrade Reminder
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.
History
Features 3, Fixes 3
Notes
Added
- Viewer - Payload search: Filter log entries by text or regex in IMPORT / EXPORT / TABLE_IN / TABLE_OUT / CHANGE_IN / CHANGE_OUT payload fields
- Viewer - Keep last only: Group by FM + custom fields, keep only the latest record per group
- Viewer - Unlimited query: When NO_HIT_NO_LIMIT is checked, remove the row limit (UP TO n ROWS)
Fixed
- re_process - Wrong dd04l query field: Used domname (domain) to match fupararef-structure (data element name), causing all data element lookups to fail — every structured parameter took the slow JSON serialize/deserialize path instead of direct assignment
- re_process - Date formatting: Strip '-' separators from date values (2023-01-15 → 20230115) to match ABAP DATS internal format on direct assignment
- re_process - Table parameter type detection: Distinguish between structure name and table type name using fupararef-type field to avoid incorrect cl_abap_tabledescr wrapping
Notes
1, Improved Reporting 2, Improved save function, allowing for multiple invocations (in different branch).
Notes
1, add changing parameters log, now abap-fm-logger supports all of the 4 type parameters 🎉 (export, import,changing, tables ).
2, add 2 new options (NO_COMMIT/NO_AUTH_CHECK) in the configuration table.Notes
1, add a history log cleaner report 2, add "Number of Hits" option in Viewer 3, compatibility improvement
Notes
1, improve custom fields description 2, improve Chinese translation 3, add first unit test
Notes
1, fix re-process json restore issue for CURR fields, 2, add link for function module name field in the Viewer
Notes
1, fix an issue on EXPORT parameter.
Others providing
Compare all 20 on the Logging page →- ABAP-LoggerABAP-LoggerA logging library for ABAP that records messages into the standard Application Log (BC-SRV-BAL) and displays them from there, installed through abapGit on ABAP 702 or higher.independent, abapLogging library for ABAP over the Application Logfrom ABAP
- abap-log-exporterabap-log-exporterExports SAP NetWeaver logs from the Business Application Log to an external log system such as Graylog or Loki, converting entries to GELF or Loki format through a separately configured reader, converter and connector.independent, abapExports Business Application Log entries to Graylog or Lokifrom ABAP
- ABAP-PRCABAP-PRCA framework for custom multi-step ABAP processes: a process class declares the states, and the framework runs each document through them and monitors the run.independent, abapFramework for multi-step ABAP processes with monitoringfrom ABAP
- SAP Application Logging service for SAP BTPSAP Application Logging service for SAP BTPCollects an application's log lines from Cloud Foundry or Kyma into a searchable Kibana, for the retention the plan sets.sap official, btpCollects Cloud Foundry or Kyma logs into a searchable Kibanafrom BTP/BAIP
- SAP Cloud LoggingSAP Cloud LoggingAn instance-based observability service built on OpenSearch that stores and analyses logs, metrics and traces from Cloud Foundry, Kyma, Kubernetes and other runtime environments.sap official, btpOpenSearch-based store for logs, metrics and tracesfrom BTP/BAIP
- com.sap.cds:cds-services-bomcom.sap.cds:cds-services-bomThe Maven bill of materials for CAP Java, pinning every com.sap.cds module in a release, from the API and core runtime to the Spring Boot starters and the CQN engine, to the same version.sap official, capMaven bill of materials pinning CAP Java module versionsfrom CAP
- @cap-js/audit-logging@cap-js/audit-loggingIntegration with the SAP Audit Log service, so operations on personal data are recorded in the form an auditor expects without the application writing the entries.sap official, capCAP integration with the SAP Audit Log servicefrom CAP
- abap-logabap-logA logging library for ABAP with one logger interface in front of several targets, from the Application Log and the job log to database tables, files and the Eclipse console.independent, abapABAP logging library with one interface across output targetsfrom ABAP
- ABAP_LOGGINGABAP_LOGGINGAn object-oriented wrapper around SAP's Business Application Log (BAL) for ABAP NetWeaver, chaining texts, messages and exceptions onto a log header that persists in its own or the same connection.independent, abapObject-oriented wrapper around the Business Application Logfrom ABAP
- abap-cloud-loggerabap-cloud-loggerA logging library for ABAP Cloud that wraps the released class CL_BALI_LOG in a chainable logger, collecting exceptions, messages and tables, with a stopwatch and a sticky context tag.independent, abapChainable logger for ABAP Cloud around CL_BALI_LOGfrom ABAP
- openui5-error-collectoropenui5-error-collectorA UI5 library that collects a running app's JavaScript errors, unhandled Promise rejections and UI5 log events, and can post them to a backend with navigator.sendBeacon.independent, ui5UI5 library collecting an app's JavaScript errorsfrom UI5
- open-abap-balopen-abap-balApplication logging for ABAP code transpiled to JavaScript and run on Node.js, one of the runtime libraries open-abap.org lists.community org, abapApplication logging for ABAP transpiled to JavaScript on Node.jsfrom ABAP
- @openui5/sap.ui.core@openui5/sap.ui.coreThe OpenUI5 core: the module loader, the MVC runtime, data binding, routing, theming and the test stack, which is everything a UI5 app does before a single community package is added.sap official, ui5Framework core: module loader, MVC runtime, binding, routing, themingfrom UI5
- abap-fluentdabap-fluentdA Fluentd client written in ABAP for sending log lines from an ABAP system to a Fluentd collector, where entries are flushed with an explicit COMMIT WORK.independent, abapFluentd client in ABAP for sending log lines to a collectorfrom ABAP
- @saptools/cf-logs@saptools/cf-logsA command line and typed Node.js library that fetches and streams the logs of one Cloud Foundry app and parses them into structured rows.independent, btpLog fetcher and parser for one Cloud Foundry appfrom BTP/BAIP
- @saptools/cf-tail@saptools/cf-tailA command line that tails every started app in a Cloud Foundry space at once and merges their logs into one timeline by timestamp, with filters by level, tenant, router status and time window.independent, btpMerged log tail of every started app in a Cloud Foundry spacefrom BTP/BAIP
- sap-usi-logging-apisap-usi-logging-apiAn object-oriented encapsulation around SAP's Application Log (transaction SLG1), controlled by customizing, with attachable data containers that SLG1 shows behind a detail button.independent, abapObject-oriented wrapper around SAP's Application Log (SLG1)from ABAP
- srbjsloggersrbjsloggerA browser JavaScript logger whose log, warn and error calls write prominent output to the console, loaded into a UI5 app through index.html or the manifest's resources.independent, ui5A browser JavaScript logger whose log, warn and error calls write prominent output to the console, loaded into a UI5 app through index.html or the manifest's resources.from UI5
- abap-message-loggerabap-message-loggerA message logger for ABAP Cloud that collects T100 messages, BAPIRET2 structures, exceptions and plain text before saving them to the Application Log.independent, abapMessage logger for ABAP Cloud that saves to the Application Logfrom ABAP
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
abaplint
Flavors
“ABAP Version: 740 or higher” — hhelibeb/abap-fm-logger — README
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:hhelibeb-abap-fm-logger- JSON
- /artifacts/hhelibeb-abap-fm-logger.json
- MCP
- Connecting an agent