| Parameter | Reference | Type | Length | Default | Optional | Text |
|---|---|---|---|---|---|---|
| OBJECTCLASS | CDHDR-OBJECTCLAS | C | 15 | Object class name | ||
| OBJECTID | CDHDR-OBJECTID | C | 90 | Object value ID | ||
| PLANNED_CHANGE_NUMBER | CDHDR-PLANCHNGNR | C | 12 | SPACE | X | Task list number |
| PLANNED_OR_REAL_CHANGES | CDHDR-CHANGE_IND | C | 1 | SPACE | X | Flag whether changes are actual or planned |
| Exception | Text |
|---|---|
| SEQUENCE_INVALID | No CLOSE was called for last object |
|
INCLUDE 'DOCU_HAS_TO_BE_ELABORATED' OBJECT DOKU ID TX The change document creation for an object characteristic must startwith the callup of this function module. Internal fields areinitialized and the object characteristic is reported. Example call: DATA: OBJECTCLASS LIKE CDHDR-OBJECTCLAS, OBJECTID LIKE CDHDR-OBJECTID. OBJECTCLASS = 'BANF'. OBEJCTID = '30'. CALL FUNCTION 'CHANGEDOCUMENT_OPEN' EXPORTING OBJECTCLASS = OBJECTCLASS OBJECTID = OBJECTID EXCEPTIONS ... General information on the change document creation
An object class consists of one or several tables or structures definedin the DDIC. The tables or structures must have a key. The tables foran object class should have a common foreign key. Object class Purchase requisition = PReq consists of the DDIC tablesEBAN (purchase requisition) and EBKN (purchase requisition accountassignment). The common key is the purchase requisition number. The object ID of an object class is the common key of the respectivetables. For the object class = PReq, the object ID is the purchase requisitionnumber. An object characteristic of an object class consists of all lines ofthe respective tables with the same object ID. The object characteristic PReq = 30 consists of all lines of the tablesEBAN and EBKN whose purchase requisition number is = 30. Thus, the first step for the change document creation must be thedefinition of suitable object classes. The object classes are not to bemaintained in the DDIC. The central part of the change document creation consists of thefunction modules of the function group CDOK. A change is to betransferred to the function modules by specifying the old unchangedstatus and the new changed status. Text changes are an exception, which are dealt with separately. Thetransfer of the old and new status is always carried out for eachtable. Here, you can decide whether the transfer is carried out in theform of work areas (WORKAREA_OLD, WORKAREA_NEW) or internal tables(TABLE_OLD, TABLE_NEW). In the first case, one speaks of "Single case",in the second of "Multiple case". Correspondingly, the DDIC tables ofthe object classes are called "Single case table" or "Multiple casetable". The function modules distinguish whether it is an entry operation, adeletion, or change operation: When For When carrying out a When changing texts (in this case, long texts), it is only documentedthat the corresponding text has been changed. The old and new status isnot stored. For this reason, an internal table is to be created fortext changes of an object characteristic and the corresponding functionmodule is to be called. When creating change documents, the currencies and units are to bedocumented if the corresponding value fields change. Since the functionmodules are called for every table, this does not cause any problems ifthe referenced fields were defined in the same table structure. If thisis not the case, it is possible to transfer a second DDIC structure tothe function modules, which contains the referenced currency fields andunits fields. So that the correct reference from the function modulescan be made, the field names of the additional structure must beassembled from the names of the corresponding reference tables and thenames of the reference fields. In the "Single Case", transfer referenceinformation in the form of two additional work areas (old, new). In the"Multiple Case", the internal tables are to be extended by thereference structure. Field PREIS gets the currency from table T001, field WAERS. Thus, astructure of the category INTTAB must be created in DDIC, for example,R4711 that contains the field T001WAERS. In the application program,the fields T001WAERS of reference structure (old and new) must then besupplied with T001-WAERS in a suitable position. Notes: Description Value range Default |