<?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: Regarding Change document read in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-change-document-read/m-p/3453401#M829704</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Feb 2008 13:29:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-20T13:29:28Z</dc:date>
    <item>
      <title>Regarding Change document read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-change-document-read/m-p/3453397#M829700</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;Am using Change Document read function module to find out the changed material details. i want to fetch the plant from marc to filter the records am having the only relationship i.e material to fetch the details from marc and mara,with this i can't filter because for one material four plants will be there.so am using the tabkey from that function module to fetch the plant i don't think is this a right way can anyone explain how i can get a plant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 05:38:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-change-document-read/m-p/3453397#M829700</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T05:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Change document read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-change-document-read/m-p/3453398#M829701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out how the data for change documents is stored - I browsed tables CDHDR and CDPOS for Change Document Object "MATERIAL" and it seems that in CDPOS the entries for changes to MARC are stored with a "Table Key" value made up of the Client, Material Number, and Plant.  So this should show you which plants the details were changed for.  I believe the change document read function module returns the data from these tables, and should therefore have this level of detail available. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 05:56:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-change-document-read/m-p/3453398#M829701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T05:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Change document read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-change-document-read/m-p/3453399#M829702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this FM for fetch the Change document read CHANGEDOCU_CDPOS_READ and pass arguments accordingly ,  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       Objectid    - Guid &lt;/P&gt;&lt;P&gt;       Tabname  - Marc&lt;/P&gt;&lt;P&gt;       Fname     - Plant &lt;/P&gt;&lt;P&gt;&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;Kumaresan P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 12:06:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-change-document-read/m-p/3453399#M829702</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T12:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Change document read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-change-document-read/m-p/3453400#M829703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Think you query is misleading...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my understanding you are trying to find all changes for materials in a specific plant right????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so below code can give you some idea:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: mara.

SELECT-OPTIONS: so_date FOR mara-laeda. " Date Criteria
PARAMETERS: p_werks TYPE werks_d obligatory. " Plant

CONSTANTS: c_tcode TYPE sytcode VALUE 'MM02'.

TYPES: BEGIN OF ty_marc,
         matnr TYPE matnr,
         werks TYPE werks_d,
       END OF ty_marc.

DATA: i_cdocs TYPE STANDARD TABLE OF cdred,  " Change Docs
      wa_cdocs TYPE cdred,
      i_marc TYPE STANDARD TABLE OF ty_marc, " Plant Existence
      wa_marc TYPE ty_marc.

START-OF-SELECTION.

" Read Change documents
  CALL FUNCTION 'CHANGEDOCUMENT_READ'
    EXPORTING
      date_of_change             = so_date-low
      objectclass                = 'MATERIAL'
      date_until                 = so_date-high
    TABLES
      editpos                    = i_cdocs
    EXCEPTIONS
      no_position_found          = 1
      wrong_access_to_archive    = 2
      time_zone_conversion_error = 3
      OTHERS                     = 4.

" Delete documents where materials are not changed
  DELETE i_cdocs WHERE tcode NE c_tcode.

  CHECK NOT i_cdocs[] IS INITIAL.

* Check for Material existence in Plant
  SELECT matnr werks INTO TABLE i_marc
         FROM marc
         FOR ALL ENTRIES IN i_cdocs
         WHERE matnr = i_cdocs-objectid(18)
         AND   werks = p_werks.


  LOOP AT i_cdocs INTO wa_cdocs.

    READ TABLE i_marc INTO wa_marc
       WITH KEY matnr = wa_cdocs-objectid.
    IF sy-subrc EQ 0.  " Material Defined in specified plant
      " Further Processing statements
    ENDIF.

  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct me if my understanding is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 02:34:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-change-document-read/m-p/3453400#M829703</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T02:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Change document read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-change-document-read/m-p/3453401#M829704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 13:29:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-change-document-read/m-p/3453401#M829704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T13:29:28Z</dc:date>
    </item>
  </channel>
</rss>

