<?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: Getting item data from cdhdr cdpos in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-item-data-from-cdhdr-cdpos/m-p/5580942#M1272728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this function module..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
    EXPORTING
      date_of_change                   = p_datefr
      objectclass                      = 'MATERIAL'
      date_until                       = p_dateto
      username                         = '*'
    TABLES
      i_cdhdr                          = i_cdhdr
    EXCEPTIONS
      no_position_found                = 1
      wrong_access_to_archive          = 2
      time_zone_conversion_error       = 3
      OTHERS                           = 4.

  LOOP AT i_cdhdr.
**For each change document header, read the corresponding change document line items
    refresh: editpos.
    CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
      EXPORTING
        changenumber                  = i_cdhdr-changenr
      TABLES
        editpos                       = editpos
      EXCEPTIONS
        no_position_found             = 1
        wrong_access_to_archive       = 2
        OTHERS                        = 3.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Prabhu Das on May 21, 2009 7:53 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2009 14:22:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-21T14:22:24Z</dc:date>
    <item>
      <title>Getting item data from cdhdr cdpos</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-item-data-from-cdhdr-cdpos/m-p/5580941#M1272727</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 am working on creating a report for changed documents for scheduling agreement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am reading tables cdhdr and cdpos for getting the changed doc data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get data for schedule Line number and Item number from CDPos or cdhdr ? as this needs to be displayed in the output as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it available in other tables ? or any FM  can be used?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shital.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 14:16:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-item-data-from-cdhdr-cdpos/m-p/5580941#M1272727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T14:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Getting item data from cdhdr cdpos</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-item-data-from-cdhdr-cdpos/m-p/5580942#M1272728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this function module..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
    EXPORTING
      date_of_change                   = p_datefr
      objectclass                      = 'MATERIAL'
      date_until                       = p_dateto
      username                         = '*'
    TABLES
      i_cdhdr                          = i_cdhdr
    EXCEPTIONS
      no_position_found                = 1
      wrong_access_to_archive          = 2
      time_zone_conversion_error       = 3
      OTHERS                           = 4.

  LOOP AT i_cdhdr.
**For each change document header, read the corresponding change document line items
    refresh: editpos.
    CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
      EXPORTING
        changenumber                  = i_cdhdr-changenr
      TABLES
        editpos                       = editpos
      EXCEPTIONS
        no_position_found             = 1
        wrong_access_to_archive       = 2
        OTHERS                        = 3.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Prabhu Das on May 21, 2009 7:53 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 14:22:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-item-data-from-cdhdr-cdpos/m-p/5580942#M1272728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T14:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Getting item data from cdhdr cdpos</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-item-data-from-cdhdr-cdpos/m-p/5580943#M1272729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please tell me which field in the editpos table will correspond to line item number and schedule line number?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Shital&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 14:27:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-item-data-from-cdhdr-cdpos/m-p/5580943#M1272729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T14:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Getting item data from cdhdr cdpos</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-item-data-from-cdhdr-cdpos/m-p/5580944#M1272730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check in you system where used list and see the sample code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is how it is going to use.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

SELECT SINGLE matnr maktx  INTO (w_matnr, w_maktx)
           FROM makt WHERE matnr = i_cdhdr-objectid AND      "header data 
                           spras = sy-langu.

**Loop thru all change document line items and filter out changes to the
**US material tax classification indicator
    LOOP AT editpos WHERE tabname = 'MARC' AND
                          tabkey = 'US UTXJ'.

            IF editpos-chngind = 'U'.
               w_text = 'Changes done'.
              read respective table and display.
  ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 14:35:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-item-data-from-cdhdr-cdpos/m-p/5580944#M1272730</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T14:35:05Z</dc:date>
    </item>
  </channel>
</rss>

