Use class CL_CHDO_READ_TOOLS
to read change documents.
Method CHANGEDOCUMENT_READ
reads the change documents for one change document object. You can restrict the search by various parameters (such as changed by, date, or time).
Parameter Name |
Field Name |
Value Help |
---|---|---|
ET_CDREDADD_TAB |
|
Table type for structure |
I_OBJECTCLAS |
|
Name of change document object |
IT_OBJECTID |
|
Range table of application object IDs |
I_DATE_OF_CHANGE |
|
From-change date for search. All change documents are selected written on the specified date or later are found. |
I_TIME_OF_CHANGE |
|
From-change time for search. If no change time is specified, a selection is made from the time '000000'. |
I_DATE_UNTIL |
|
Change date up to which you want to search. All change documents are selected written up to and including this date. |
I_TIME_UNTIL |
|
Latest change time in search. Time to which change documents are read on the "To" change date. If no time is passed, all change documents on the "To" change date are read. |
IT_USERNAME |
|
Username of the person responsible in change document. Only those change documents are selected that document changes made by this user. If no user name is passed, change documents are read for all users. |
IT_READ_OPTIONS |
|
|
|
local_time |
If it is set, the date and time information in the formatted change documents is displayed in the local time of the user. |
|
time_zone |
It contains the time zone in which the change documents were written. If it’s not set UTC applies. If it contains a time zone, this zone is used as the time zone in which the change documents were saved. If the change documents were saved in CET, the parameter must be set to CET. |
|
it_changenr |
Range table for change document number. Change document numbers were created internally as part of key of change documents. The key of change document is represented by Object name, Object ID of the application object and a change number. During creation of change documents using the write method of class Change documents numbers were received by export paramter |
Parameter Name |
Field Name |
Value Help |
---|---|---|
OBJECTCLAS |
Name of Change Document Object |
|
OBJECTID |
Object ID of application object |
|
OBJECTID_DB |
Object value |
|
CHANGENR |
Change Number of Document |
|
OBJECTTXT |
Object Description |
|
USERNAME |
Username of the person responsible in change document |
|
USERNAME_DB |
Username of the person responsible in change document |
|
UDATE |
Creation date of the change document |
|
UDATE_DB |
Creation date of the change document |
|
UTIME |
Time changed |
|
UTIME_DB |
Time changed |
|
TCODE |
Transaction in which a change was made |
|
APPLNAME |
Application Object |
|
APPLTYPE |
Application Type |
|
TABNAME |
Change document creation: Table name |
|
TABNAME_DB |
Change document creation: Table name |
|
TABKEY |
Key of Changed Table Line |
|
TABKEY_DB |
Key of Changed Table Line |
|
KEYLEN |
Table key length |
|
CHNGIND |
Type of Change |
|
FNAME |
Field Name |
|
FNAME_DB |
Field Name |
|
FTEXT |
Explanatory Short Text |
|
TEXTART |
Create change document: Text type |
|
SPRACHE |
Language Key |
|
TEXT_CASE |
Text change flag ('X') |
|
OUTLEN |
Output length of the old and new value |
|
F_OLD |
Old contents of changed field |
|
F_NEW |
New contents of changed field |
|
F_NEW_DB |
New contents of changed field |
|
VALUE_OLD |
Old Extended Value (Long) |
|
VALUE_OLD_DB |
Old Extended Value (Long) |
|
VALUE_NEW |
New Extended Value (Long) |
|
VALUE_NEW_DB |
New Extended Value (Long) |
|
VALUE_RAWSTR_OLD |
Old Change Document Value for RAWSTRING Variable |
|
VALUE_RAWSTR_OLD_DB |
Old Change Document Value for RAWSTRING Variable |
|
VALUE_RAWSTR_NEW |
New Change Document Value for RAWSTRING Variable |
|
VALUE_RAWSTR_NEW_DB |
New Change Document Value for RAWSTRING Variable |
|
VALUE_SHSTR_OLD |
Old Extended Value (Short) |
|
VALUE_SHSTR_OLD_DB |
Old Extended Value (Short) |
|
VALUE_SHSTR_NEW |
New Extended Value (Short) |
|
VALUE_SHSTR_NEW_DB |
New Extended Value (Short) |
|
KEYGUID |
KEYGUID for Link to CDPOS_UID |
|
TABKEY254 |
Key of Modified Table Row |
|
TABKEY254_DB |
Key of Modified Table Row |
|
EXT_KEYLEN |
Table key length |
|
KEYGUID_STR |
KEYGUID for Link to CDPOS_STR |
|
VERSION |
3-Byte field |
Read all change documents for object class
ZCHDO_TEST
CLASS zcl_chdo_read DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_chdo_read IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA: rt_cdredadd TYPE cl_chdo_read_tools=>TT_CDREDADD_TAB, lr_err TYPE REF TO cx_chdo_read_error. TRY. cl_chdo_read_tools=>changedocument_read( EXPORTING i_objectclass = 'ZCHDO_TEST' " change document object name * it_objectid = * i_date_of_change = * i_time_of_change = * i_date_until = * i_time_until = * it_username = * it_read_options = IMPORTING et_cdredadd_tab = rt_cdredadd " result returned in table ). CATCH cx_chdo_read_error into lr_err. out->write( |Exception occurred: { lr_err->get_text( ) }| ). ENDTRY. ENDMETHOD. ENDCLASS.