SAP BAL_LOG_READ Function Module for Get application log
BAL_LOG_READ is a standard bal log read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get application log 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 bal log read FM, simply by entering the name BAL_LOG_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: SBAL_TOOLBOX
Program Name: SAPLSBAL_TOOLBOX
Main Program: SAPLSBAL_TOOLBOX
Appliation area:
Release date: 20-Nov-2013
Mode(Normal, Remote etc): Normal Function Module
Update:

Function BAL_LOG_READ 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 'BAL_LOG_READ'"Get application log.
EXPORTING
I_LOG_HANDLE = "Application Log: Log Handle
* I_READ_TEXTS = ' ' "Resolve texts
* I_LANGU = SY-LANGU "Language key for the texts
IMPORTING
ES_LOG = "Application Log: Log Header Data
ES_STATISTICS = "Application Log: Statistics: Message Type Counter
ET_MSG = "Application Log: Message Table
ET_EXC = "Application Log: Exception Table
EXCEPTIONS
LOG_NOT_FOUND = 1
IMPORTING Parameters details for BAL_LOG_READ
I_LOG_HANDLE - Application Log: Log Handle
Data type: BALLOGHNDLOptional: No
Call by Reference: Yes
I_READ_TEXTS - Resolve texts
Data type: BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_LANGU - Language key for the texts
Data type: SYLANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for BAL_LOG_READ
ES_LOG - Application Log: Log Header Data
Data type: BAL_S_LOGOptional: No
Call by Reference: Yes
ES_STATISTICS - Application Log: Statistics: Message Type Counter
Data type: BAL_S_SCNTOptional: No
Call by Reference: Yes
ET_MSG - Application Log: Message Table
Data type: BAL_T_MSGROptional: No
Call by Reference: Yes
ET_EXC - Application Log: Exception Table
Data type: BAL_T_EXCR_MASSOptional: No
Call by Reference: Yes
EXCEPTIONS details
LOG_NOT_FOUND - The log is not in the main memory
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for BAL_LOG_READ 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_es_log | TYPE BAL_S_LOG, " | |||
| lv_i_log_handle | TYPE BALLOGHNDL, " | |||
| lv_log_not_found | TYPE BALLOGHNDL, " | |||
| lv_i_read_texts | TYPE BOOLEAN, " SPACE | |||
| lv_es_statistics | TYPE BAL_S_SCNT, " | |||
| lv_et_msg | TYPE BAL_T_MSGR, " | |||
| lv_i_langu | TYPE SYLANGU, " SY-LANGU | |||
| lv_et_exc | TYPE BAL_T_EXCR_MASS. " |
|   CALL FUNCTION 'BAL_LOG_READ' "Get application log |
| EXPORTING | ||
| I_LOG_HANDLE | = lv_i_log_handle | |
| I_READ_TEXTS | = lv_i_read_texts | |
| I_LANGU | = lv_i_langu | |
| IMPORTING | ||
| ES_LOG | = lv_es_log | |
| ES_STATISTICS | = lv_es_statistics | |
| ET_MSG | = lv_et_msg | |
| ET_EXC | = lv_et_exc | |
| EXCEPTIONS | ||
| LOG_NOT_FOUND = 1 | ||
| . " BAL_LOG_READ | ||
ABAP code using 7.40 inline data declarations to call FM BAL_LOG_READ
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.| DATA(ld_i_read_texts) | = ' '. | |||
| DATA(ld_i_langu) | = SY-LANGU. | |||
Search for further information about these or an SAP related objects