Creating Change Documents for Custom tables

By Mydhili Maddala, IBM India


Business data objects are changed frequently. It is often useful to log these changes for objects that are critical. SAP Systems log changes to business data objects in change documents. For standard business process like creation of Purchase Order, creation of material, creation of delivery etc SAP provides certain change document objects. Similarly, to keep track of the changes in any custom tables, we need to implement change document system. 

SAP Interface 

Idea conceived 

This abstract talks about the concept of the change document object for custom tables. SAP does not automatically keep track of the changes done to a custom table data. We need to define it manually and activate it.  The concept of change documents should be implemented only if it is really important that you keep track of changes made to the object. 

Idea Implemented 

In our project, we got a requirement of providing this change document feature for a view cluster which consists of four tables grouped together logically. When ever a change is done to any of these four tables, the changes must be logged. 

To meet this requirement, we created a change document object for the view cluster using the transaction SCDO. All the changes get stored in CDHDR and CDPOS tables. 

Steps to implement Change Document functionality 

  1. Define the change document object
  2. Check in the Dictionary, whether the data elements of the fields, which are to be logged, are flagged appropriately.
  3. Generate the update.
  4. Program the appropriate calls in your program.  

To define a change document object, proceed as follows:

  1. Go to Transaction SCDO.
  2. Choose the menu option Create.
  3. Enter a name for the change document object, which is to be created. It can be any name starting with "Y" or "Z”.
  4. Choose Continue. A new window for inputting the associated tables appears.
  5. Enter a descriptive short text for the change document object. Make the required entries for each table whose changes are to be logged in the change document for this change document object.
  6. After inputting all relevant tables, choose Insert entries. The new entries are copied into the display.
  7. Save your entries and then click on Generate push button.

The generation creates INCLUDE objects, which contain general and specific data definitions and the program logic for the update function module.

After defining a change document, to integrate the change document object in our program, we need to follow the below steps.

  1. Include the generated program parts in your program code with an INCLUDE statement.
  2. When application changes are made, complete the change-relevant fields as appropriate.
  3. To create the change document, call the object-specifically generated update program with a PERFORM statement using the name defined in include program.
Click here for step-by-step procedure in creating and using a change document object.

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image