Giter Site home page Giter Site logo

abap-fm-logger's Introduction

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 ONE general table.
  • Save parameters in json format.
  • Reprocess records by log id (like WE19).
  • Search logs by FM & field value (like WE10).

Log Report

Report ZAFL_VIEWER allow you search logs and reprocess specified records. log report

Usage

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 always on the bottom of the FUNCTION.
  /afl/save.

ENDFUNCTION.

Configuration

Table ZAFL_CONFIG allows you do some basic configuration.

Basic

  • FNAME: Name of Function Module
  • ENABLED: If checked, enable log function.
  • EXPORT: If checked, enable log for export parameters.
  • IMPORT: If checked, enable log for import parameters.
  • TABLE_IN: If checked, enable log for tables parameters (At the beginning of the FM).
  • TABLE_OUT: If checked, enable log for tables parameters (At the end of the FM).
  • CHANGE: If checked, enable log for changing parameters (Both In and Out).

Others

  • NO_COMMIT: If checked, bypass the commit statement in /afl/save.
  • NO_AUTH_CHECK: If checked, bypass the authority check statement in reprocess method.

Cleaner

You can schedule report ZAFL_HISTORY_CLEANER as a job to delete history log.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.