SAP LOGFILE_RETURN_CODE Function Module for Report Log: Return the Return Code
LOGFILE_RETURN_CODE is a standard logfile return code SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Report Log: Return the Return Code 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 logfile return code FM, simply by entering the name LOGFILE_RETURN_CODE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FVP4
Program Name: SAPLFVP4
Main Program:
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function LOGFILE_RETURN_CODE 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 'LOGFILE_RETURN_CODE'"Report Log: Return the Return Code.
EXPORTING
* IRESET_GBL_RC = ' ' "
* IRESET_LOC_RC = ' ' "
IMPORTING
EGBL_IC = "
EGBL_RC = "
ELOC_IC = "
ELOC_RC = "
IMPORTING Parameters details for LOGFILE_RETURN_CODE
IRESET_GBL_RC -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
IRESET_LOC_RC -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for LOGFILE_RETURN_CODE
EGBL_IC -
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
EGBL_RC -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
ELOC_IC -
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
ELOC_RC -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for LOGFILE_RETURN_CODE 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: | ||||
| lv_egbl_ic | TYPE SY-TABIX, " | |||
| lv_ireset_gbl_rc | TYPE SY, " ' ' | |||
| lv_egbl_rc | TYPE SY-SUBRC, " | |||
| lv_ireset_loc_rc | TYPE SY, " ' ' | |||
| lv_eloc_ic | TYPE SY-TABIX, " | |||
| lv_eloc_rc | TYPE SY-SUBRC. " |
|   CALL FUNCTION 'LOGFILE_RETURN_CODE' "Report Log: Return the Return Code |
| EXPORTING | ||
| IRESET_GBL_RC | = lv_ireset_gbl_rc | |
| IRESET_LOC_RC | = lv_ireset_loc_rc | |
| IMPORTING | ||
| EGBL_IC | = lv_egbl_ic | |
| EGBL_RC | = lv_egbl_rc | |
| ELOC_IC | = lv_eloc_ic | |
| ELOC_RC | = lv_eloc_rc | |
| . " LOGFILE_RETURN_CODE | ||
ABAP code using 7.40 inline data declarations to call FM LOGFILE_RETURN_CODE
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 TABIX FROM SY INTO @DATA(ld_egbl_ic). | ||||
| DATA(ld_ireset_gbl_rc) | = ' '. | |||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_egbl_rc). | ||||
| DATA(ld_ireset_loc_rc) | = ' '. | |||
| "SELECT single TABIX FROM SY INTO @DATA(ld_eloc_ic). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_eloc_rc). | ||||
Search for further information about these or an SAP related objects