SAP TR_APPEND_LOG Function Module for XPRAs: Append to Log File (During Upgrade)









TR_APPEND_LOG is a standard tr append log SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for XPRAs: Append to Log File (During Upgrade) processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for tr append log FM, simply by entering the name TR_APPEND_LOG into the relevant SAP transaction such as SE37 or SE38.

Function Group: SLOG
Program Name: SAPLSLOG
Main Program: SAPLSLOG
Appliation area: S
Release date: 05-Nov-1997
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TR_APPEND_LOG pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'TR_APPEND_LOG'"XPRAs: Append to Log File (During Upgrade)
EXPORTING
* OPEN_FILE = 'X' "*** Do not use ***
* CLOSE_FILE = 'X' "*** Do not use ***
* CONDENSE = 'X' "Lines are condensed
* MASTER_LANGU = 'E' "Alternative language
* ACCEPT_NOT_INIT = ' ' "*** Do not use ***
* IV_SUPPRESS_STATISTICS = ' ' "End time stamp not output

TABLES
XMSG = "Table with messages

EXCEPTIONS
FILE_NOT_FOUND = 1 WRONG_CALL = 2
.



IMPORTING Parameters details for TR_APPEND_LOG

OPEN_FILE - *** Do not use ***

Data type: SPROT_I-XFELD
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CLOSE_FILE - *** Do not use ***

Data type: SPROT_I-XFELD
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CONDENSE - Lines are condensed

Data type: SPROT_I-XFELD
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

MASTER_LANGU - Alternative language

Data type: T100-SPRSL
Default: 'E'
Optional: Yes
Call by Reference: No ( called with pass by value option)

ACCEPT_NOT_INIT - *** Do not use ***

Data type: SPROT_I-XFELD
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_SUPPRESS_STATISTICS - End time stamp not output

Data type: SPROT_I-XFELD
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for TR_APPEND_LOG

XMSG - Table with messages

Data type: SPROT_U
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

FILE_NOT_FOUND - Access to file not possible

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_CALL - Incorrect call

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for TR_APPEND_LOG Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lt_xmsg  TYPE STANDARD TABLE OF SPROT_U, "   
lv_open_file  TYPE SPROT_I-XFELD, "   'X'
lv_file_not_found  TYPE SPROT_I, "   
lv_close_file  TYPE SPROT_I-XFELD, "   'X'
lv_wrong_call  TYPE SPROT_I, "   
lv_condense  TYPE SPROT_I-XFELD, "   'X'
lv_master_langu  TYPE T100-SPRSL, "   'E'
lv_accept_not_init  TYPE SPROT_I-XFELD, "   ' '
lv_iv_suppress_statistics  TYPE SPROT_I-XFELD. "   ' '

  CALL FUNCTION 'TR_APPEND_LOG'  "XPRAs: Append to Log File (During Upgrade)
    EXPORTING
         OPEN_FILE = lv_open_file
         CLOSE_FILE = lv_close_file
         CONDENSE = lv_condense
         MASTER_LANGU = lv_master_langu
         ACCEPT_NOT_INIT = lv_accept_not_init
         IV_SUPPRESS_STATISTICS = lv_iv_suppress_statistics
    TABLES
         XMSG = lt_xmsg
    EXCEPTIONS
        FILE_NOT_FOUND = 1
        WRONG_CALL = 2
. " TR_APPEND_LOG




ABAP code using 7.40 inline data declarations to call FM TR_APPEND_LOG

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single XFELD FROM SPROT_I INTO @DATA(ld_open_file).
DATA(ld_open_file) = 'X'.
 
 
"SELECT single XFELD FROM SPROT_I INTO @DATA(ld_close_file).
DATA(ld_close_file) = 'X'.
 
 
"SELECT single XFELD FROM SPROT_I INTO @DATA(ld_condense).
DATA(ld_condense) = 'X'.
 
"SELECT single SPRSL FROM T100 INTO @DATA(ld_master_langu).
DATA(ld_master_langu) = 'E'.
 
"SELECT single XFELD FROM SPROT_I INTO @DATA(ld_accept_not_init).
DATA(ld_accept_not_init) = ' '.
 
"SELECT single XFELD FROM SPROT_I INTO @DATA(ld_iv_suppress_statistics).
DATA(ld_iv_suppress_statistics) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!