SAP DBLOG_READ_WITH_STATISTIC Function Module for Read Update Logs from Table or Archive
DBLOG_READ_WITH_STATISTIC is a standard dblog read with statistic SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Update Logs from Table or Archive 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 dblog read with statistic FM, simply by entering the name DBLOG_READ_WITH_STATISTIC into the relevant SAP transaction such as SE37 or SE38.
Function Group: SVPR
Program Name: SAPLSVPR
Main Program: SAPLSVPR
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function DBLOG_READ_WITH_STATISTIC 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 'DBLOG_READ_WITH_STATISTIC'"Read Update Logs from Table or Archive.
EXPORTING
FROM_DAY = "
* FROM_TIME = '000000' "
TO_DAY = "
* TO_TIME = '235959' "
* ACCESS_DATABASE = 'X' "
* ACCESS_ARCHIVES = ' ' "
* AUTO_ARCH_SEL = ' ' "
* USER_LIST = "
* LOG_KEYS = "Table Logging: Selection Table for logkey
IMPORTING
ARCH_INFO = "Database Table Logging: Table with Archive Info
CHANGING
LOG_LIST = "
OBJ_CNT_LIST = "
EXCEPTIONS
ARCHIVE_ACCESS_ERROR = 1 NO_ARCHIVES_FOUND = 2
IMPORTING Parameters details for DBLOG_READ_WITH_STATISTIC
FROM_DAY -
Data type: DOptional: No
Call by Reference: No ( called with pass by value option)
FROM_TIME -
Data type: TDefault: '000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TO_DAY -
Data type: DOptional: No
Call by Reference: No ( called with pass by value option)
TO_TIME -
Data type: TDefault: '235959'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACCESS_DATABASE -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACCESS_ARCHIVES -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
AUTO_ARCH_SEL -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
USER_LIST -
Data type: STPRT_USER_NAME_LIST_TYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
LOG_KEYS - Table Logging: Selection Table for logkey
Data type: STPRSOKEYOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for DBLOG_READ_WITH_STATISTIC
ARCH_INFO - Database Table Logging: Table with Archive Info
Data type: SDBTLGKEYTOptional: No
Call by Reference: Yes
CHANGING Parameters details for DBLOG_READ_WITH_STATISTIC
LOG_LIST -
Data type: STPRT_LOG_STABLE_TYPEOptional: No
Call by Reference: Yes
OBJ_CNT_LIST -
Data type: STPRT_OBJ_APP_CNT_LIST_TYPEOptional: No
Call by Reference: Yes
EXCEPTIONS details
ARCHIVE_ACCESS_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ARCHIVES_FOUND - No matching archive found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DBLOG_READ_WITH_STATISTIC 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_from_day | TYPE D, " | |||
lv_log_list | TYPE STPRT_LOG_STABLE_TYPE, " | |||
lv_arch_info | TYPE SDBTLGKEYT, " | |||
lv_archive_access_error | TYPE SDBTLGKEYT, " | |||
lv_from_time | TYPE T, " '000000' | |||
lv_obj_cnt_list | TYPE STPRT_OBJ_APP_CNT_LIST_TYPE, " | |||
lv_no_archives_found | TYPE STPRT_OBJ_APP_CNT_LIST_TYPE, " | |||
lv_to_day | TYPE D, " | |||
lv_to_time | TYPE T, " '235959' | |||
lv_access_database | TYPE C, " 'X' | |||
lv_access_archives | TYPE C, " SPACE | |||
lv_auto_arch_sel | TYPE C, " SPACE | |||
lv_user_list | TYPE STPRT_USER_NAME_LIST_TYPE, " | |||
lv_log_keys | TYPE STPRSOKEY. " |
  CALL FUNCTION 'DBLOG_READ_WITH_STATISTIC' "Read Update Logs from Table or Archive |
EXPORTING | ||
FROM_DAY | = lv_from_day | |
FROM_TIME | = lv_from_time | |
TO_DAY | = lv_to_day | |
TO_TIME | = lv_to_time | |
ACCESS_DATABASE | = lv_access_database | |
ACCESS_ARCHIVES | = lv_access_archives | |
AUTO_ARCH_SEL | = lv_auto_arch_sel | |
USER_LIST | = lv_user_list | |
LOG_KEYS | = lv_log_keys | |
IMPORTING | ||
ARCH_INFO | = lv_arch_info | |
CHANGING | ||
LOG_LIST | = lv_log_list | |
OBJ_CNT_LIST | = lv_obj_cnt_list | |
EXCEPTIONS | ||
ARCHIVE_ACCESS_ERROR = 1 | ||
NO_ARCHIVES_FOUND = 2 | ||
. " DBLOG_READ_WITH_STATISTIC |
ABAP code using 7.40 inline data declarations to call FM DBLOG_READ_WITH_STATISTIC
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_from_time) | = '000000'. | |||
DATA(ld_to_time) | = '235959'. | |||
DATA(ld_access_database) | = 'X'. | |||
DATA(ld_access_archives) | = ' '. | |||
DATA(ld_auto_arch_sel) | = ' '. | |||
Search for further information about these or an SAP related objects