<?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 Problem with data handling and retrieval in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-handling-and-retrieval/m-p/3659964#M881574</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have  problem with my data...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table i_crhd, i_mseg and i_afko...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get from i_mseg the data where matnr = i_afko-matnr &lt;/P&gt;&lt;P&gt;and bwart = 102 and 101 for every i_crhd-arbpl and i_afko-plnbez...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After gathering all these data... I need to sum up i_mseg-menge where bwart is 102 and sum up i_mseg-menge where bwart is 101...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then, subtract the summation of i_mseg-menge where bwart is 102 from summation of i_mseg-menge where bwart is 101...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Apr 2008 02:03:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-14T02:03:58Z</dc:date>
    <item>
      <title>Problem with data handling and retrieval</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-handling-and-retrieval/m-p/3659964#M881574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have  problem with my data...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table i_crhd, i_mseg and i_afko...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get from i_mseg the data where matnr = i_afko-matnr &lt;/P&gt;&lt;P&gt;and bwart = 102 and 101 for every i_crhd-arbpl and i_afko-plnbez...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After gathering all these data... I need to sum up i_mseg-menge where bwart is 102 and sum up i_mseg-menge where bwart is 101...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then, subtract the summation of i_mseg-menge where bwart is 102 from summation of i_mseg-menge where bwart is 101...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 02:03:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-handling-and-retrieval/m-p/3659964#M881574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T02:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data handling and retrieval</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-handling-and-retrieval/m-p/3659965#M881575</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;You can maybe try the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: i_mseg LIKE mseg OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      i_crhd LIKE crhd OCCURS 0,&lt;/P&gt;&lt;P&gt;      i_afko LIKE afko OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: l_sum_101 LIKE mseg-menge,&lt;/P&gt;&lt;P&gt;      l_sum_102 LIKE mseg-menge,&lt;/P&gt;&lt;P&gt;      l_total   LIKE mseg-menge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RANGES: r_bawrt FOR mseg-bwart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND: 'IEQ101'TO r_bawrt,&lt;/P&gt;&lt;P&gt;        'IEQ102'TO r_bawrt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM afko INTO TABLE i_afko.&lt;/P&gt;&lt;P&gt;SELECT * FROM crhd INTO TABLE i_crhd.&lt;/P&gt;&lt;P&gt;SELECT * FROM mseg INTO TABLE i_mseg&lt;/P&gt;&lt;P&gt;         FOR ALL ENTRIES IN i_afko&lt;/P&gt;&lt;P&gt;         WHERE matnr = i_afko-plnbez&lt;/P&gt;&lt;P&gt;           AND bwart IN r_bawrt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: l_sum_101, l_sum_102, l_total.&lt;/P&gt;&lt;P&gt;LOOP AT i_mseg.&lt;/P&gt;&lt;P&gt;  CASE i_mseg-bwart.&lt;/P&gt;&lt;P&gt;    WHEN '101'.&lt;/P&gt;&lt;P&gt;      l_sum_101 = l_sum_101 + i_mseg-menge.&lt;/P&gt;&lt;P&gt;    WHEN '102'.&lt;/P&gt;&lt;P&gt;      l_sum_102 = l_sum_102 + i_mseg-menge.&lt;/P&gt;&lt;P&gt;    WHEN OTHERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_total = l_sum_102 - l_sum_101.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 10:02:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-handling-and-retrieval/m-p/3659965#M881575</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T10:02:49Z</dc:date>
    </item>
  </channel>
</rss>

