Fonction SAP APPL_LOG_READ_INTERN - Application Log: Read local memory

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
LANGUAGE SYST-LANGU C 1 SPACE X Message language
LOG_CLASS BALHDR-PROBCLASS C 1 '4' X Log class
LOG_HANDLE BALHDR-LOG_HANDLE C 22 X
OBJECT BALHDR-OBJECT C 20 X Object name
SUBOBJECT BALHDR-SUBOBJECT C 20 SPACE X Subobject name

Paramètre Reférence Type Long. Description
NUMBER_OF_LOGS 0 Number of logs read

Paramètre Reférence Long. Facultatif Description
CONTEXTS BALC 163 X
HEADER_DATA BALHDR 520 Log header data
HEADER_PARAMETERS BALHDRP 114 Log parameters
MESSAGES BALM 404 Log messages
MESSAGE_PARAMETERS BALMP 120 Message parameters
MESSAGE_PREPARED T_PREPARED_MESSAGES 0 X formatted log messages
T_EXCEPTIONS BAL_S_EXCEPTION 112 X Application Log: Exceptions in Log
T_PREPARED_EXC BAL_S_PREPARED_EXC 362 X Application Log: Formatted Exceptions in Log

Exception Description
FUNCTION_NOT_COMPLETED Formatting unsuccessful
MESSAGE_NOT_FOUND Log message not found
OBJECT_NOT_FOUND Object not found
PARAMETER_MISSING Input parameter missing
SUBOBJECT_NOT_FOUND Subobject not found

Functionality
This function module reads all log data for the specified object andsub-object from the local memory that at least has the specified logclass.
The data is transferred to the calling program in four internal tables(log header data, log parameters, messages, message parameters). Thenumber of read logs is also returned.
The function module also has the optional table parameterMESSAGE_PREPARED and an optional import parameterLANGUAGE. If both parameters are set when called the formattedmessages are transferred in this table. The message variables arealready inserted in the text.
The optional table parameter T_EXCEPTIONS (exceptions) returnsthe exceptions that are contained in the log. If the optionalparameters T_PREPARED_EXC and LANGUAGE are set, theformatted exceptions are transferred in the tableT_PREPARED_EXC.

Example
Example call:
DATA: OBJECT LIKE BALHDR-OBJECT,
SUBOBJECT LIKE BALHDR-SUBOBJECT,
LOG_CLASS LIKE BALHDR-PROBCLASS,
NUMBER_OF_LOGS LIKE SY-DBCNT,
LANGUAGE LIKE SY_LANGU,
BEGIN OF HEADER_DATA OCCURS 5.
INCLUDE STRUCTURE BALHDR.
DATA: END OF HEADER_DATA,
BEGIN OF HEADER_PARAMETERS OCCURS 5.
INCLUDE STRUCTURE BALHDRP.
DATA: END OF HEADER_PARAMETERS,
BEGIN OF MESSAGES OCCURS 10.
INCLUDE STRUCTURE BALM.
DATA: END OF MESSAGES,
BEGIN OF MESSAGE_PARAMETERS OCCURS 5.
INCLUDE STRUCTURE BALMP.
DATA: END OF MESSAGE_PARAMETERS.
DATA: MESSAGE_PREPARED TYPE T_PREPARED_MESSAGES.
...
CALL FUNCTION 'APPL_LOG_READ_INTERN'
EXPORTING
OBJECT = OBJECT
SUBOBJECT = SUBOBJECT
LOG_CLASS = LOG_CLASS
LANGUAGE = LANGUAGE
IMPORTING
NUMBER_OF_LOGS = NUMBER
TABLES
HEADER_DATA = HEADER_DATA
HEADER_PARAMETERS = HEADER_PARAMETERS
MESSAGES = MESSAGES
MESSAGE_PARAMETERS = MESSAGE_PARAMETERS
MESSAGE_PREPARED = MESSAGE_PREPARED. "optional

Notes

  • You can use the function module
  • APPL_LOG_DISPLAY_INTERN to displaylogs from the local memory.
    • Use the function module APPL_LOG_READ_DB to
    • read logs from the database.
      • To write text module texts for log headers or messages from the local
      • memory to internal tables, use the function moduleAPPL_LOG_READ_INTERN_LONGTEXT.

        Description
        This parameter contains the number of logs found for the specifiedselection criteria.

        Description
        Specifies the language in which the messages are read. If the parameteris not set the system language is assumed (SY_LANGU).

        Description
        This parameter contains the log class for which logs are to be read.All logs are read whose log class is smaller or the same as the onespecified.

        Value range
        Possible values are
        1,,Only especially important logs are read.
        2,,Only important logs are read.
        3,,Less important logs are also read.
        4,,All logs are read.
        There is no check on the input value.

        Default
        All logs are read as standard.

        Description
        This parameter contains the name of the object forwhich logs are to be read from the local memory.

        Value range
        INCLUDE 'APPL_LOG_PAR_OBJECT_VALUES' OBJECT DOKU ID TX

        Default
        INCLUDE 'FU_PAR_OBL' OBJECT DOKU ID TX

        Description
        This parameter contains the name of a sub-objectfor the specified object, for which logs are to beread from the local memory.

        Value range
        INCLUDE 'APPL_LOG_PAR_SUBOBJ_VALUES_R' OBJECT DOKU ID TX

        Default
        All logs are read for the specified object.

        Description
        This table contains the header data of the logs determined for thespecified selection criteria.

        Description
        This table contains the log parameters for the read logs.

        Description
        This table contains the messages for the read logs.

        Description
        This table contains the messages parameters for the read logs.

        Description
        This table contains the exceptions for the logs that have been read.