<?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 Updating CDHDR table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-cdhdr-table/m-p/3749830#M902163</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Z table  of which I change the primary key values though a Z program. The object id field in CDHDR table is a combination of the key fields in my Z table. I have made some changes to the values of these key fields in this Z table.But I dont see the same reflected in CDHDR. I have created change document for Z table through SCDO transaction and generated a function module too. But I am not sure where to insert this function module and how to go further so that I can find the value in CDHDR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please assist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Vineeta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Apr 2008 04:48:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-29T04:48:12Z</dc:date>
    <item>
      <title>Updating CDHDR table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-cdhdr-table/m-p/3749830#M902163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Z table  of which I change the primary key values though a Z program. The object id field in CDHDR table is a combination of the key fields in my Z table. I have made some changes to the values of these key fields in this Z table.But I dont see the same reflected in CDHDR. I have created change document for Z table through SCDO transaction and generated a function module too. But I am not sure where to insert this function module and how to go further so that I can find the value in CDHDR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please assist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Vineeta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 04:48:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-cdhdr-table/m-p/3749830#M902163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-29T04:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Updating CDHDR table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-cdhdr-table/m-p/3749831#M902164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following function module is used to extract values from the CDHDR table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*---------------------------------------------------------------------*
*             Form  GET_CHANGEDOCUMENT_HEADER
*---------------------------------------------------------------------*
*              Description :
*                            Get Change Document Header data
*---------------------------------------------------------------------*
*             --&amp;gt;P_I_T_CDHDR       Change Document Header
*             --&amp;gt;P_I_S_VBAK_VBELN  Order
*---------------------------------------------------------------------*

form get_changedocument.

* Get Change Document Header data
  clear g_objectclass.
  g_objectclass = c_verkbeleg.          " OBJECT CLASS: 'VERKBELEG'
  g_objectid    = is_vbak_vbap-vbeln.   " OBJECTID    : current Sales Order

  call function 'CHANGEDOCUMENT_READ'
    exporting
      objectclass                = g_objectclass
      objectid                   = g_objectid
    tables
      editpos                    = i_cdpos
    exceptions
      no_position_found          = 1
      wrong_access_to_archive    = 2
      time_zone_conversion_error = 3
      others                     = 4.
* If records are returned from CDHDR
  if sy-subrc eq 0.
* Sort by latest change number
    sort i_cdpos by changenr descending.
  endif.

endform.                    " GET_CHANGEDOCUMENT_HEADER&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I really don't think that the table registers changes done to any Z object. Try this anyways.&lt;/P&gt;&lt;P&gt;Reward if useful,&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 05:05:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-cdhdr-table/m-p/3749831#M902164</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-29T05:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Updating CDHDR table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-cdhdr-table/m-p/3749832#M902165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vineeta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To update CDHDR table with a Z field, locate the data element of that Z field in table. In data element there is a flag called 'Change Document', tick the flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now whenever you are changing value of that Z field, it will reflect in CDHDR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Krishnendu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 05:24:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-cdhdr-table/m-p/3749832#M902165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-29T05:24:01Z</dc:date>
    </item>
  </channel>
</rss>

