<?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: Creating change document for INSERT operation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-change-document-for-insert-operation/m-p/8254622#M1631492</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eduardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for replying. I'm using the default table work areas generated by the system. They are *ZSCARR_CUSTOM for old values (previous data) and ZSCARR_CUSTOM for new values (post data). Below is the data definitions generated by the system in the F........CDV include program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* declaration for the long text
DATA: BEGIN OF ICDTXT_Z_121_17 OCCURS 20.
        INCLUDE STRUCTURE CDTXT.
DATA: END OF ICDTXT_Z_121_17.
DATA: UPD_ICDTXT_Z_121_17 TYPE C.

* workaera_old of ZSCARR_CUSTOM
TABLES: *ZSCARR_CUSTOM
* workaera_new of ZSCARR_CUSTOM
       , ZSCARR_CUSTOM.
DATA: UPD_ZSCARR_CUSTOM TYPE C.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, since I didn't put any value to the *ZSCARR_CUSTOM, did it mean that my program in my first post is correct for creating change document of INSERT operation?&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;Haris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Oct 2011 14:11:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-10-26T14:11:45Z</dc:date>
    <item>
      <title>Creating change document for INSERT operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-change-document-for-insert-operation/m-p/8254620#M1631490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using change document object for documenting database INSERT operation, do I have to specify the old values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a change document object &lt;EM&gt;Z_121_17&lt;/EM&gt; for table &lt;EM&gt;ZSCARR_CUSTOM&lt;/EM&gt;. After generating the change document object, I receive a function module and several include programs with table work areas for old values &lt;EM&gt;(*ZSCARR_CUSTOM)&lt;/EM&gt; and new values &lt;EM&gt;(ZSCARR_CUSTOM)&lt;/EM&gt;. Below is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
INCLUDE fz_121_17_includecdt.
INCLUDE fz_121_17_includecdc.

DATA:
  carrid TYPE zscarr_custom-carrid VALUE 'ZZ'.

START-OF-SELECTION.

  "INSERT
  "Define new values
zscarr_custom-carrid = 'ZZ'.
zscarr_custom-carrname = sy-uzeit.

  "Define general document data
CONCATENATE carrid sy-datum sy-uzeit INTO objectid.

  "Define document header
tcode = 'Z_121_17'.
utime = sy-uzeit.
udate = sy-datum.
username = sy-uname.
upd_zscarr_custom = 'I'.

  "Perform database operation
INSERT into zscarr_custom values zscarr_custom.

  "Create change document
PERFORM cd_call_z_121_17.

COMMIT WORK.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is my program above correct for documenting INSERT operation? I mean, is there any variable that I didn't specify or I specified incorrectly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&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;Haris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2011 10:50:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-change-document-for-insert-operation/m-p/8254620#M1631490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-26T10:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating change document for INSERT operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-change-document-for-insert-operation/m-p/8254621#M1631491</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;If you do an insert operation, your previous values, I think that you have in table Y* is empty. You only have values in table X*. If you want know what these values are, see the table (tcode SE16). I remeber that the log tells you who, when and so on the record was created. I think that you have a XZSCARR_CUSTOM and a YZSCARR_CUSTOM for post and previous data. These structures have a field called UPD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if it could help you&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;Eduardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2011 11:53:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-change-document-for-insert-operation/m-p/8254621#M1631491</guid>
      <dc:creator>eduardo_hinojosa</dc:creator>
      <dc:date>2011-10-26T11:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating change document for INSERT operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-change-document-for-insert-operation/m-p/8254622#M1631492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eduardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for replying. I'm using the default table work areas generated by the system. They are *ZSCARR_CUSTOM for old values (previous data) and ZSCARR_CUSTOM for new values (post data). Below is the data definitions generated by the system in the F........CDV include program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* declaration for the long text
DATA: BEGIN OF ICDTXT_Z_121_17 OCCURS 20.
        INCLUDE STRUCTURE CDTXT.
DATA: END OF ICDTXT_Z_121_17.
DATA: UPD_ICDTXT_Z_121_17 TYPE C.

* workaera_old of ZSCARR_CUSTOM
TABLES: *ZSCARR_CUSTOM
* workaera_new of ZSCARR_CUSTOM
       , ZSCARR_CUSTOM.
DATA: UPD_ZSCARR_CUSTOM TYPE C.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, since I didn't put any value to the *ZSCARR_CUSTOM, did it mean that my program in my first post is correct for creating change document of INSERT operation?&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;Haris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2011 14:11:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-change-document-for-insert-operation/m-p/8254622#M1631492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-26T14:11:45Z</dc:date>
    </item>
  </channel>
</rss>

