Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Change document

Former Member
0 Likes
654

I learn the procedure for change document from sap hlep:

1.Define change document object

2.Set change document flag

3.Generate update and INCLUDE objects

4.Integrating the functionality into the program

5.Writing the fields in the program

I'm confuse about step 4 & 5. Can any guys tell me how to achieve them?

Thanks a lot

--Alex Miao

4 REPLIES 4
Read only

Former Member
0 Likes
530

Hi Alex,

The entries into the table CDHDR and CDPOS are not made just because of making the change document active in the data element of the corresponding field.

We need to first create a change document object using the transaction SCDO for the corresponding fields and tables. Now upon generation, you would get a couple of includes and a function module.

Now, in your program, if you want to have entries in CDHDR and CDPOS for the database changes you make, you need to include the programs generated in SCDO and call the function module after every INSERT,MODIFY or DELETE. Without which the entries will not be made in CDHDR and CDPOS.

Souce: http://www.SAPTechnical.COM

Read only

0 Likes
530

Hi Raja,

Thanks you for your reply. It is very clear and useful. Can you answer me another question. The transaction cj20n will do some changes to table IHPA, and we want to track the changes. We found there isn't a change document object for IHPA which has been created by SAP, then we create CDO ZIHPA in SCDO. According your reply we need put our code in cj20n, but it seems impossible as we need modify SAP standard transaction. About this problem do you have any suggestions?

Thanks,

--Alex Miao

Read only

0 Likes
530

May be you need to insert the Change Document code in the user exit (if any) after the database update.

Raja.

Award points if answered your question

Read only

0 Likes
530

Hi Raja,

Thanks again for your reply. Do you mean the custom exit? As far as I know there are not any custom exits after the database update. If you mean user exit which I'm not familiar, can you explain it more detail?

BTW, I have awarded point for you excellent reply.

Regards,

--Alex Miao