SAP Function CHANGEDOCUMENT_READ_HEADERS - Change document: Read change document header

Parameter Reference Type Length Default Optional Text
ARCHIVE_HANDLE SYST-TABIX I 4 0 X Handle on Open Archive Files
DATE_OF_CHANGE CDHDR-UDATE D 8 '00000000' X From-change date for search
DATE_UNTIL CDHDR-UDATE D 8 '99991231' X Change date up to which you want to search
LOCAL_TIME 0 SPACE X local or system time (re: time zone)
NOPLUS_ASWILDCARD_INOBJID C C 0 SPACE X Flag: If != SPACE then no conversion from PLUS: WILDCARD character
OBJECTCLASS CDHDR-OBJECTCLAS C 15 Object class for determining change document no.
OBJECTID CDHDR-OBJECTID C 90 SPACE X Object ID
READ_CHANGEDOCU C C 0 SPACE X Flag, if != SPACE, read from archive for CHANGEDOCU
TIME_OF_CHANGE CDHDR-UTIME T 6 '000000' X From-change time for search
TIME_UNTIL CDHDR-UTIME T 6 '235959' X Change time up to which you want to search
TIME_ZONE TTZZ-TZONE C 6 'UTC' X If LOCAL_TIME = X: Time zone in which change documents were created
USERNAME CDHDR-USERNAME C 12 SY-UNAME X Changed by

Parameter Reference Length Optional Text
I_CDHDR CDHDR 192 Table with determined header information

Exception Text
NO_POSITION_FOUND No item found
TIME_ZONE_CONVERSION_ERROR Error converting local to system time
WRONG_ACCESS_TO_ARCHIVE incorrect access to archive


INCLUDE 'DOCU_HAS_TO_BE_ELABORATED' OBJECT DOKU ID TX
Functionality
The function module determines change document numbers with therespective header information for an object class. The determinationcan be limited by specifying various parameters (see interfacedescription).
The change documents are read from the database (default) or from anarchive depending on the ARCHIV_HANDLE parameter.
Using the parameter LOCAL_TIME you can also specify whether the localtime and date (referring to the time zone) or a system time and date(default) are transferred.
Example call:
DATA: OBJEKT LIKE CDHDR-OBJECTCLAS,
OBJEKTID LIKE CDHDR-OBJECTID,
AENDERER LIKE CDHDR-USERNAME,
DATUM LIKE CDHDR-UDATE,
ZEIT LIKE CDHDR-UTIME,
DATA: BEGIN OF ICDHDR OCCURS 50.
INCLUDE STRUCTURE CDHDR.
DATA: END OF ICDHDR.
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING OBJECTCLASS = OBJEKT
OBJECTID = OBJEKTID
USERNAME = AENDERER
TIME_OF_CHANGE = ZEIT
DATE_OF_CHANGE = DATUM
TABLES I_CDHDR = ICDHDR
EXCEPTIONS ...
INCLUDE 'ARCHIVE_PARAM_HANDLE_READ_CD' OBJECT DOKU ID TX
If no change date is specified, all change document numbers fromthe current system date are determined. Otherwise, all changedocument numbers from the specified date are determined.

Description
'Change Date Until': Date up to which you want to search.
If no date is specified, all change document numbers up to the currentsystem date are found.Otherwise, all numbers up to the specified date are found.

Description
If the flag Local_Time is set (<> SPACE) the local date and time areused for the parameters DATE_OF_CHANGE and TIME_OF_CHANGE (referring tothe current time zone, contained in the field SYST-ZONLO). Before thechange documents are read there is a conversion to the system time. Thereturned documents are also specified in local time.

Value range
Time zones are maintained in the table TTZZ.

Default
Default: System time

Description
A new optional parameter, NOPLUS_ASWILDCARD_INOBJID, has been added tothe function module CHANGEDOCUMENT_READ_HEADERS. If an application iscertain that a PLUS in the OBJECTID parameter is not to be interpretedas a WILDCARD, then it sets the parameter NOPLUS_ASWILDCARD_INOBJID ='X' (not SPACE). The function module then cancels the switch of theselection option from EQ to CP. The read action is then performed withthe actual PLUS character as part of the specified OBJECTID. Anyapplications that have this problem must check the situation beforeCHANGEDOCUMENT_READ_HEADERS is called, and, if required, attempt toinfluence the read performance with the new parameter.

Value range
SPACE = The plus character in the object ID is interpreted as aWILDCARD.
'X' = The plus character in the object ID is interpreted as a regularcharacter and as part of the key.

Default
SPACE = The plus character in the object ID is interpreted as aWILDCARD.
Object class for which the change document numbers are tobe determined.
If no object ID is specified, all change document numbers aredetermined. Otherwise, all change document numbers with the specifiedobject ID are determined.

Description
This parameter defines how the data is read from the archive.
If the parameter is set to 'X', the data is read from the database andfrom the archive. The archive is accessed only for those changedocuments archived using the archiving object CHANGEDOCU.
Change documents archived using the archiving class CHANGEDOCU can onlybe accessed with the parameter ARCHIVE_HANDLE.

Value range
SPACE = Read from database
'X' = Read from database and archive

Default
SPACE
If no change time is specified, all change documentnumbers from the current system time are determined.Otherwise, all changed document numbers from the specified time aredetermined.

Description
'Change Time Until': Time up to which the system reads on the datespecified in 'Change Date Until'. If no time is specified, the systemreads the numbers up to23:59:59. Otherwise, all change document numbers up to the specifiedtime are found.
If no changer is specified, all change document numbers aredetermined. Otherwise, all change document numbers with thespecified changer are determined.
The table must have the structure of the table CDHDR.