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

Enable change document for a custom table

Former Member
0 Likes
3,356

Hi,

I am facing one problem in enabling change document for a Ztable. Pls find the description as below:

In order to enable change document for a Ztable i have checked the corresponding check box for Change document in the data element and created a object in Tcode SCDO and a standard function module got generated which needs to be coded accordingly to update entries in CDHDR and CDPOS table . But my problem lies in the fact that i need to explicitly pass the values for 'New value' and 'Old value' fields respectively.

Is there any standard mechanism with the help of which i can acheive this .i.e Getting Old and new values automatically in the respective fields.

<signs of impatience removed by moderator>

Thanks & Regards,

Manoj Bilthare

Message was edited by: Thomas Zloch

3 REPLIES 3
Read only

Former Member
0 Likes
1,740

Hi Manoj,

Check the below link, it may help you solve your issue;

http://wiki.sdn.sap.com/wiki/display/ABAP/ABAP+-+Data+Change+Tracker+for+Custom+Tables#ABAP-DataChan...

Regards,

Karthik D

Read only

0 Likes
1,740

Hi Karthik D,

Gone through ur link. I have also done the same thing as mentioned link
but my problem is that i dont want to pass the old and new values explicitly to the function module. Instead ,
i am looking for some standard way which can deal this automatically.
By passing the values explicitly does'nt make sense as i am introducing change document
process in order to get rid of buffering the old values.

Thanks & Regards,

Manoj Bilthare

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,740

The answer is NO...

By passing the values explicitly does'nt make sense as i am introducing change document process in order to get rid of buffering the old values.

You just have to fill the old value structure or internal table when reading database and the new value when preparing update. In fact in the code part where you check if an update is required, how do you check that data has been changed if you don't keep old data somewhere in memory (*)

If you don't want to code, then use Table Change Logging, but it must be active in the system/client. (rec/client parameter in the SAP system profile)

Regards,

Raymond

(*) I dare not consider that you do not do this test ...