Creating Change Document History for a new table so chnages are stored into CDHDR & CDPOS

If you want change history on one of your newly created Ztables or infact an SAP table that
does not currently have it you will need to implement the following steps:

  • Step 1 (Execute transaction SCDO)


  • Step 2 (Click the create button and enter name!)
  • Note: You will probably get the message 'Change document object ZNEWCH is not in your namespace. Do you still want to create the object?'. Just click yes!


  • Step 3 (Enter table details )
  • Enter the name of the table you want changes to be tracked into teh first input field.. Now press the insert button!


  • Step 4 ( Save )
  • You should now see the following screen, Press the save button, followed by the


  • Step 5 ( Generate Update Program )
  • Goto Utilities->Generate update pgm.
  • Note: Will probably get the message 'Change document object ZNEWCH is not in your namespace. Do you still want to create the object?'. Just click yes!


  • Step 6 ( Enter Update Program details )
  • Enter details as follows, and press 'Generate'.
  • Note: Please note if the function group entered does not exist then it will be created during this process!


  • Step 7 ( Update program proposal screen )
  • You will now be presented with an update program proposal screen detailing what objects will be created.


  • Step 8 ( Press SAVE )
  • Now press save and the update program will be created.


  • Step 9 ( How to Use it )
  • You will now see that a function module has been created, this can now be used to make entries in the documnet history tables when any entries are made to you table:
    CALL FUNCTION 'ZGMRESP_WRITE_DOCUMENT'
    EXPORTING
    objectid = 'ZGMRESP'
    tcode = 'ZP218'
    utime = sy-uzeit
    udate = sy-datum
    username = sy-uname
    n_zgmresp = wa_ngmresp "New record
    o_zgmresp = wa_ogmresp "Old record
    UPD_ZGMRESP = 'U'.

    Change Document history menu -->


    Related Articles

    Change Document History - Implement change document history and data change logs
    Activate change document history for a specific field
    Adding entries to Change Document History CDHDR & CDPOS tables using associated function module manually
    SAP change document history tables
    SAP Database change logs - A simple solution for recording database change history