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: 

Need help with change document

Former Member
0 Kudos

Hi All,

Can anyone help me with change document? I have created the change document object and generated all the required programs/FM. I have included the FCDT & FCDC in my program. What should I do next? My program will write/change/delete some data in my customized table. Will the change document get created automatically just by including the 2 program or do I need to manually call the ***_WRITE_DOCUMENT FM?

Then, how will the change document getting written to CDHDR & CDPOS tables?

I have created the change document object for my customized table and checked all the field with 'log change data' in the technical settings. I just do not know how should I go about with all the generated programs. Any help is greatly appreciated.

Thanks in advance,

Mil

1 ACCEPTED SOLUTION

bpawanchand
Active Contributor
0 Kudos

Hi

I need to manually call the
 ***_WRITE_DOCUMENT FM?
Then, how will the change document 
getting written to CDHDR & CDPOS tables?

Well, If you are trying to create a Change Document event for a standard program then all you have to do is find a user exit for that program and call the FM WRITE_DOCUMENT in that include and pass all the mandatory values.

If you are dealing with a Z program then you neeed to call this FM in that Z program.

Regards

Pavan

6 REPLIES 6

bpawanchand
Active Contributor
0 Kudos

Hi

I need to manually call the
 ***_WRITE_DOCUMENT FM?
Then, how will the change document 
getting written to CDHDR & CDPOS tables?

Well, If you are trying to create a Change Document event for a standard program then all you have to do is find a user exit for that program and call the FM WRITE_DOCUMENT in that include and pass all the mandatory values.

If you are dealing with a Z program then you neeed to call this FM in that Z program.

Regards

Pavan

0 Kudos

If I were to call this FM WRITE_DOCUMENT manually in my Z program, what should all the parameter be for the FM (like OBJECTID, PLANNED_CHANGE_NUMBER, CDOC_UPD_OBJECT, etc) be? What if the user change the content of the custome table in SM30? How can the change document gets created?

I also need to know at which point data get written into CDHDR & CDPOS table. THanks in advance again for any help provided.

0 Kudos

Hi

Chekc this thread

Regards

Pavan

0 Kudos

Thanks, but I have followed what that person did, but still the data are not written into CDHDR & CDPOS. My other question is, how can I trigget the change document when user change the table in SM30?

0 Kudos

Hi

After calling the FM WRITE_DOCUMENT did you write COMMIT WORK statement check this

Regards

Pavan

0 Kudos

Thanks Pavan. I couldn't belive that I actually missed the commit work. Points awarded!