<?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 Change Log for Custom Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727391#M34120</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I want to capture change log for a custom table.&lt;/P&gt;
  &lt;P&gt;I am aware 2 options are availble for this&lt;/P&gt;
  &lt;P&gt;First one is:&lt;/P&gt;
  &lt;P&gt;Setting REC/CLINET parameter and checking in SCU3 but we don't want to check this as its causing performance issues.&lt;/P&gt;
  &lt;P&gt;Second one is:&lt;/P&gt;
  &lt;P&gt;Check data element change log and configure table in SCDO.&lt;/P&gt;
  &lt;P&gt;Here i have multiple questions?&lt;/P&gt;
  &lt;P&gt;1. Is the configuration is sufficient to update CDPOS and CDHDR or do i need to write a program by providing old values, new values.. to the generated Function Module?&lt;/P&gt;
  &lt;P&gt;2. Each time i am executing a new CDPOS and new CDHDR records are generating but i am not able to get new and old values in cdpos, i don't understand what i am missing.&lt;/P&gt;
  &lt;P&gt;irrespective of whether i pass 'I' or 'U' for few parameters in the generated Function module, it updating new record&lt;/P&gt;
  &lt;P&gt;Below is the code i wrote:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt; SELECT SINGLE * FROM ZTMM_TEST
     INTO WA_OLDVALUES
    WHERE TEST_ID = P_FCAST
      AND ARTICLE_VAR = P_ARTICL
      AND ERD         = P_ERD.
 IF SY-SUBRC EQ 0.
   CLEAR WA_NEWVALUES.
   WA_NEWVALUES = WA_OLDVALUES.
   wa_newvalues-ARTICLE_COST = '96'.


   modify ZTMM_TEST from WA_NEWVALUES.


DATA:
 lv_TEILOBJID TYPE  CDTABKEY.
  concatenate SY-MANDT WA_OLDVALUES-TEST_ID WA_OLDVALUES-ARTICLE_VAR WA_OLDVALUES-ERD INTO lv_TEILOBJID.
   wa_cdtxt-TEILOBJID = lv_TEILOBJID. 
   wa_cdtxt-TEXTART   = 'KEY'. 
   wa_cdtxt-TEXTSPR   = 'EN'.
   wa_cdtxt-UPDKZ     = 'U'.
   APPEND wa_cdtxt to it_cdtxt.
   clear wa_cdtxt.
   CLEAR lv_TEILOBJID.
 ENDIF.




CALL FUNCTION 'ZMM_TEST_CD_WRITE_DOCUMENT'
  EXPORTING
    objectid                         = 'ZMM_TEST_CD'
    tcode                            = sy-tcode 
    utime                            = sy-uzeit 
    udate                            = sy-datum 
    username                         = sy-uname 
   PLANNED_CHANGE_NUMBER            = ' '
   OBJECT_CHANGE_INDICATOR          = 'I' 
*   PLANNED_OR_REAL_CHANGES          = ' ' 
*   NO_CHANGE_POINTERS               = ' ' 
   UPD_ICDTXT_ZMM_FORECAST_CD       = 'I' 
    N_ZTMM_TEST                  = WA_NEWVALUES
    O_ZTMM_TEST                  = WA_OLDVALUES
   UPD_ZTMM_TEST                = 'I' 
   LV_OPT                           = ' ' 
  TABLES
    icdtxt_zmm_TEST_cd           = IT_CDTXT


          .
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 04 Dec 2018 20:59:43 GMT</pubDate>
    <dc:creator>satya_p5</dc:creator>
    <dc:date>2018-12-04T20:59:43Z</dc:date>
    <item>
      <title>Change Log for Custom Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727391#M34120</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I want to capture change log for a custom table.&lt;/P&gt;
  &lt;P&gt;I am aware 2 options are availble for this&lt;/P&gt;
  &lt;P&gt;First one is:&lt;/P&gt;
  &lt;P&gt;Setting REC/CLINET parameter and checking in SCU3 but we don't want to check this as its causing performance issues.&lt;/P&gt;
  &lt;P&gt;Second one is:&lt;/P&gt;
  &lt;P&gt;Check data element change log and configure table in SCDO.&lt;/P&gt;
  &lt;P&gt;Here i have multiple questions?&lt;/P&gt;
  &lt;P&gt;1. Is the configuration is sufficient to update CDPOS and CDHDR or do i need to write a program by providing old values, new values.. to the generated Function Module?&lt;/P&gt;
  &lt;P&gt;2. Each time i am executing a new CDPOS and new CDHDR records are generating but i am not able to get new and old values in cdpos, i don't understand what i am missing.&lt;/P&gt;
  &lt;P&gt;irrespective of whether i pass 'I' or 'U' for few parameters in the generated Function module, it updating new record&lt;/P&gt;
  &lt;P&gt;Below is the code i wrote:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt; SELECT SINGLE * FROM ZTMM_TEST
     INTO WA_OLDVALUES
    WHERE TEST_ID = P_FCAST
      AND ARTICLE_VAR = P_ARTICL
      AND ERD         = P_ERD.
 IF SY-SUBRC EQ 0.
   CLEAR WA_NEWVALUES.
   WA_NEWVALUES = WA_OLDVALUES.
   wa_newvalues-ARTICLE_COST = '96'.


   modify ZTMM_TEST from WA_NEWVALUES.


DATA:
 lv_TEILOBJID TYPE  CDTABKEY.
  concatenate SY-MANDT WA_OLDVALUES-TEST_ID WA_OLDVALUES-ARTICLE_VAR WA_OLDVALUES-ERD INTO lv_TEILOBJID.
   wa_cdtxt-TEILOBJID = lv_TEILOBJID. 
   wa_cdtxt-TEXTART   = 'KEY'. 
   wa_cdtxt-TEXTSPR   = 'EN'.
   wa_cdtxt-UPDKZ     = 'U'.
   APPEND wa_cdtxt to it_cdtxt.
   clear wa_cdtxt.
   CLEAR lv_TEILOBJID.
 ENDIF.




CALL FUNCTION 'ZMM_TEST_CD_WRITE_DOCUMENT'
  EXPORTING
    objectid                         = 'ZMM_TEST_CD'
    tcode                            = sy-tcode 
    utime                            = sy-uzeit 
    udate                            = sy-datum 
    username                         = sy-uname 
   PLANNED_CHANGE_NUMBER            = ' '
   OBJECT_CHANGE_INDICATOR          = 'I' 
*   PLANNED_OR_REAL_CHANGES          = ' ' 
*   NO_CHANGE_POINTERS               = ' ' 
   UPD_ICDTXT_ZMM_FORECAST_CD       = 'I' 
    N_ZTMM_TEST                  = WA_NEWVALUES
    O_ZTMM_TEST                  = WA_OLDVALUES
   UPD_ZTMM_TEST                = 'I' 
   LV_OPT                           = ' ' 
  TABLES
    icdtxt_zmm_TEST_cd           = IT_CDTXT


          .
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Dec 2018 20:59:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727391#M34120</guid>
      <dc:creator>satya_p5</dc:creator>
      <dc:date>2018-12-04T20:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Change Log for Custom Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727392#M34121</link>
      <description>&lt;P&gt;I think you tried to update old record then it should be 'U' in your parameter...below wiki have detail of the setting, you may cross check with yours:&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.scn.sap.com/wiki/display/ABAP/ABAP+-+Data+Change+Tracker+for+Custom+Tables" target="test_blank"&gt;https://wiki.scn.sap.com/wiki/display/ABAP/ABAP+-+Data+Change+Tracker+for+Custom+Tables&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 00:11:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727392#M34121</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2018-12-05T00:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Change Log for Custom Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727393#M34122</link>
      <description>&lt;P&gt;The parameter OBJECTID should hold the table key as in the table ZTMM_TEST. Now it holds the value 'ZMM_TEST_CD'.&lt;/P&gt;&lt;P&gt;Regards Jack &lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 05:30:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727393#M34122</guid>
      <dc:creator>JackGraus</dc:creator>
      <dc:date>2018-12-05T05:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Change Log for Custom Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727394#M34123</link>
      <description>&lt;P&gt;Hi Satya,&lt;/P&gt;&lt;P&gt;could you please elaborate a bit on this statement and where/when you notice performance issues?&lt;/P&gt;&lt;P&gt;"&lt;EM&gt;Setting REC/CLINET parameter and checking in SCU3 but we don't want to check this as its causing performance issues.&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;We often set the flag to track changes for custom tables and aren't aware of this causing performance issues. We are on NW750, EHP8 with HANA-DB.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 07:32:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727394#M34123</guid>
      <dc:creator>BaerbelWinkler</dc:creator>
      <dc:date>2018-12-05T07:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Change Log for Custom Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727395#M34124</link>
      <description>&lt;P&gt;What kind of table it is? is it master or transaction? Secondly if you are planning to use data element level change logs via SCDO then you will need to code for it, google it for more detail.&lt;/P&gt;&lt;P&gt;Nabheet&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 12:11:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727395#M34124</guid>
      <dc:creator>nabheetscn</dc:creator>
      <dc:date>2018-12-05T12:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Change Log for Custom Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727396#M34125</link>
      <description>&lt;P&gt;Hi Jack,&lt;/P&gt;&lt;P&gt;Whatever the value i am passing as OBJECTID, the same value is appearing in CDPOS-OBJECTID, &lt;/P&gt;&lt;P&gt;and already tried by providing table key but its not working.&lt;/P&gt;&lt;P&gt;I referred many links in google in many links they are passing Object created in SCDO only as Objectid.&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.scn.sap.com/wiki/display/ABAP/ABAP+-+Data+Change+Tracker+for+Custom+Tables" target="test_blank"&gt;https://wiki.scn.sap.com/wiki/display/ABAP/ABAP+-+Data+Change+Tracker+for+Custom+Tables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am not getting Table name, field name, new value and old values in CDPOS,&lt;/P&gt;&lt;P&gt;in TABNAME i am getting ObjectID&lt;/P&gt;&lt;P&gt;in FNAME its coming from whatever i passed in CDTXT-textart, this field also has length of 4 characters&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 18:31:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727396#M34125</guid>
      <dc:creator>satya_p5</dc:creator>
      <dc:date>2018-12-05T18:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Change Log for Custom Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727397#M34126</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;satya.p5&lt;/SPAN&gt; : from your referred link, i saw they dont modify table before call function module, pls cross check if there is any difference between your code and wiki code.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 00:50:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-log-for-custom-table/m-p/727397#M34126</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2018-12-06T00:50:20Z</dc:date>
    </item>
  </channel>
</rss>

