<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Change Document in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550762#M854296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Surya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that you know it, but check the note 103358 and related. Additional info (I copy paste documentation from SAP):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Concept   &lt;/P&gt;&lt;P&gt;For changes to a commercial object to be able to be logged in a change document, the object must have been defined in the system as a change document object. A change document object definition contains the tables which represent a commercial object in the system. The definition can also specify whether the deletion of individual fields is to be documented. If a table contains fields whose values refer to units and currency fields, the associated table, containing the units and currencies, can also be specified.&lt;/P&gt;&lt;P&gt;It must be specified for each table, whether a commercial object contains only one (single case) or several (multiple case) records. For example, an order contains an order header and several order items. Normally one record for the order header and several records for the order items are passed to the change document creation when an order is changed.&lt;/P&gt;&lt;P&gt;The name under which a change document object is created is an object class.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The object class BANF was defined for the change document object "Purchase requisition", which consists of the tables EBAN (purchase requisition) and EBKN (purchase requisition account assignment).&lt;/P&gt;&lt;P&gt;Changes to this commercial object can then be saved in the system under the object values of this change document object, i.e. the object ID and a change document number. The object ID is the key to the object value, i.e. all records which are defined as belonging to a given change document object.&lt;/P&gt;&lt;P&gt;All changes to a commercial object constitute an object value under this key. This is for example the order number for orders or the number range object name for number range objects. All changes to a given order or to a given number range object can be accessed in this way. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The object value BANF with the object ID "3000000000" consists of the records of the tables EBAN and EBKN with the order number "3000000000".&lt;/P&gt;&lt;P&gt;If changes are not yet to be made, but are planned, they can be logged as planned changes. A planned date for the changes can be specified. The planned changes can be analyzed and copied into the tables. You must program the copy yourself.&lt;/P&gt;&lt;P&gt;All logging functions are supported by SAP function modules. The application development must contain certain INCLUDE programs. Old and new status are passed to the change document creation. The included function modules determine the changes for all table fields which are flagged as being change-relevant in the Dictionary.&lt;/P&gt;&lt;P&gt;Change document&lt;/P&gt;&lt;P&gt;A change document logs changes to a commercial object. The document is created independently of the actual database change. The change document structure is as follows:&lt;/P&gt;&lt;P&gt;·	Change document header&lt;/P&gt;&lt;P&gt;The header data of the change to an object ID in a particular object class are stored in the change document header. The change document number is automatically issued.&lt;/P&gt;&lt;P&gt;·	Change document item&lt;/P&gt;&lt;P&gt;The change document item contains the old and new values of a field for a particular change, and a change flag.&lt;/P&gt;&lt;P&gt;The change flag can take the following values:&lt;/P&gt;&lt;P&gt;o	U(pdate)&lt;/P&gt;&lt;P&gt;Changed data. (Log entry for each changed field which was flagged in the Dictionary as "change document-relevant")&lt;/P&gt;&lt;P&gt;o	I(nsert)&lt;/P&gt;&lt;P&gt;Data inserted. &lt;/P&gt;&lt;P&gt;Changes: Log entry for the whole table record&lt;/P&gt;&lt;P&gt;Planned changes: Log entry for each table record field &lt;/P&gt;&lt;P&gt;o	D(elete)&lt;/P&gt;&lt;P&gt;Data were deleted (log entry for the whole table record) &lt;/P&gt;&lt;P&gt;o	I(ndividual field documentation)&lt;/P&gt;&lt;P&gt;Delete a table record with field documentation &lt;/P&gt;&lt;P&gt;1 log entry per field of the deleted table entry, the deleted text is saved&lt;/P&gt;&lt;P&gt;·	Change document number&lt;/P&gt;&lt;P&gt;The change document number is issued when a change is logged, i.e. when the change document header is created by the change document creation function module (function group SCD0).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The change number is not the same as the change document number. The change document number is issued automatically by the function group SCD0 function modules when a change document is created for a change document object. The change number is issued by the user when changes are planned. The same change number can be used for various change document objects.&lt;/P&gt;&lt;P&gt;Internal processing&lt;/P&gt;&lt;P&gt;When the object-specific update is called, the object-specific change document creation is called. The object-specific change document header is written with a change document number. The Dictionary is searched for which fields are to be logged for each table in the object definition. The log records for these fields are then created as change document items according to the object definition.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  Procedure   &lt;/P&gt;&lt;P&gt;To use the change document functionality in your application, proceed as follows:&lt;/P&gt;&lt;P&gt;1.	Define the change document object &lt;/P&gt;&lt;P&gt;2.	Check in the Dictionary, whether the data elements of the fields which are to be logged are flagged appropriately. &lt;/P&gt;&lt;P&gt;3.	Generate the update. &lt;/P&gt;&lt;P&gt;4.	Program the appropriate calls in your program.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Define change document object  &lt;/P&gt;&lt;P&gt;Proceed as follows:&lt;/P&gt;&lt;P&gt;1.	Call the change document maintenance transaction (Tools ® ABAP/4 Workbench ® Development ® Other tools ® Change doc. object). An overview of existing change document objects is displayed. &lt;/P&gt;&lt;P&gt;2.	Choose the menu option Create. &lt;/P&gt;&lt;P&gt;3.	Enter a name for the change document object which is to be created. It can be any name starting with "Y" or "Z" (customer name area). &lt;/P&gt;&lt;P&gt;4.	Choose Continue. A new window for inputting the associated tables appears. &lt;/P&gt;&lt;P&gt;5.	Enter a descriptive short text for the change document object. &lt;/P&gt;&lt;P&gt;6.	Make the following entries for each table whose changes are to be logged in the change document for this change document object: &lt;/P&gt;&lt;P&gt;- Table name&lt;/P&gt;&lt;P&gt;Name of the table, as defined in the Dictionary&lt;/P&gt;&lt;P&gt;- Copy as internal table flag. &lt;/P&gt;&lt;P&gt;If the change data are to be passed in an internal table (multiple case), mark this field. If it is not marked, the change data are passed in a work area (single case).&lt;/P&gt;&lt;P&gt;- Doc. for individual fields at delete flag&lt;/P&gt;&lt;P&gt;If you want separate log entries for each field when data are deleted, mark this field. If it is not marked, the deletion of all relevant fields is entered in one document item.&lt;/P&gt;&lt;P&gt;- Ref. table name. (Name of the reference table)&lt;/P&gt;&lt;P&gt;If the currency and unit fields are defined in a reference table, rather than in the table passed, you must pass the name of the reference table, and the field referred to, to the function module. Create an INTTAB structure in the Dictionary, and define fields for this structure, which are made up of the names of the associated reference table and the reference fields.&lt;/P&gt;&lt;P&gt;Enter the name of this structure here.&lt;/P&gt;&lt;P&gt;In the individual case, the reference information is passed in the form of two extra work areas (old, new). In the collective case, the internal tables are extended to include the reference structure.&lt;/P&gt;&lt;P&gt;- Name of the old record fields&lt;/P&gt;&lt;P&gt;Only possible for single case, i.e. when passing change data in a work area: If you do not want to use the * work area, enter an alternative work area name here.&lt;/P&gt;&lt;P&gt;7.	After inputting all relevant tables, choose Insert entries. The new entries are copied into the display. &lt;/P&gt;&lt;P&gt;8.	Save your entries.&lt;/P&gt;&lt;P&gt;Transport change document object&lt;/P&gt;&lt;P&gt;The change document objects are a transport object type, a change request is made when the object is created.&lt;/P&gt;&lt;P&gt;During transport the object-specific update is generated in the target system.&lt;/P&gt;&lt;P&gt;  Set change document flag  &lt;/P&gt;&lt;P&gt;Now check whether the change document flag is set for the corresponding data element in the Dictionary for the fields whose changes are to be logged. This is necessary so that the object-specific function modules can identify which field of the defined object should be entered in the change document during logging.&lt;/P&gt;&lt;P&gt;If the flag is not set, you can change it. The flag becomes effective after the activation. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;If the flag is set by hand, it can have undesirable side-effects: If a table field in another application, which is based on the data element in question, belongs to a change document object, but was not previously logged, setting the flag will start logging in this application as well.&lt;/P&gt;&lt;P&gt;It is therefore important to consider whether data elements are, or could be, change-relevant when creating them, and to set the flag accordingly. If the data element is not in any change document object via a table field, this has no negative effect on the system.&lt;/P&gt;&lt;P&gt; Generate Update and INCLUDE Objects  &lt;/P&gt;&lt;P&gt;The generation creates INCLUDE objects, which contain general and specific data definitions and the program logic for the update function module. Proceed as follows:&lt;/P&gt;&lt;P&gt;1.	Call the change document maintenance transaction (Tools ® ABAP/4 Workbench ® Development ® Other tools ® Change documents). &lt;/P&gt;&lt;P&gt;2.	Position the cursor on a change document object and choose the menu option Generate update pgm. A dialog box, in which you must make the following entries, is displayed: &lt;/P&gt;&lt;P&gt;&amp;#150; maximum 26 character INCLUDE name &lt;/P&gt;&lt;P&gt;This 26-character name (CDF parameters:&lt;/P&gt;&lt;P&gt;·	CDOC_PLANNED_OR_REAL&lt;/P&gt;&lt;P&gt;With this parameter you control whether the changes to be logged are actual or planned changes.&lt;/P&gt;&lt;P&gt;Possible values&lt;/P&gt;&lt;P&gt;o	"R" actual (real) changes &lt;/P&gt;&lt;P&gt;o	"P" planned changes&lt;/P&gt;&lt;P&gt;o	" "(space) if no plan number exists: actual change&lt;/P&gt;&lt;P&gt;if a plan number exists: planned change&lt;/P&gt;&lt;P&gt;·	CDOC_UPD_OBJECT&lt;/P&gt;&lt;P&gt;If the change document is relevant for determining which change action was performed for the object, you can pass the action performed here.&lt;/P&gt;&lt;P&gt;Possible values:&lt;/P&gt;&lt;P&gt;o	"I" the object was inserted.&lt;/P&gt;&lt;P&gt;o	"U" the object was changed. &lt;/P&gt;&lt;P&gt;o	"D" the object was deleted.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Creating change documents  &lt;/P&gt;&lt;P&gt;Function group SCD0&lt;/P&gt;&lt;P&gt;Object-specific update change documents for a particular object ID are created with the function modules in this function group. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;These function modules are called, in the right order, by the object-specifically generated update program, as soon as it is called. They are generally not required for application developments. Only in exceptional cases, in which an individual update is to be programmed, should the change document creation be programmed by the user with these function modules.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_OPEN&lt;/P&gt;&lt;P&gt;This function module is required by every change document creation. It initializes the internal fields for a particular change document object ID. &lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_MULTIPLE_CASE&lt;/P&gt;&lt;P&gt;This function module creates change document items. The change data are passed in tables.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_SINGLE_CASE&lt;/P&gt;&lt;P&gt;This function module creates change document items. The change data are passed in a work area.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_TEXT_CASE&lt;/P&gt;&lt;P&gt;Change document-relevant texts are passed in a structure with this function module.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_CLOSE&lt;/P&gt;&lt;P&gt;This function module is required for every change document creation. It writes the change document header for a particular change document ID, and closes the document creation.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_PREPARE_TABLES&lt;/P&gt;&lt;P&gt;With this function module, you compare the records in two tables, which you pass as TABLE_OLD and TABLE_NEW. &lt;/P&gt;&lt;P&gt;You can specify via a parameter, whether these internal tables should be prepared for the multiple case. Identical records are then deleted, and a processing flag is set in changed records. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Read and format change documents  &lt;/P&gt;&lt;P&gt;Two function groups exist for these tasks:&lt;/P&gt;&lt;P&gt;Function group SCD1&lt;/P&gt;&lt;P&gt;With the function modules in this function group, you can read change documents.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_READ_HEADERS&lt;/P&gt;&lt;P&gt;This function module reads the change document numbers, with the associated header information, for a particular change document object. The search can be restricted by various parameters (changed by, date, time).&lt;/P&gt;&lt;P&gt;You can use this function module in the database and in the archive.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_READ_POSITIONS&lt;/P&gt;&lt;P&gt;This function module reads the change document items for a given change document object number, and formats the old and new values according to their type. &lt;/P&gt;&lt;P&gt;You can use this function module in the database and in the archive.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_PREPARE_POS&lt;/P&gt;&lt;P&gt;You format a previously read change document item for printing with this function module.&lt;/P&gt;&lt;P&gt;Function group SCD2&lt;/P&gt;&lt;P&gt;You can process change document objects by classes with the function modules in this group.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_READ&lt;/P&gt;&lt;P&gt;With this function module, you read change document headers and the associated items for a given object class and format the old and new values according to their type. The search can be restricted by various parameters (changed by, date, time).&lt;/P&gt;&lt;P&gt;You can use this function module in the database and in the archive.&lt;/P&gt;&lt;P&gt; Read and format planned changes  &lt;/P&gt;&lt;P&gt;Function group SCD3&lt;/P&gt;&lt;P&gt;With the function modules in this function group, you find the planned changes.&lt;/P&gt;&lt;P&gt;·	PLANNED_CHANGES_READ_HEADERS&lt;/P&gt;&lt;P&gt;With this function module, you find the document headers of planned changes for a given change document object. The search can be restricted by various parameters (changed by, date, time, change number).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The change number is not the same as the change document number. The change document number is automatically issued by the function group SCD0 function modules when a change document object change document is created. The change number is assigned by the user when changes are planned. The same change number can be used for various change document objects.&lt;/P&gt;&lt;P&gt;·	PLANNED_CHANGES_READ_POSITIONS&lt;/P&gt;&lt;P&gt;This function module reads the change document items for a given change document number, and formats the old and new values according to their type.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Delete change documents and planned changes  &lt;/P&gt;&lt;P&gt;Function group SCD4&lt;/P&gt;&lt;P&gt;With the function modules in this function group, you delete log entries of changes or planned changes.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_DELETE&lt;/P&gt;&lt;P&gt;This function module deletes the change documents for a given change document object. The deletion can be restricted to a given change document number and/or a change date.&lt;/P&gt;&lt;P&gt;An authorization check is made before the deletion.&lt;/P&gt;&lt;P&gt;·	PLANNED_CHANGES_DELETE&lt;/P&gt;&lt;P&gt;With this function module, you delete planned changes. The deletion can be restricted to a given change document object, a change document number, or specified change numbers.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The change number is not the same as the change document number. The change document number is issued automatically by the function group SCD0 function modules when a change document object change document is created. The change number is issued by the user when changes are planned. The same change number can be used for various change document objects.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Archived change documents management   &lt;/P&gt;&lt;P&gt;Function group SCD5&lt;/P&gt;&lt;P&gt;This function module is the archiving class for the change document (see also Archiving in the archiving section in this document):&lt;/P&gt;&lt;P&gt;·	CHANGEDOCU_ARCHIVE_OBJECT&lt;/P&gt;&lt;P&gt;With this function module, you pass the objects for which change documents are to be archived, to the archiving.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;In response to your questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. My suggestion is a single table, if you have more tables, resume them in an structure (in your z-report populate it before you call the FM that populate CDHDR/CDPOS). Examples in standard: VBAPVB, VBEPVB and so on.&lt;/P&gt;&lt;P&gt;2. If you use an standard data element without the indicator, copy it and change the indicator (I made it and it works).&lt;/P&gt;&lt;P&gt;3. I'm sorry, but I dont understand the question.&lt;/P&gt;&lt;P&gt;4. One example. I want to control the modifications in a Z-table (ZVT_LIQ_X). I transfer it like internal table (ie: multidim.) and SCDO generate FM Z_VT_LIQ_WRITE_DOCUMENT. The structure is ZZVT_LIQ_X.&lt;/P&gt;&lt;P&gt;So in my coding, before modification I call two subroutines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form export_liq  using    optionx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh xvt_liq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from zvt_liq_x&lt;/P&gt;&lt;P&gt;    into corresponding fields of table xvt_liq&lt;/P&gt;&lt;P&gt;      where werks = i_listado-werks&lt;/P&gt;&lt;P&gt;      and   fecha = i_listado-fecha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at xvt_liq.&lt;/P&gt;&lt;P&gt;    xvt_liq-kz = optionx.&lt;/P&gt;&lt;P&gt;    modify xvt_liq.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " export_liq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And after the modifciation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form import_liq  using    optiony.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: wx_liq like zvt_liq_x,&lt;/P&gt;&lt;P&gt;        wy_liq like zvt_liq_x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh yvt_liq..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from zvt_liq_x&lt;/P&gt;&lt;P&gt;     into corresponding fields of table yvt_liq&lt;/P&gt;&lt;P&gt;          where werks = i_listado-werks&lt;/P&gt;&lt;P&gt;          and   fecha = i_listado-fecha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at yvt_liq.&lt;/P&gt;&lt;P&gt;    yvt_liq-kz = optiony.&lt;/P&gt;&lt;P&gt;    modify yvt_liq.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate yvt_liq-mandt&lt;/P&gt;&lt;P&gt;              yvt_liq-werks&lt;/P&gt;&lt;P&gt;              yvt_liq-fecha&lt;/P&gt;&lt;P&gt;           into change_texto-teilobjid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CONDENSE change_texto-teilobjid NO-GAPS.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  change_texto-textart = ' '.&lt;/P&gt;&lt;P&gt;  change_texto-textspr = sy-langu.&lt;/P&gt;&lt;P&gt;  change_texto-updkz   = optiony.&lt;/P&gt;&lt;P&gt;  append change_texto.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  read table xvt_liq index 1.&lt;/P&gt;&lt;P&gt;  move-corresponding xvt_liq to wx_liq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  read table yvt_liq index 1.&lt;/P&gt;&lt;P&gt;  move-corresponding yvt_liq to wy_liq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'Z_VTLIQ_REG_MODIFICACION'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      i_werks        = i_listado-werks&lt;/P&gt;&lt;P&gt;      i_fecha        = i_listado-fecha&lt;/P&gt;&lt;P&gt;      i_kz           = optiony&lt;/P&gt;&lt;P&gt;      y_liq          = wy_liq&lt;/P&gt;&lt;P&gt;      x_liq          = wx_liq&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      t_txt          = change_texto&lt;/P&gt;&lt;P&gt;      t_init         = xvt_liq&lt;/P&gt;&lt;P&gt;      t_save         = yvt_liq&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      no_liquidacion = 1&lt;/P&gt;&lt;P&gt;      others         = 2.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " import_liq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function z_vtliq_reg_modificacion.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Interfase local&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_WERKS) LIKE  ZVT_LIQ_TIENDAS-WERKS&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_FECHA) LIKE  ZVT_LIQ_TIENDAS-FECHA&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_KZ) TYPE  CDCHNGIND&lt;/P&gt;&lt;P&gt;*"     REFERENCE(Y_LIQ) LIKE  ZVT_LIQ_x STRUCTURE&lt;/P&gt;&lt;P&gt;*"        ZVT_LIQ_x&lt;/P&gt;&lt;P&gt;*"     REFERENCE(X_LIQ) LIKE  ZVT_LIQ_x STRUCTURE&lt;/P&gt;&lt;P&gt;*"        ZVT_LIQ_x&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      T_TXT STRUCTURE  CDTXT&lt;/P&gt;&lt;P&gt;*"      T_INIT STRUCTURE  ZZVT_LIQ_x&lt;/P&gt;&lt;P&gt;*"      T_SAVE STRUCTURE  ZZVT_LIQ_x&lt;/P&gt;&lt;P&gt;*"  EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"      NO_LIQUIDACION&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: objeto like cdhdr-objectid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear objeto.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate i_fecha i_werks into objeto.&lt;/P&gt;&lt;P&gt;*CONDENSE objeto NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'Z_VTLIQ_WRITE_DOCUMENT' "IN UPDATE TASK&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    objectid                      = objeto&lt;/P&gt;&lt;P&gt;    tcode                         = sy-tcode&lt;/P&gt;&lt;P&gt;    utime                         = sy-uzeit&lt;/P&gt;&lt;P&gt;    udate                         = sy-datum&lt;/P&gt;&lt;P&gt;    username                      = sy-uname&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PLANNED_CHANGE_NUMBER         = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    object_change_indicator       = i_kz&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PLANNED_OR_REAL_CHANGES       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_CHANGE_POINTERS            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UPD_ICDTXT_Z_VTLIQ            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    upd_zvt_liq_x         = i_kz&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CHANGENUMBER                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    icdtxt_z_vtliq                = t_txt&lt;/P&gt;&lt;P&gt;    xzvt_liq_tiendas              = t_save&lt;/P&gt;&lt;P&gt;    yzvt_liq_tiendas              = t_init&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endfunction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 5. Perhaps I dont understand you, but if you manage the rolling procedures (COMMIT and so on), in CDHDR/CDPOS the commit works too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eduardo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Eduardo Hinojosa Muñoz on Apr 17, 2008 4:40 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Mar 2008 18:07:46 GMT</pubDate>
    <dc:creator>eduardo_hinojosa</dc:creator>
    <dc:date>2008-03-25T18:07:46Z</dc:date>
    <item>
      <title>Change Document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550755#M854289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have requirement to track changes of some fields of couple of custom tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I looked at the SAP help, I found the following...link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/EN/2a/fa015b493111d182b70000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/EN/2a/fa015b493111d182b70000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here under Change Documents &amp;gt; Procedure I found the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use the change document functionality in your application, proceed as follows:&lt;/P&gt;&lt;P&gt;1.	Define the change document object &lt;/P&gt;&lt;P&gt;2.	Check in the Dictionary, whether the data elements of the fields which are to be logged are flagged appropriately. &lt;/P&gt;&lt;P&gt;3.	Generate the update. &lt;/P&gt;&lt;P&gt;4.	Program the appropriate calls in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understood the first two steps and I am assuming that the first two steps are OK for my requirement.(Please confirm ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are 3 and 4 ? When they will be used ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Surya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 21:32:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550755#M854289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T21:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Change Document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550756#M854290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;okay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you change the values in fields of Z-Table , I am assuming you are going to do it with some Z-transaction. It is there in that Z-transaction , you will need to call the change objects ( step 3 &amp;amp; 4) . &lt;/P&gt;&lt;P&gt;Yes you will need to program it yourself , so that the change docs  are created whenever the values of certain fields are changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP does not create those automatically .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 01:28:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550756#M854290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T01:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Change Document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550757#M854291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vaibhav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you quick response. I am not sure of how these tables are changed. I need ask my BA about this. I assummed that by doing steps 1 &amp;amp; 2, SAP will automatically record changes like update, delete, insert of field values in tables CDHDR and CDPOS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 tables to track:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I create one change document object for all the three tables or seperate change document objects for each table ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, Is there any check list of items that I should know from the BA, before starting this work ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Surya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 14:33:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550757#M854291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T14:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change Document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550758#M854292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to create your change document object depends on how you update the records of your Z-TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So u need to run the trx SCDO in order to create your Z-object, after generating it the system'll create a function module in order to insert the modification in CDHDR e CDPOS tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anaway the system doesn't call that fm automatically, but you need to insert the calling in all your programs where the Z-TABLES are updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 14:42:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550758#M854292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T14:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Change Document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550759#M854293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, there are 2 main tables (not enough well known) which can be accessed through ABAP or Function Module.&lt;/P&gt;&lt;P&gt;So nothing technically pointed in this blog, only just very useful!&lt;/P&gt;&lt;P&gt;Following the classical SAP table structure, you&amp;#146;ll find CDHDR (Change document header) and CDPOS (Change document items). ( HR Module: PCDHDR and PCDPOS ) &lt;/P&gt;&lt;P&gt;They can be read using a classical &amp;#145;Select&amp;#146; statement or using respectively the following FM &lt;/P&gt;&lt;P&gt;'CHANGEDOCUMENT_READ_HEADERS'&lt;/P&gt;&lt;P&gt;'CHANGEDOCUMENT_READ_POSITIONS'&lt;/P&gt;&lt;P&gt;As those tables log the SAP document changes, we can imagine how much large they are, especially CDPOS ! And unfortunately, as this one is a &amp;#147;cluster&amp;#148; table, no &amp;#147;Join&amp;#148; query is possible. &lt;/P&gt;&lt;P&gt;And this is the main inconvenient; you&amp;#146;ll have to be very careful in building your query, filling the key field the better you can. ( Tips : Use the &amp;#147;For All entries&amp;#148; Statement )&lt;/P&gt;&lt;P&gt;Now in order to illustrate, we&amp;#146;ll see through 2 different examples, how being aware of the utility of these tables can be interesting and useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Code&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1 - I want to know, for statistic reasons, how many sales orders were blocked for &amp;#147;Credit limit&amp;#148; ( Delivery block status to 01 ) and then released during a period.( using Select Statement )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  z_stat_so_blocked                                 .

TABLES : cdhdr, cdpos.

DATA : BEGIN OF t_cdhdr OCCURS 0,
       objectid LIKE cdhdr-objectid,
       changenr LIKE cdhdr-changenr,
       udate    LIKE cdhdr-udate,
       username LIKE cdhdr-username,
       END OF t_cdhdr.

DATA : BEGIN OF t_cdpos OCCURS 0,
       objectid LIKE vbap-vbeln,
       END OF t_cdpos.

*-
SELECT-OPTIONS : period   FOR cdhdr-udate OBLIGATORY.

*-
START-OF-SELECTION.

  CLEAR cdhdr.
  SELECT  objectid
          changenr
          udate
          username
          INTO TABLE t_cdhdr
          FROM cdhdr
          WHERE objectclas EQ 'VERKBELEG'     "This is the Class
                                              "for Sales Order
          AND   udate IN period
          AND   tcode EQ 'VA02'               " T-code
          AND   change_ind EQ 'U'.            " Update

  SORT t_cdhdr BY objectid.

  CHECK NOT t_cdhdr[] IS INITIAL.

  CLEAR cdpos.
  SELECT objectid
         INTO TABLE t_cdpos
         FROM cdpos
         FOR ALL ENTRIES IN t_cdhdr
         WHERE objectclas EQ 'VERKBELEG'
         AND   objectid EQ t_cdhdr-objectid
         AND   changenr EQ t_cdhdr-changenr
         AND   tabname  EQ 'VBAK'
         AND   fname    EQ 'LIFSK'       " Field name for Delivery Block
         AND   chngind  EQ 'U'           " Update
         AND   value_old EQ '01'.

  SORT t_cdpos BY objectid.

  LOOP AT t_cdpos.
    WRITE : / t_cdpos-objectid.
  ENDLOOP.

END-OF-SELECTION.

*2 - I want to display Material Master changes occured in a period( using FM's *
 
REPORT  ztrace_material.

TABLES: mara,
        cdhdr,
        cdpos.

SELECT-OPTIONS: period     FOR cdhdr-udate,
                name       FOR cdhdr-username,
                material   FOR mara-matnr.

DATA: wchangenr LIKE cdhdr-changenr.

DATA: wtext(80) TYPE c.

DATA : BEGIN OF t_mara OCCURS 0,
       matnr LIKE mara-matnr,
       END OF t_mara.

DATA: BEGIN OF icdhdr OCCURS 50.
        INCLUDE STRUCTURE cdhdr.
DATA: END OF icdhdr.

DATA: BEGIN OF icdshw OCCURS 50.
        INCLUDE STRUCTURE cdshw.
DATA: END OF icdshw.

DATA :  w_matnr LIKE mara-matnr.

DATA: BEGIN OF itab OCCURS 50,
      matnr  LIKE mara-matnr,
      changenr LIKE cdhdr-changenr,
      udate    LIKE cdhdr-udate,
      utime    LIKE cdhdr-utime,
      username LIKE cdhdr-username,
      chngind  LIKE cdshw-chngind,
      ftext    LIKE cdshw-ftext,
      outlen   LIKE cdshw-outlen,
      f_old    LIKE cdshw-f_old,
      f_new    LIKE cdshw-f_new,
      END OF itab.

FIELD-SYMBOLS: &amp;lt;value_old&amp;gt;, &amp;lt;value_new&amp;gt;.

SELECT matnr
      INTO TABLE t_mara
      FROM mara WHERE matnr IN material.

clear t_mara.
LOOP AT t_mara.
* Get Changes
  PERFORM changedocument_read.
ENDLOOP.


LOOP AT itab.
  CLEAR: wtext, w_matnr.
  CASE itab-chngind.
    WHEN 'U'.
      wtext(50) = 'Updated field'.
      wtext+51  = itab-ftext.
      CONDENSE wtext.
    WHEN 'D'.
      wtext = text-021.
    WHEN 'E'.
      wtext(5) = itab-ftext.
      wtext+51 = ' text : E'.
      CONDENSE wtext.
    WHEN 'I'.
      wtext = ' text : I'.
  ENDCASE.
  RESERVE 5 LINES.
  IF wchangenr NE itab-changenr.
    wchangenr = itab-changenr.
    w_matnr = itab-matnr.
    WRITE:/ itab-udate    UNDER 'Change Date',
            itab-utime    UNDER 'Time',
            itab-username UNDER 'User Name',
            itab-matnr    UNDER 'Material No',
            wtext         UNDER 'Changes'.
  ELSEIF itab-matnr NE w_matnr.
    WRITE:/ wtext         UNDER 'Changes'.

  ENDIF.

  CASE itab-chngind.
    WHEN 'U'.
      ASSIGN itab-f_old(itab-outlen) TO &amp;lt;value_old&amp;gt;.
      ASSIGN itab-f_new(itab-outlen) TO &amp;lt;value_new&amp;gt;.
      WRITE: / text-023  UNDER 'Changes',
               &amp;lt;value_old&amp;gt;.
      WRITE: / text-024 UNDER 'Changes',
               &amp;lt;value_new&amp;gt;.
    WHEN 'E'.
      ASSIGN itab-f_old(itab-outlen) TO &amp;lt;value_old&amp;gt;.
      WRITE: text-023 UNDER 'Changes',
             &amp;lt;value_old&amp;gt;.
  ENDCASE.
  SKIP.
ENDLOOP.


TOP-OF-PAGE.
  WRITE: / sy-repid,
           50 'Material Changes'.
Skip to line 4.

  ULINE.
  WRITE:/01 'Change Date',
         15 'Time',
         30 'User Name',
         45 'Material No',
         70 'Changes'.
  ULINE.

*&amp;amp;--------------------------------------------------------------------*
*&amp;amp;      Form  CHANGEDOCUMENT_READ
*&amp;amp;--------------------------------------------------------------------*
*       text
*---------------------------------------------------------------------*
FORM changedocument_read.
  CLEAR cdhdr.
  CLEAR cdpos.
  cdhdr-objectclas = 'MATERIAL'.
  cdhdr-objectid   = t_mara-matnr.

  CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
    EXPORTING
      date_of_change    = cdhdr-udate
      objectclass       = cdhdr-objectclas
      objectid          = cdhdr-objectid
      time_of_change    = cdhdr-utime
      username          = cdhdr-username
    TABLES
      i_cdhdr           = icdhdr
    EXCEPTIONS
      no_position_found = 1
      OTHERS            = 2.

  CHECK sy-subrc EQ 0.
  DELETE icdhdr WHERE change_ind EQ 'I'.
  CHECK NOT icdhdr[] IS INITIAL.
  LOOP AT icdhdr.
    CHECK icdhdr-udate IN period.
    CHECK icdhdr-username IN name.
    CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
      EXPORTING
        changenumber      = icdhdr-changenr
      IMPORTING
        header            = cdhdr
      TABLES
        editpos           = icdshw
      EXCEPTIONS
        no_position_found = 1
        OTHERS            = 2.
    CHECK sy-subrc EQ 0.
    LOOP AT icdshw.
      CHECK icdshw-text_case EQ space.
      MOVE-CORRESPONDING icdshw TO itab.
      MOVE-CORRESPONDING icdhdr TO itab.
      MOVE icdshw-tabkey+3 TO itab-matnr.
      APPEND itab.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    "CHANGEDOCUMENT_READ&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final Words&lt;/P&gt;&lt;P&gt;This concept of change documents log is applicable to different type of SAP documents. But it depends on your SAP customization. &lt;/P&gt;&lt;P&gt;At a technical level, we can notice that only changes to fields whose data elements are marked as relevant for the creation of change documents in SE11 lead to the creation of change documents. Modifications logging only takes place if the fields whose contents were changed refer to a data element that was flagged as relevant for the change document. &lt;/P&gt;&lt;P&gt;For those who want to go further on this topic, I invite them to check out function group SCD0, SCD1, SCD2 ( contains all the document handling FM's ). This means you can also use this functionality in your own application...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 14:43:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550759#M854293</guid>
      <dc:creator>santhosh_patil</dc:creator>
      <dc:date>2008-03-18T14:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Change Document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550760#M854294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satosh,&lt;/P&gt;&lt;P&gt;Thanks for your response. I have some more info and questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I came to know that there is another options at table technical sttings level. If we check Log data changes box. But this is good only when there are very rare changes to the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My business said the changes to these custom tables is going to be few times in a month, but if changes are made there can be many. I am not able to take decision of recomonding the first option or creating change document object option. Upto how many changes in an year we can consider 1st option ? Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following are some more questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Should I create CDO for each table or one CDO for all the tables?&lt;/P&gt;&lt;P&gt;2. There is a z...field in a table whose data element is MBLNR, change document check box is not checked in its propertis(Further Characters)&lt;/P&gt;&lt;P&gt;	In this situation I assume that copy this data element to a z...data element and check change document check box. Please confirm this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. If there is a data element whose change document property is not checked. I assume that we need to check it. Suppose assume that I made this change then what will happen if this data element is used in another z..table ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. If I choose 2nd option, how and where the generated FMs should be used?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. If something goes wrong, What will be the potential impact on the system ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Surya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Surya on Mar 20, 2008 5:36 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 21:25:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550760#M854294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T21:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Change Document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550761#M854295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone respond to my questions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Surya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 14:10:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550761#M854295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T14:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Change Document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550762#M854296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Surya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that you know it, but check the note 103358 and related. Additional info (I copy paste documentation from SAP):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Concept   &lt;/P&gt;&lt;P&gt;For changes to a commercial object to be able to be logged in a change document, the object must have been defined in the system as a change document object. A change document object definition contains the tables which represent a commercial object in the system. The definition can also specify whether the deletion of individual fields is to be documented. If a table contains fields whose values refer to units and currency fields, the associated table, containing the units and currencies, can also be specified.&lt;/P&gt;&lt;P&gt;It must be specified for each table, whether a commercial object contains only one (single case) or several (multiple case) records. For example, an order contains an order header and several order items. Normally one record for the order header and several records for the order items are passed to the change document creation when an order is changed.&lt;/P&gt;&lt;P&gt;The name under which a change document object is created is an object class.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The object class BANF was defined for the change document object "Purchase requisition", which consists of the tables EBAN (purchase requisition) and EBKN (purchase requisition account assignment).&lt;/P&gt;&lt;P&gt;Changes to this commercial object can then be saved in the system under the object values of this change document object, i.e. the object ID and a change document number. The object ID is the key to the object value, i.e. all records which are defined as belonging to a given change document object.&lt;/P&gt;&lt;P&gt;All changes to a commercial object constitute an object value under this key. This is for example the order number for orders or the number range object name for number range objects. All changes to a given order or to a given number range object can be accessed in this way. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The object value BANF with the object ID "3000000000" consists of the records of the tables EBAN and EBKN with the order number "3000000000".&lt;/P&gt;&lt;P&gt;If changes are not yet to be made, but are planned, they can be logged as planned changes. A planned date for the changes can be specified. The planned changes can be analyzed and copied into the tables. You must program the copy yourself.&lt;/P&gt;&lt;P&gt;All logging functions are supported by SAP function modules. The application development must contain certain INCLUDE programs. Old and new status are passed to the change document creation. The included function modules determine the changes for all table fields which are flagged as being change-relevant in the Dictionary.&lt;/P&gt;&lt;P&gt;Change document&lt;/P&gt;&lt;P&gt;A change document logs changes to a commercial object. The document is created independently of the actual database change. The change document structure is as follows:&lt;/P&gt;&lt;P&gt;·	Change document header&lt;/P&gt;&lt;P&gt;The header data of the change to an object ID in a particular object class are stored in the change document header. The change document number is automatically issued.&lt;/P&gt;&lt;P&gt;·	Change document item&lt;/P&gt;&lt;P&gt;The change document item contains the old and new values of a field for a particular change, and a change flag.&lt;/P&gt;&lt;P&gt;The change flag can take the following values:&lt;/P&gt;&lt;P&gt;o	U(pdate)&lt;/P&gt;&lt;P&gt;Changed data. (Log entry for each changed field which was flagged in the Dictionary as "change document-relevant")&lt;/P&gt;&lt;P&gt;o	I(nsert)&lt;/P&gt;&lt;P&gt;Data inserted. &lt;/P&gt;&lt;P&gt;Changes: Log entry for the whole table record&lt;/P&gt;&lt;P&gt;Planned changes: Log entry for each table record field &lt;/P&gt;&lt;P&gt;o	D(elete)&lt;/P&gt;&lt;P&gt;Data were deleted (log entry for the whole table record) &lt;/P&gt;&lt;P&gt;o	I(ndividual field documentation)&lt;/P&gt;&lt;P&gt;Delete a table record with field documentation &lt;/P&gt;&lt;P&gt;1 log entry per field of the deleted table entry, the deleted text is saved&lt;/P&gt;&lt;P&gt;·	Change document number&lt;/P&gt;&lt;P&gt;The change document number is issued when a change is logged, i.e. when the change document header is created by the change document creation function module (function group SCD0).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The change number is not the same as the change document number. The change document number is issued automatically by the function group SCD0 function modules when a change document is created for a change document object. The change number is issued by the user when changes are planned. The same change number can be used for various change document objects.&lt;/P&gt;&lt;P&gt;Internal processing&lt;/P&gt;&lt;P&gt;When the object-specific update is called, the object-specific change document creation is called. The object-specific change document header is written with a change document number. The Dictionary is searched for which fields are to be logged for each table in the object definition. The log records for these fields are then created as change document items according to the object definition.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  Procedure   &lt;/P&gt;&lt;P&gt;To use the change document functionality in your application, proceed as follows:&lt;/P&gt;&lt;P&gt;1.	Define the change document object &lt;/P&gt;&lt;P&gt;2.	Check in the Dictionary, whether the data elements of the fields which are to be logged are flagged appropriately. &lt;/P&gt;&lt;P&gt;3.	Generate the update. &lt;/P&gt;&lt;P&gt;4.	Program the appropriate calls in your program.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Define change document object  &lt;/P&gt;&lt;P&gt;Proceed as follows:&lt;/P&gt;&lt;P&gt;1.	Call the change document maintenance transaction (Tools ® ABAP/4 Workbench ® Development ® Other tools ® Change doc. object). An overview of existing change document objects is displayed. &lt;/P&gt;&lt;P&gt;2.	Choose the menu option Create. &lt;/P&gt;&lt;P&gt;3.	Enter a name for the change document object which is to be created. It can be any name starting with "Y" or "Z" (customer name area). &lt;/P&gt;&lt;P&gt;4.	Choose Continue. A new window for inputting the associated tables appears. &lt;/P&gt;&lt;P&gt;5.	Enter a descriptive short text for the change document object. &lt;/P&gt;&lt;P&gt;6.	Make the following entries for each table whose changes are to be logged in the change document for this change document object: &lt;/P&gt;&lt;P&gt;- Table name&lt;/P&gt;&lt;P&gt;Name of the table, as defined in the Dictionary&lt;/P&gt;&lt;P&gt;- Copy as internal table flag. &lt;/P&gt;&lt;P&gt;If the change data are to be passed in an internal table (multiple case), mark this field. If it is not marked, the change data are passed in a work area (single case).&lt;/P&gt;&lt;P&gt;- Doc. for individual fields at delete flag&lt;/P&gt;&lt;P&gt;If you want separate log entries for each field when data are deleted, mark this field. If it is not marked, the deletion of all relevant fields is entered in one document item.&lt;/P&gt;&lt;P&gt;- Ref. table name. (Name of the reference table)&lt;/P&gt;&lt;P&gt;If the currency and unit fields are defined in a reference table, rather than in the table passed, you must pass the name of the reference table, and the field referred to, to the function module. Create an INTTAB structure in the Dictionary, and define fields for this structure, which are made up of the names of the associated reference table and the reference fields.&lt;/P&gt;&lt;P&gt;Enter the name of this structure here.&lt;/P&gt;&lt;P&gt;In the individual case, the reference information is passed in the form of two extra work areas (old, new). In the collective case, the internal tables are extended to include the reference structure.&lt;/P&gt;&lt;P&gt;- Name of the old record fields&lt;/P&gt;&lt;P&gt;Only possible for single case, i.e. when passing change data in a work area: If you do not want to use the * work area, enter an alternative work area name here.&lt;/P&gt;&lt;P&gt;7.	After inputting all relevant tables, choose Insert entries. The new entries are copied into the display. &lt;/P&gt;&lt;P&gt;8.	Save your entries.&lt;/P&gt;&lt;P&gt;Transport change document object&lt;/P&gt;&lt;P&gt;The change document objects are a transport object type, a change request is made when the object is created.&lt;/P&gt;&lt;P&gt;During transport the object-specific update is generated in the target system.&lt;/P&gt;&lt;P&gt;  Set change document flag  &lt;/P&gt;&lt;P&gt;Now check whether the change document flag is set for the corresponding data element in the Dictionary for the fields whose changes are to be logged. This is necessary so that the object-specific function modules can identify which field of the defined object should be entered in the change document during logging.&lt;/P&gt;&lt;P&gt;If the flag is not set, you can change it. The flag becomes effective after the activation. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;If the flag is set by hand, it can have undesirable side-effects: If a table field in another application, which is based on the data element in question, belongs to a change document object, but was not previously logged, setting the flag will start logging in this application as well.&lt;/P&gt;&lt;P&gt;It is therefore important to consider whether data elements are, or could be, change-relevant when creating them, and to set the flag accordingly. If the data element is not in any change document object via a table field, this has no negative effect on the system.&lt;/P&gt;&lt;P&gt; Generate Update and INCLUDE Objects  &lt;/P&gt;&lt;P&gt;The generation creates INCLUDE objects, which contain general and specific data definitions and the program logic for the update function module. Proceed as follows:&lt;/P&gt;&lt;P&gt;1.	Call the change document maintenance transaction (Tools ® ABAP/4 Workbench ® Development ® Other tools ® Change documents). &lt;/P&gt;&lt;P&gt;2.	Position the cursor on a change document object and choose the menu option Generate update pgm. A dialog box, in which you must make the following entries, is displayed: &lt;/P&gt;&lt;P&gt;&amp;#150; maximum 26 character INCLUDE name &lt;/P&gt;&lt;P&gt;This 26-character name (CDF parameters:&lt;/P&gt;&lt;P&gt;·	CDOC_PLANNED_OR_REAL&lt;/P&gt;&lt;P&gt;With this parameter you control whether the changes to be logged are actual or planned changes.&lt;/P&gt;&lt;P&gt;Possible values&lt;/P&gt;&lt;P&gt;o	"R" actual (real) changes &lt;/P&gt;&lt;P&gt;o	"P" planned changes&lt;/P&gt;&lt;P&gt;o	" "(space) if no plan number exists: actual change&lt;/P&gt;&lt;P&gt;if a plan number exists: planned change&lt;/P&gt;&lt;P&gt;·	CDOC_UPD_OBJECT&lt;/P&gt;&lt;P&gt;If the change document is relevant for determining which change action was performed for the object, you can pass the action performed here.&lt;/P&gt;&lt;P&gt;Possible values:&lt;/P&gt;&lt;P&gt;o	"I" the object was inserted.&lt;/P&gt;&lt;P&gt;o	"U" the object was changed. &lt;/P&gt;&lt;P&gt;o	"D" the object was deleted.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Creating change documents  &lt;/P&gt;&lt;P&gt;Function group SCD0&lt;/P&gt;&lt;P&gt;Object-specific update change documents for a particular object ID are created with the function modules in this function group. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;These function modules are called, in the right order, by the object-specifically generated update program, as soon as it is called. They are generally not required for application developments. Only in exceptional cases, in which an individual update is to be programmed, should the change document creation be programmed by the user with these function modules.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_OPEN&lt;/P&gt;&lt;P&gt;This function module is required by every change document creation. It initializes the internal fields for a particular change document object ID. &lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_MULTIPLE_CASE&lt;/P&gt;&lt;P&gt;This function module creates change document items. The change data are passed in tables.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_SINGLE_CASE&lt;/P&gt;&lt;P&gt;This function module creates change document items. The change data are passed in a work area.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_TEXT_CASE&lt;/P&gt;&lt;P&gt;Change document-relevant texts are passed in a structure with this function module.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_CLOSE&lt;/P&gt;&lt;P&gt;This function module is required for every change document creation. It writes the change document header for a particular change document ID, and closes the document creation.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_PREPARE_TABLES&lt;/P&gt;&lt;P&gt;With this function module, you compare the records in two tables, which you pass as TABLE_OLD and TABLE_NEW. &lt;/P&gt;&lt;P&gt;You can specify via a parameter, whether these internal tables should be prepared for the multiple case. Identical records are then deleted, and a processing flag is set in changed records. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Read and format change documents  &lt;/P&gt;&lt;P&gt;Two function groups exist for these tasks:&lt;/P&gt;&lt;P&gt;Function group SCD1&lt;/P&gt;&lt;P&gt;With the function modules in this function group, you can read change documents.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_READ_HEADERS&lt;/P&gt;&lt;P&gt;This function module reads the change document numbers, with the associated header information, for a particular change document object. The search can be restricted by various parameters (changed by, date, time).&lt;/P&gt;&lt;P&gt;You can use this function module in the database and in the archive.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_READ_POSITIONS&lt;/P&gt;&lt;P&gt;This function module reads the change document items for a given change document object number, and formats the old and new values according to their type. &lt;/P&gt;&lt;P&gt;You can use this function module in the database and in the archive.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_PREPARE_POS&lt;/P&gt;&lt;P&gt;You format a previously read change document item for printing with this function module.&lt;/P&gt;&lt;P&gt;Function group SCD2&lt;/P&gt;&lt;P&gt;You can process change document objects by classes with the function modules in this group.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_READ&lt;/P&gt;&lt;P&gt;With this function module, you read change document headers and the associated items for a given object class and format the old and new values according to their type. The search can be restricted by various parameters (changed by, date, time).&lt;/P&gt;&lt;P&gt;You can use this function module in the database and in the archive.&lt;/P&gt;&lt;P&gt; Read and format planned changes  &lt;/P&gt;&lt;P&gt;Function group SCD3&lt;/P&gt;&lt;P&gt;With the function modules in this function group, you find the planned changes.&lt;/P&gt;&lt;P&gt;·	PLANNED_CHANGES_READ_HEADERS&lt;/P&gt;&lt;P&gt;With this function module, you find the document headers of planned changes for a given change document object. The search can be restricted by various parameters (changed by, date, time, change number).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The change number is not the same as the change document number. The change document number is automatically issued by the function group SCD0 function modules when a change document object change document is created. The change number is assigned by the user when changes are planned. The same change number can be used for various change document objects.&lt;/P&gt;&lt;P&gt;·	PLANNED_CHANGES_READ_POSITIONS&lt;/P&gt;&lt;P&gt;This function module reads the change document items for a given change document number, and formats the old and new values according to their type.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Delete change documents and planned changes  &lt;/P&gt;&lt;P&gt;Function group SCD4&lt;/P&gt;&lt;P&gt;With the function modules in this function group, you delete log entries of changes or planned changes.&lt;/P&gt;&lt;P&gt;·	CHANGEDOCUMENT_DELETE&lt;/P&gt;&lt;P&gt;This function module deletes the change documents for a given change document object. The deletion can be restricted to a given change document number and/or a change date.&lt;/P&gt;&lt;P&gt;An authorization check is made before the deletion.&lt;/P&gt;&lt;P&gt;·	PLANNED_CHANGES_DELETE&lt;/P&gt;&lt;P&gt;With this function module, you delete planned changes. The deletion can be restricted to a given change document object, a change document number, or specified change numbers.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The change number is not the same as the change document number. The change document number is issued automatically by the function group SCD0 function modules when a change document object change document is created. The change number is issued by the user when changes are planned. The same change number can be used for various change document objects.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Archived change documents management   &lt;/P&gt;&lt;P&gt;Function group SCD5&lt;/P&gt;&lt;P&gt;This function module is the archiving class for the change document (see also Archiving in the archiving section in this document):&lt;/P&gt;&lt;P&gt;·	CHANGEDOCU_ARCHIVE_OBJECT&lt;/P&gt;&lt;P&gt;With this function module, you pass the objects for which change documents are to be archived, to the archiving.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;In response to your questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. My suggestion is a single table, if you have more tables, resume them in an structure (in your z-report populate it before you call the FM that populate CDHDR/CDPOS). Examples in standard: VBAPVB, VBEPVB and so on.&lt;/P&gt;&lt;P&gt;2. If you use an standard data element without the indicator, copy it and change the indicator (I made it and it works).&lt;/P&gt;&lt;P&gt;3. I'm sorry, but I dont understand the question.&lt;/P&gt;&lt;P&gt;4. One example. I want to control the modifications in a Z-table (ZVT_LIQ_X). I transfer it like internal table (ie: multidim.) and SCDO generate FM Z_VT_LIQ_WRITE_DOCUMENT. The structure is ZZVT_LIQ_X.&lt;/P&gt;&lt;P&gt;So in my coding, before modification I call two subroutines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form export_liq  using    optionx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh xvt_liq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from zvt_liq_x&lt;/P&gt;&lt;P&gt;    into corresponding fields of table xvt_liq&lt;/P&gt;&lt;P&gt;      where werks = i_listado-werks&lt;/P&gt;&lt;P&gt;      and   fecha = i_listado-fecha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at xvt_liq.&lt;/P&gt;&lt;P&gt;    xvt_liq-kz = optionx.&lt;/P&gt;&lt;P&gt;    modify xvt_liq.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " export_liq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And after the modifciation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form import_liq  using    optiony.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: wx_liq like zvt_liq_x,&lt;/P&gt;&lt;P&gt;        wy_liq like zvt_liq_x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh yvt_liq..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from zvt_liq_x&lt;/P&gt;&lt;P&gt;     into corresponding fields of table yvt_liq&lt;/P&gt;&lt;P&gt;          where werks = i_listado-werks&lt;/P&gt;&lt;P&gt;          and   fecha = i_listado-fecha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at yvt_liq.&lt;/P&gt;&lt;P&gt;    yvt_liq-kz = optiony.&lt;/P&gt;&lt;P&gt;    modify yvt_liq.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate yvt_liq-mandt&lt;/P&gt;&lt;P&gt;              yvt_liq-werks&lt;/P&gt;&lt;P&gt;              yvt_liq-fecha&lt;/P&gt;&lt;P&gt;           into change_texto-teilobjid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CONDENSE change_texto-teilobjid NO-GAPS.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  change_texto-textart = ' '.&lt;/P&gt;&lt;P&gt;  change_texto-textspr = sy-langu.&lt;/P&gt;&lt;P&gt;  change_texto-updkz   = optiony.&lt;/P&gt;&lt;P&gt;  append change_texto.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  read table xvt_liq index 1.&lt;/P&gt;&lt;P&gt;  move-corresponding xvt_liq to wx_liq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  read table yvt_liq index 1.&lt;/P&gt;&lt;P&gt;  move-corresponding yvt_liq to wy_liq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'Z_VTLIQ_REG_MODIFICACION'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      i_werks        = i_listado-werks&lt;/P&gt;&lt;P&gt;      i_fecha        = i_listado-fecha&lt;/P&gt;&lt;P&gt;      i_kz           = optiony&lt;/P&gt;&lt;P&gt;      y_liq          = wy_liq&lt;/P&gt;&lt;P&gt;      x_liq          = wx_liq&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      t_txt          = change_texto&lt;/P&gt;&lt;P&gt;      t_init         = xvt_liq&lt;/P&gt;&lt;P&gt;      t_save         = yvt_liq&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      no_liquidacion = 1&lt;/P&gt;&lt;P&gt;      others         = 2.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " import_liq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function z_vtliq_reg_modificacion.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Interfase local&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_WERKS) LIKE  ZVT_LIQ_TIENDAS-WERKS&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_FECHA) LIKE  ZVT_LIQ_TIENDAS-FECHA&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_KZ) TYPE  CDCHNGIND&lt;/P&gt;&lt;P&gt;*"     REFERENCE(Y_LIQ) LIKE  ZVT_LIQ_x STRUCTURE&lt;/P&gt;&lt;P&gt;*"        ZVT_LIQ_x&lt;/P&gt;&lt;P&gt;*"     REFERENCE(X_LIQ) LIKE  ZVT_LIQ_x STRUCTURE&lt;/P&gt;&lt;P&gt;*"        ZVT_LIQ_x&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      T_TXT STRUCTURE  CDTXT&lt;/P&gt;&lt;P&gt;*"      T_INIT STRUCTURE  ZZVT_LIQ_x&lt;/P&gt;&lt;P&gt;*"      T_SAVE STRUCTURE  ZZVT_LIQ_x&lt;/P&gt;&lt;P&gt;*"  EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"      NO_LIQUIDACION&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: objeto like cdhdr-objectid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear objeto.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate i_fecha i_werks into objeto.&lt;/P&gt;&lt;P&gt;*CONDENSE objeto NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'Z_VTLIQ_WRITE_DOCUMENT' "IN UPDATE TASK&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    objectid                      = objeto&lt;/P&gt;&lt;P&gt;    tcode                         = sy-tcode&lt;/P&gt;&lt;P&gt;    utime                         = sy-uzeit&lt;/P&gt;&lt;P&gt;    udate                         = sy-datum&lt;/P&gt;&lt;P&gt;    username                      = sy-uname&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PLANNED_CHANGE_NUMBER         = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    object_change_indicator       = i_kz&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PLANNED_OR_REAL_CHANGES       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_CHANGE_POINTERS            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UPD_ICDTXT_Z_VTLIQ            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    upd_zvt_liq_x         = i_kz&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CHANGENUMBER                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    icdtxt_z_vtliq                = t_txt&lt;/P&gt;&lt;P&gt;    xzvt_liq_tiendas              = t_save&lt;/P&gt;&lt;P&gt;    yzvt_liq_tiendas              = t_init&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endfunction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 5. Perhaps I dont understand you, but if you manage the rolling procedures (COMMIT and so on), in CDHDR/CDPOS the commit works too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eduardo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Eduardo Hinojosa Muñoz on Apr 17, 2008 4:40 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 18:07:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-document/m-p/3550762#M854296</guid>
      <dc:creator>eduardo_hinojosa</dc:creator>
      <dc:date>2008-03-25T18:07:46Z</dc:date>
    </item>
  </channel>
</rss>

