sapdev logo background
sapdev logo sapdev logo
Comments

Creating Change Document History for new table




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: 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 table name of which changes need to be tracked and press insert!


  • 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 -->




    comments powered by Disqus