SAP CHANGEDOCUMENT_READ_HDRS_ONLY Function Module for
CHANGEDOCUMENT_READ_HDRS_ONLY is a standard changedocument read hdrs only SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 changedocument read hdrs only FM, simply by entering the name CHANGEDOCUMENT_READ_HDRS_ONLY into the relevant SAP transaction such as SE37 or SE38.
Function Group: SCD1
Program Name: SAPLSCD1
Main Program: SAPLSCD1
Appliation area: *
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function CHANGEDOCUMENT_READ_HDRS_ONLY 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 'CHANGEDOCUMENT_READ_HDRS_ONLY'".
EXPORTING
* DATE_OF_CHANGE = '00000000' "
* NOPLUS_ASWILDCARD_INOBJID = ' ' "
* NO_READ_FROM_DB = ' ' "
OBJECTCLASS = "
* OBJECTID = ' ' "
* TIME_OF_CHANGE = '000000' "
* USERNAME = SY-UNAME "
* LOCAL_TIME = ' ' "
* TIME_ZONE = 'UTC' "
* DATE_UNTIL = '99991231' "
* TIME_UNTIL = '235959' "
TABLES
I_CDHDR = "
EXCEPTIONS
NO_HEADERS_FOUND = 1 TIME_ZONE_CONVERSION_ERROR = 2
IMPORTING Parameters details for CHANGEDOCUMENT_READ_HDRS_ONLY
DATE_OF_CHANGE -
Data type: CDHDR-UDATEDefault: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
NOPLUS_ASWILDCARD_INOBJID -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_READ_FROM_DB -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: Yes
OBJECTCLASS -
Data type: CDHDR-OBJECTCLASOptional: No
Call by Reference: No ( called with pass by value option)
OBJECTID -
Data type: CDHDR-OBJECTIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TIME_OF_CHANGE -
Data type: CDHDR-UTIMEDefault: '000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
USERNAME -
Data type: CDHDR-USERNAMEDefault: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)
LOCAL_TIME -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TIME_ZONE -
Data type: TTZZ-TZONEDefault: 'UTC'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATE_UNTIL -
Data type: CDHDR-UDATEDefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TIME_UNTIL -
Data type: CDHDR-UTIMEDefault: '235959'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CHANGEDOCUMENT_READ_HDRS_ONLY
I_CDHDR -
Data type: CDHDROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_HEADERS_FOUND -
Data type:Optional: No
Call by Reference: Yes
TIME_ZONE_CONVERSION_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CHANGEDOCUMENT_READ_HDRS_ONLY 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_i_cdhdr | TYPE STANDARD TABLE OF CDHDR, " | |||
lv_date_of_change | TYPE CDHDR-UDATE, " '00000000' | |||
lv_no_headers_found | TYPE CDHDR, " | |||
lv_noplus_aswildcard_inobjid | TYPE C, " SPACE | |||
lv_no_read_from_db | TYPE C, " SPACE | |||
lv_objectclass | TYPE CDHDR-OBJECTCLAS, " | |||
lv_time_zone_conversion_error | TYPE CDHDR, " | |||
lv_objectid | TYPE CDHDR-OBJECTID, " SPACE | |||
lv_time_of_change | TYPE CDHDR-UTIME, " '000000' | |||
lv_username | TYPE CDHDR-USERNAME, " SY-UNAME | |||
lv_local_time | TYPE CDHDR, " SPACE | |||
lv_time_zone | TYPE TTZZ-TZONE, " 'UTC' | |||
lv_date_until | TYPE CDHDR-UDATE, " '99991231' | |||
lv_time_until | TYPE CDHDR-UTIME. " '235959' |
  CALL FUNCTION 'CHANGEDOCUMENT_READ_HDRS_ONLY' " |
EXPORTING | ||
DATE_OF_CHANGE | = lv_date_of_change | |
NOPLUS_ASWILDCARD_INOBJID | = lv_noplus_aswildcard_inobjid | |
NO_READ_FROM_DB | = lv_no_read_from_db | |
OBJECTCLASS | = lv_objectclass | |
OBJECTID | = lv_objectid | |
TIME_OF_CHANGE | = lv_time_of_change | |
USERNAME | = lv_username | |
LOCAL_TIME | = lv_local_time | |
TIME_ZONE | = lv_time_zone | |
DATE_UNTIL | = lv_date_until | |
TIME_UNTIL | = lv_time_until | |
TABLES | ||
I_CDHDR | = lt_i_cdhdr | |
EXCEPTIONS | ||
NO_HEADERS_FOUND = 1 | ||
TIME_ZONE_CONVERSION_ERROR = 2 | ||
. " CHANGEDOCUMENT_READ_HDRS_ONLY |
ABAP code using 7.40 inline data declarations to call FM CHANGEDOCUMENT_READ_HDRS_ONLY
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 UDATE FROM CDHDR INTO @DATA(ld_date_of_change). | ||||
DATA(ld_date_of_change) | = '00000000'. | |||
DATA(ld_noplus_aswildcard_inobjid) | = ' '. | |||
DATA(ld_no_read_from_db) | = ' '. | |||
"SELECT single OBJECTCLAS FROM CDHDR INTO @DATA(ld_objectclass). | ||||
"SELECT single OBJECTID FROM CDHDR INTO @DATA(ld_objectid). | ||||
DATA(ld_objectid) | = ' '. | |||
"SELECT single UTIME FROM CDHDR INTO @DATA(ld_time_of_change). | ||||
DATA(ld_time_of_change) | = '000000'. | |||
"SELECT single USERNAME FROM CDHDR INTO @DATA(ld_username). | ||||
DATA(ld_username) | = SY-UNAME. | |||
DATA(ld_local_time) | = ' '. | |||
"SELECT single TZONE FROM TTZZ INTO @DATA(ld_time_zone). | ||||
DATA(ld_time_zone) | = 'UTC'. | |||
"SELECT single UDATE FROM CDHDR INTO @DATA(ld_date_until). | ||||
DATA(ld_date_until) | = '99991231'. | |||
"SELECT single UTIME FROM CDHDR INTO @DATA(ld_time_until). | ||||
DATA(ld_time_until) | = '235959'. | |||
Search for further information about these or an SAP related objects