‎2012 May 18 12:34 PM
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
‎2012 May 18 12:40 PM
Hi Manoj,
Check the below link, it may help you solve your issue;
Regards,
Karthik D
‎2012 May 18 1:01 PM
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
‎2012 May 18 1:49 PM
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 ...