Adding entries to Change Document History CDHDR & CDPOS tables using associated function module manually

When adding entries manually to the change document history tables(CDHDR, CDPOS) you will need to find the actual function module used by the SAP transaction to create these entries! This can be done as follows:


        Step 1 (Execute transaction)

Execute transaction SCDO


        Step 2 (Select required object)

Place the cursor in the required entry (i.e. GMGRANT) and go to the menu option: Change doc.object->Display



        Step 2 (View generation info)

Press the 'Generation info' button


        Step 3 (Retrieve update function module )

The following screen will be displayed showing various information, including the 'update function module' (i.e. GMGRANT_WRITE_DOCUMENT). This can then be viewed via SE37 or SE80 like any other function module.



        Step 4 (Executing the function module)

If you want to know how the function module works and how to populate its parameters, then it is a good idea to put a break-point within the FM code and then execute the transaction which creates the change history entry. You will then be able to see what the transaction passes to the FM and replicate it.

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
Creating Change Document History for a new table so chnages are stored into CDHDR & CDPOS
SAP change document history tables
SAP Database change logs - A simple solution for recording database change history