‎2009 Dec 07 5:04 PM
Hi,
I have a big problem with writing change documents for Z* table during insert (update and delete are working as aspected ). I generate the function modules and fill the parameters. After testing i found values in cdhrd and cdpos. But i can not find the values which I have inserted. There is only the the key but i need the other data as well (the "new" values for every field - like in update or delete case).
Example:
MANDANT 010
OBJECTCLAS ZPTGSF_SCODE
OBJECTID ABCDEFGHI
CHANGENR 18487152
TABNAME ZPTGSF_SCODE
TABKEY ABCDEFGHI
FNAME KEY
CHNGIND I
TEXT CASE 1
UNIT OLD
UNIT NEW
CUKY OLD
CUKY NEW
VALUE NEW
VALUE OLD
But i need the real values and not only the key -
any idea?
Thanks in advance Stefan
‎2009 Dec 07 9:03 PM
Hi,
When you create a record the first time, i.e., for INSERTs, the CDHDR and CDPOS does not store all of the fields and it just stores the KEY fields so that the records can be read from the database. So you now have record and key to the record.
Now afterwards for update, it will store the fields changed with old and new value so that you know the history of the change. You can see the record and find out what has been changed, when it has been changed and who changed it.
Hope this helps.
Regards
Prasenjit
‎2009 Dec 07 7:17 PM
Hi Stefan,
this is due to the change records concept: If you INSERT a record into database, CDHDR/CDPOS record when you inserted what key data. Until changed, the other fields data (attributes) are present in the table itself, this is where you can read them.
The old/new data are provided for all fields as soon as you change the contents - the key is never changed.
Regards,
Clemens
‎2009 Dec 07 9:03 PM
Hi,
When you create a record the first time, i.e., for INSERTs, the CDHDR and CDPOS does not store all of the fields and it just stores the KEY fields so that the records can be read from the database. So you now have record and key to the record.
Now afterwards for update, it will store the fields changed with old and new value so that you know the history of the change. You can see the record and find out what has been changed, when it has been changed and who changed it.
Hope this helps.
Regards
Prasenjit