Application Development 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: 

Change Document program Generation

Former Member
0 Kudos

Hi all,

We are trying to capture changes to several ECC tables. We want to capture any change to that table. We want to know what kind of change (Insert, delete or update) and then the key of the record that has changed. Our goal is to capture the most updated information from a table after a change. In order to achieve that we are using a process in which change document objects are created and changes are logged as change document in CDHDR and CDPOS tables. I have generated a program to extract data from CDPOS and CDHDR table. The following link describes the whole process of change log enablement

http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/fa015b493111d182b70000e829fbfe/frameset.htm

a. Created a Change Document Object /TEST/ZXXXXXXXXXXXXX using transaction SCDO and assigned the tables to that Object.

Following function modules and generated parts are automatically generated, followed the above SAP Help document.

Include programs and function modules

Data declaration, TOP...................... /TEST/FZXXXXXXXXXXXXCDT

Consisting of............................. /TEST/FZXXXXXXXXXXXXCDF

and....................................... /TEST/FZXXXXXXXXXXXXCDV

Update function module..................... /TEST/ZXXXXXXXXXXXX_WRITE_DOCUMENT

Call updates function module................ /TEST/FZXXXXXXXXXXXXXCDC

I have included the generated /TEST/FZXXXXXXXXXXXXXCDT and /TEST/FZXXXXXXXXXXXXXCDC

to the main program of function module SAPLZxxxxx. But I am getting syntax error in the Include /TEST/FZXXXXXXXXXXXXXCDC xxxxxx variable is not in the main program.

I need some help on this:

a. As per SAP response what steps are left?

b. Is there any other configuration step that we need to perform? The attached document talks about transactions SWED, SWEC and SWO1 in appendix 😧 Connecting Change document to work flow. We would like to understand if it will be relevant to our enablement work or can we by pass this and still be able to enable the change document logging for our tables

Any help is greatly appreciated...

Thanks,

Mili.

1 REPLY 1

naimesh_patel
Active Contributor
0 Kudos

Instead of the main program SAPLxxx, try to put include /TEST/FZXXXXXXXXXXXXXCDT into the TOP include of the main program. TOP include porgram name would be like LxxxxTOP. Try to compile it again.

Regards,

Naimesh Patel