PackagePackagetypeA library you install and call yourself.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

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

Last pushLicenceApache-2.0

Where it sits

Lives in
Provides
LoggingABAPLoggingcapabilitySeeing what a running service did, in a form something can read afterwards — levels, a formatter that suits a laptop and one that suits a log service.

Who is behind it

He HHe HPersonMaintains this
In the atlas: maintains 3, contributes to 6
@hhelibeb
maintainerfrozenraindropPersonContributes to this
In the atlas: contributes to 1
@frozenraindrop
rmezrivPersonContributes to this
In the atlas: contributes to 1
@rmezriv
2 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

Connections1

README

quoted from hhelibeb/abap-fm-logger under Apache-2.0, read
hhelibeb/abap-fm-logger/README.mdOn GitHub

中文 | 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. log report

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/save will 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.

Apache-2.0, read

History

Latest

v0.10.0

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
  1. v0.9.6

    Notes

    1, Improved Reporting 2, Improved save function, allowing for multiple invocations (in different branch).

  2. v0.9.5

    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.

  3. v0.9.4

    Notes

    1, add a history log cleaner report 2, add "Number of Hits" option in Viewer 3, compatibility improvement

  4. v0.9.3

    Notes

    1, improve custom fields description 2, improve Chinese translation 3, add first unit test

  5. v0.9.2

    Notes

    1, fix re-process json restore issue for CURR fields, 2, add link for function module name field in the Viewer

  6. v0.9.1

    Notes

    1, fix an issue on EXPORT parameter.

Logging
  1. ABAP-LoggerLogging library for ABAP over the Application Logfrom ABAP
  2. abap-log-exporterExports Business Application Log entries to Graylog or Lokifrom ABAP
  3. ABAP-PRCFramework for multi-step ABAP processes with monitoringfrom ABAP
  4. SAP Application Logging service for SAP BTPCollects Cloud Foundry or Kyma logs into a searchable Kibanafrom BTP/BAIP
  5. SAP Cloud LoggingOpenSearch-based store for logs, metrics and tracesfrom BTP/BAIP
  6. com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versionsfrom CAP
  7. @cap-js/audit-loggingCAP integration with the SAP Audit Log servicefrom CAP
  8. abap-logABAP logging library with one interface across output targetsfrom ABAP
  9. ABAP_LOGGINGObject-oriented wrapper around the Business Application Logfrom ABAP
  10. abap-cloud-loggerChainable logger for ABAP Cloud around CL_BALI_LOGfrom ABAP
  11. openui5-error-collectorUI5 library collecting an app's JavaScript errorsfrom UI5
  12. open-abap-balApplication logging for ABAP transpiled to JavaScript on Node.jsfrom ABAP
  13. @openui5/sap.ui.coreFramework core: module loader, MVC runtime, binding, routing, themingfrom UI5
  14. abap-fluentdFluentd client in ABAP for sending log lines to a collectorfrom ABAP
  15. @saptools/cf-logsLog fetcher and parser for one Cloud Foundry appfrom BTP/BAIP
  16. @saptools/cf-tailMerged log tail of every started app in a Cloud Foundry spacefrom BTP/BAIP
  17. sap-usi-logging-apiObject-oriented wrapper around SAP's Application Log (SLG1)from ABAP
  18. srbjsloggerA 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
  19. abap-message-loggerMessage logger for ABAP Cloud that saves to the Application Logfrom ABAP

Details

Sources3
dotabapdiscovered herechecked
github.com/hhelibeb/abap-fm-loggertree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

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
discovered viadotabap
first seen in the atlas
ecosystem and domainabap, operations-and-runtime
abaplint
issues under its own abaplint configuration554
lines1,440
statements960
objects24
files38
analysed, master
abaplint version2.120.84
Flavors1
Standard ABAP
“ABAP Version: 740 or higher” — hhelibeb/abap-fm-logger — READMEchecked
Contributors2

From the repository’s contributor list, .

History in the atlas1
  1. First seen.
For your agent
Ref
artifact:hhelibeb-abap-fm-logger
JSON
/artifacts/hhelibeb-abap-fm-logger.json
MCP
Connecting an agent