SAP GRPCRTA_READ_CHANGE_LOG Function Module for Read Change Log









GRPCRTA_READ_CHANGE_LOG is a standard grpcrta read change 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 Read Change 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 grpcrta read change log FM, simply by entering the name GRPCRTA_READ_CHANGE_LOG into the relevant SAP transaction such as SE37 or SE38.

Function Group: GRPCRTA_CHGLOG
Program Name: SAPLGRPCRTA_CHGLOG
Main Program: SAPLGRPCRTA_CHGLOG
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function GRPCRTA_READ_CHANGE_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 'GRPCRTA_READ_CHANGE_LOG'"Read Change Log
EXPORTING
FROMDATE = "Date and time, current (application server) date
* FROMTIME = "Dat and time, current application server time
* TODATE = "Date and time, current (application server) date
* TOTIME = "Dat and time, current application server time
TABNAME = "Table name
* OBJNAME = "Object name

TABLES
* T_CONTROL = "Structure of a Range Table for Control Id
* T_CHANGELOG = "Table - SPRO ( Customizing ) change log for table/view
* VIEWDATA = "Structure for logdata in SPROCHANGES function module
T_SCRIPT = "Structure of a Range table for Script

EXCEPTIONS
CONTROL_NOT_FOUND = 1
.



IMPORTING Parameters details for GRPCRTA_READ_CHANGE_LOG

FROMDATE - Date and time, current (application server) date

Data type: SY-DATUM
Optional: No
Call by Reference: Yes

FROMTIME - Dat and time, current application server time

Data type: SY-UZEIT
Optional: Yes
Call by Reference: Yes

TODATE - Date and time, current (application server) date

Data type: SY-DATUM
Optional: Yes
Call by Reference: Yes

TOTIME - Dat and time, current application server time

Data type: SY-UZEIT
Optional: Yes
Call by Reference: Yes

TABNAME - Table name

Data type: TABNAME
Optional: No
Call by Reference: Yes

OBJNAME - Object name

Data type: OBJS-OBJECTNAME
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for GRPCRTA_READ_CHANGE_LOG

T_CONTROL - Structure of a Range Table for Control Id

Data type: GRPCRTA_S_RANGE_REPORTID
Optional: Yes
Call by Reference: Yes

T_CHANGELOG - Table - SPRO ( Customizing ) change log for table/view

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

VIEWDATA - Structure for logdata in SPROCHANGES function module

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

T_SCRIPT - Structure of a Range table for Script

Data type: GRPCRTA_S_RANGE_SCRIPT
Optional: No
Call by Reference: Yes

EXCEPTIONS details

CONTROL_NOT_FOUND - Control ID missing in /VIRSA/ECMTCNTRL or Invalid ControlID

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

Copy and paste ABAP code example for GRPCRTA_READ_CHANGE_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:
lv_fromdate  TYPE SY-DATUM, "   
lt_t_control  TYPE STANDARD TABLE OF GRPCRTA_S_RANGE_REPORTID, "   
lv_control_not_found  TYPE GRPCRTA_S_RANGE_REPORTID, "   
lv_fromtime  TYPE SY-UZEIT, "   
lt_t_changelog  TYPE STANDARD TABLE OF GRPCRTA_T_PROLOG, "   
lv_todate  TYPE SY-DATUM, "   
lt_viewdata  TYPE STANDARD TABLE OF GRPCRTA_XVIEWD, "   
lv_totime  TYPE SY-UZEIT, "   
lt_t_script  TYPE STANDARD TABLE OF GRPCRTA_S_RANGE_SCRIPT, "   
lv_tabname  TYPE TABNAME, "   
lv_objname  TYPE OBJS-OBJECTNAME. "   

  CALL FUNCTION 'GRPCRTA_READ_CHANGE_LOG'  "Read Change Log
    EXPORTING
         FROMDATE = lv_fromdate
         FROMTIME = lv_fromtime
         TODATE = lv_todate
         TOTIME = lv_totime
         TABNAME = lv_tabname
         OBJNAME = lv_objname
    TABLES
         T_CONTROL = lt_t_control
         T_CHANGELOG = lt_t_changelog
         VIEWDATA = lt_viewdata
         T_SCRIPT = lt_t_script
    EXCEPTIONS
        CONTROL_NOT_FOUND = 1
. " GRPCRTA_READ_CHANGE_LOG




ABAP code using 7.40 inline data declarations to call FM GRPCRTA_READ_CHANGE_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 DATUM FROM SY INTO @DATA(ld_fromdate).
 
 
 
"SELECT single UZEIT FROM SY INTO @DATA(ld_fromtime).
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_todate).
 
 
"SELECT single UZEIT FROM SY INTO @DATA(ld_totime).
 
 
 
"SELECT single OBJECTNAME FROM OBJS INTO @DATA(ld_objname).
 


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!