SAP Function CHANGEDOCUMENT_READ - Change document: Read and edit change documents

Parameter Reference Type Length Default Optional Text
ARCHIVE_HANDLE SYST-TABIX I 4 0 X Handle on Open Archive Files
CHANGENUMBER CDPOS-CHANGENR C 10 SPACE X Change document number
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
KEYGUID CDPOS_UID-KEYGUID C 32 SPACE X UUID in character form
KEYGUID_STR CDPOS_STR-KEYGUID C 32 SPACE X UUID in Character Format
LOCAL_TIME 0 SPACE X local or system time (re: time zone)
OBJECTCLASS CDHDR-OBJECTCLAS C 15 Object class
OBJECTID CDHDR-OBJECTID C 90 SPACE X Object ID
READ_CHANGEDOCU C C 0 SPACE X Flag, if != SPACE, read from archive for CHANGEDOCU
TABLEKEY CDPOS-TABKEY C 70 SPACE X Object class table key
TABLEKEY254 CDPOS_UID-TABKEY C 254 SPACE X Table Key for CDPOS in Character 254
TABLENAME CDPOS-TABNAME C 30 SPACE X Object class table name
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 SPACE X Time zone used as basis for calculating local time
USERNAME CDHDR-USERNAME C 12 SPACE X Last changed by

Parameter Reference Type Length Text
ET_CDRED_STR CDRED_STR_TAB h 48 Table Type for Structure CDRED_STR

Parameter Reference Length Optional Text
EDITPOS CDRED 1181 Table with edited change document items

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
The function module reads change document headers and change documentitems and processes the old and new values according to their category.In some cases, the units and currencies are added on to the valuefields.
The object class is expected as minimum entry.
The program RSSCD200 uses this function module and can be regarded as apossible application.
Using the parameter LOCAL_TIME you can specify whether a local date andtime should be transferred (re: time zone) or the system date and time(default).
Example call:
DATA: NUMMER LIKE CDPOS-CHANGNR,
TABNAME LIKE CDPOS-TABNAME,
TABKEY LIKE CDPOS-TABKEY.
DATA: BEGIN OF EDIT_FORM OCCURS 50.
INCLUDE STRUCTURE CDRED.
DATA: END OF EDIT_FORM.
...
CALL FUNCTION 'CHANGEDOCUMENT_READ'
EXPORTING OBJECTCLASS = 'BANF'
TABLES EDITPOS = EDIT_FORM
EXCEPTIONS ...

Description
The table CDRED_STR, formatted for display, is specified, if data existsfor it.
INCLUDE 'ARCHIVE_PARAM_HANDLE_READ_CD' OBJECT DOKU ID TX
All change document positions with the specified change document numberare determined.
If no change date is specified, all change document numbmers from thecurrent system date are determined. Otherwise all those from thespecified 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
Object class for which the change document numbers are to bedetermined.
If no object ID is specified, all change document numbers aredetermined. Otherwise, all those with the specified object ID aredetermined.

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
The table key is the key of a changed table entry.
If no table key is specified, all change document positions with thespecified change document number are determined.
If a table key is specified, only the change document positions with thespecified change document number and table key are determined.
If no table name is specified, all change documentpositions with the specified change document numberare determined.
If a table name is specifed, only the change documentpositions with the specified change document number andtable nam are determined.
If no change time is specified, all change documentnumbers from the current system time are determined.Otherwise, all change document numbers from the specified time aredetermined.

Description
'Change Time Until': Time up to which is read on the date specified in'Change Date Until'. If no time is specified, all numbers are read upto 23: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 CDRED and contains the determinedchanges.

1592368CD: Dump GETWA_NOT_ASSIGNED
1290062How Firefighter picks up Change Log data (CLOG) for transact
1084067Change documents: Program termination BCD_FIELD_OVERFLOW
180949CC-INFO: Change documents for a client copy
425696Change docs: Incorrect display for deleted val. assgnmt rec.