<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Writing ChangeDocuments for Insert in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-changedocuments-for-insert/m-p/6412054#M1408066</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The old/new data are provided for all  fields as soon as you change the contents - the key is never changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Dec 2009 19:17:30 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2009-12-07T19:17:30Z</dc:date>
    <item>
      <title>Writing ChangeDocuments for Insert</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-changedocuments-for-insert/m-p/6412053#M1408065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MANDANT          010                                                                                &lt;/P&gt;&lt;P&gt;OBJECTCLAS    ZPTGSF_SCODE                                                                            &lt;/P&gt;&lt;P&gt;OBJECTID         ABCDEFGHI                                                                                &lt;/P&gt;&lt;P&gt;CHANGENR      18487152                                                                                &lt;/P&gt;&lt;P&gt;TABNAME          ZPTGSF_SCODE                                                                            &lt;/P&gt;&lt;P&gt;TABKEY                                           ABCDEFGHI                                            &lt;/P&gt;&lt;P&gt;FNAME              KEY                                                                                &lt;/P&gt;&lt;P&gt;CHNGIND         I                                                                                &lt;/P&gt;&lt;P&gt;TEXT CASE     1                                                                                &lt;/P&gt;&lt;P&gt;UNIT OLD                                                                                &lt;/P&gt;&lt;P&gt;UNIT NEW                                                                                &lt;/P&gt;&lt;P&gt;CUKY OLD                                                                                &lt;/P&gt;&lt;P&gt;CUKY NEW                                                                                &lt;/P&gt;&lt;P&gt;VALUE NEW                                                                                &lt;/P&gt;&lt;P&gt;VALUE OLD                                           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i need the real values and not only the key - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any idea? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2009 17:04:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-changedocuments-for-insert/m-p/6412053#M1408065</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-07T17:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Writing ChangeDocuments for Insert</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-changedocuments-for-insert/m-p/6412054#M1408066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The old/new data are provided for all  fields as soon as you change the contents - the key is never changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2009 19:17:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-changedocuments-for-insert/m-p/6412054#M1408066</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2009-12-07T19:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Writing ChangeDocuments for Insert</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-changedocuments-for-insert/m-p/6412055#M1408067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prasenjit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2009 21:03:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-changedocuments-for-insert/m-p/6412055#M1408067</guid>
      <dc:creator>prasenjit_sharma</dc:creator>
      <dc:date>2009-12-07T21:03:52Z</dc:date>
    </item>
  </channel>
</rss>

