SAP Function CHANGEDOCU_ARCHIVE_OBJECT - Change document: Archive change documnent

Parameter Reference Type Length Default Optional Text
ARCHIVE_HANDLE SYST-TABIX I 4 Handle on Open Archive Files
CLIENT SYST-MANDT C 3 SY-MANDT X Client for whom change documents are read
OBJECTCLASS CDHDR-OBJECTCLAS C 15 Object class
OBJECTID CDHDR-OBJECTID C 90 SPACE X Object value
OBJECT_DELETE_FLAG 0 'X' X Control inform. for delete function (default: delete)

Exception Text
WRONG_ACCESS_TO_ARCHIVE incorrect access to archive


INCLUDE 'DOCU_HAS_TO_BE_ELABORATED' OBJECT DOKU ID TX

Functions
This function module declares the change documents of anarchive object to the archiving.
This function module must be called after the function moduleARCHIVE_NEW_OBJECT. The change documents are then automaticallyarchived together with the archiving object by the function moduleARCHIVE_SAVE_OBJECT.
The delete flag indicates whether the change documents should bedeleted by the standard archiving delete program after succesfularchiving, or whether they should be retained in the system.
DATA: ARCH_HANDLE LIKE SY-TABIX,
OBJECTCLASS LIKE CDHDR-OBJECTCLAS,
OBJECTID LIKE CDHDR-OBJECTID.
...
CALL FUNCTION 'CHANGEDOCUMENT_ARCHIVE_OBJECT'
EXPORTING
ARCHIVE_HANDLE = ARCH_HANDLE
OBJECTCLASS = OBJECTCLASS
OBJECTID = OBJECTID
OBJECT_DELETE_FLAG = 'X'
EXCEPTIONS
WRONG_ARCHIVE_HANDLE = 01.

Notes
see also:
Handle, definition of term
Archive class, definition of term
Delete programm, definition ofterm

Meaning
INCLUDE 'ARCHIVE_PARAM_HANDLE' OBJECT DOKU ID TX
In this case the handle is used to specify, in which archive you shouldwrite.

Value range
The handle must have been created via the function moduleARCHIVE_OPEN_FOR_WRITE, otherwise the exceptionWRONG_ARCHIVE_HANDLE is raised.

Default
The parameter has no default, it must always be specified.

Notes
See also Definition of terms Handle

Meaning
This parameter contains the client for whom change documents should bearchived.

Value range
A valid client must be specified. The input is not checked.

Default
By default, documents for the current client are archived.

Meaning
This parameter contains the name of the object class, for which changedocuments should be archived.

Value range
The object class must have been maintained with the transaction SCDO.The object class is not checked. If the specified object class does notexist, no documents are archived for it.

Default
This parameter has no default, it must always be specified.

Meaning
This parameter contains the object characteristic value, for whichchange documents should be archived.

Value range
Either space or a valid object ID can be entered. In the first case allchange documents for the object class are processed, in the second caseonly the documents for the specified object value. The object value isnot checked.

Default
All change documents for the specified object class are processed bydefault.

Meaning
This flag determines whether the change documents should be deleted bythe archiving delete program or not.

Value range
If OBJECT_DELETE_FLAG = 'X' is passed, the change documents aredeleted. Otherwise they are not deleted.

Default
By default the change documents are deleted by the archiving deleteprogram, along with the objects to which they belong.