CHANGEDOCUMENT_READ_HEADERS is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
Associated Function Group:
Released Date: 22.12.1994
Processing type: Normal fucntion module
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS' "Change document: Read change document header EXPORTING * archive_handle = 0 " sy-tabix Handle on Open Archive Files * date_of_change = '00000000' " cdhdr-udate From-change date for search objectclass = " cdhdr-objectclas Object class for determining change document no. * objectid = SPACE " cdhdr-objectid Object ID * time_of_change = '000000' " cdhdr-utime From-change time for search * username = SY-UNAME " cdhdr-username Changed By * local_time = SPACE " local or system time (re: time zone) * time_zone = 'UTC' " ttzz-tzone If LOCAL_TIME = X: Time zone in which change documents were created * date_until = '99991231' " cdhdr-udate Change date up to which you want to search * time_until = '235959' " cdhdr-utime Change time up to which you want to search * noplus_aswildcard_inobjid = SPACE " c Flag: If != SPACE then no conversion from PLUS: WILDCARD character * read_changedocu = SPACE " c Flag, if != SPACE, read from archive for CHANGEDOCU TABLES i_cdhdr = " cdhdr Table with determined header information EXCEPTIONS NO_POSITION_FOUND = 1 " No item found WRONG_ACCESS_TO_ARCHIVE = 2 " incorrect access to archive TIME_ZONE_CONVERSION_ERROR = 3 " Error converting local to system time . " CHANGEDOCUMENT_READ_HEADERS
The ABAP code below is a full code listing to execute function module CHANGEDOCUMENT_READ_HEADERS including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
|it_i_cdhdr||TYPE STANDARD TABLE OF CDHDR,"TABLES PARAM|
|wa_i_cdhdr||LIKE LINE OF it_i_cdhdr .|
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
|ld_archive_handle||TYPE SY-TABIX ,|
|it_i_cdhdr||TYPE STANDARD TABLE OF CDHDR ,|
|wa_i_cdhdr||LIKE LINE OF it_i_cdhdr,|
|ld_date_of_change||TYPE CDHDR-UDATE ,|
|ld_objectclass||TYPE CDHDR-OBJECTCLAS ,|
|ld_objectid||TYPE CDHDR-OBJECTID ,|
|ld_time_of_change||TYPE CDHDR-UTIME ,|
|ld_username||TYPE CDHDR-USERNAME ,|
|ld_local_time||TYPE STRING ,|
|ld_time_zone||TYPE TTZZ-TZONE ,|
|ld_date_until||TYPE CDHDR-UDATE ,|
|ld_time_until||TYPE CDHDR-UTIME ,|
|ld_noplus_aswildcard_inobjid||TYPE C ,|
|ld_read_changedocu||TYPE C .|
This function module determines change document numbers with the corresponding header information for an object class. This search can be ...See here for full SAP fm documentation
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CHANGEDOCUMENT_READ_HEADERS or its description.
CHANGEDOCUMENT_READ_HEADERS - Change document: Read change document header CHANGEDOCUMENT_READ_HDRS_ONLY - CHANGEDOCUMENT_READ - Change document: Read and edit change documents CHANGEDOCUMENT_PREP_DISP - CHANGEDOCUMENT_PREPARE_TABLES - Change document: Edit tables for change document CHANGEDOCUMENT_PREPARE_POS - Change document: Edit change document items