<?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: LOOP and Read statements in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read-statements/m-p/2972987#M701700</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi satish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both the statements results the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic difference is u r looping at different tables.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the first loop, u r selecting the Material Description based on Purchase Order Material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second Loop, u r selecting the PO based on if its Material description is available or not...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically both loop statements results in same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward me if useful..........&lt;/P&gt;&lt;P&gt;Harimanjesh AN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 04 Nov 2007 05:42:19 GMT</pubDate>
    <dc:creator>harimanjesh_an</dc:creator>
    <dc:date>2007-11-04T05:42:19Z</dc:date>
    <item>
      <title>LOOP and Read statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read-statements/m-p/2972985#M701698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi abapers,&lt;/P&gt;&lt;P&gt;                    I want to know the difference between statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR MAKTX FROM MAKT INTO TABLE IT_MAKT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT EBELN EBELP ... ..... ..... FROM EKPO INTO IT_EKPO WHERE MATNR = IT_MAKT-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_MAKT INTO WA_MAKT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IT_EKPO INTO WA_EKPO WITH KEY MATNR = IT_MAKT-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2ND Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_EKPO INTO WA_EKPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IT_MAKT INTO WA_MAKT WITH KEY MATNR  = IT_EKPO-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frnds , can anyone please help me to understand the exact difference between the above statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Nov 2007 04:48:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read-statements/m-p/2972985#M701698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-04T04:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: LOOP and Read statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read-statements/m-p/2972986#M701699</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;SELECT MATNR MAKTX FROM MAKT INTO TABLE IT_MAKT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;collects matnr and maktx form makt and stores in it_makt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT EBELN EBELP ... ..... ..... FROM EKPO INTO IT_EKPO WHERE MATNR = IT_MAKT-MATNR.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selects ebeln and ebelp from  ekpo and stores in it_ekpo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_MAKT INTO WA_MAKT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IT_EKPO INTO WA_EKPO WITH KEY MATNR = IT_MAKT-MATNR.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;looping at it_makt compares matnr from it_makt with it_ekpo. reads and stores in work area wa_makt with primary key as index&lt;/P&gt;&lt;P&gt;2ND Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_EKPO INTO WA_EKPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IT_MAKT INTO WA_MAKT WITH KEY MATNR = IT_EKPO-MATNR.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;looping at it_ekpo compares matnr from it_makt with it_ekpo . reads and stores in work area wa_ekpo with primary key as index&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>Sun, 04 Nov 2007 05:15:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read-statements/m-p/2972986#M701699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-04T05:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: LOOP and Read statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read-statements/m-p/2972987#M701700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi satish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both the statements results the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic difference is u r looping at different tables.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the first loop, u r selecting the Material Description based on Purchase Order Material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second Loop, u r selecting the PO based on if its Material description is available or not...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically both loop statements results in same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward me if useful..........&lt;/P&gt;&lt;P&gt;Harimanjesh AN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Nov 2007 05:42:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read-statements/m-p/2972987#M701700</guid>
      <dc:creator>harimanjesh_an</dc:creator>
      <dc:date>2007-11-04T05:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: LOOP and Read statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read-statements/m-p/2972988#M701701</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;    Both the statements will yield the same results.&lt;/P&gt;&lt;P&gt;I  think should be this way....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;LOOP AT IT_MAKT INTO WA_MAKT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IT_EKPO INTO WA_EKPO WITH KEY MATNR = wa_MAKT-MATNR.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;NOT&amp;lt;/u&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_MAKT INTO WA_MAKT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IT_EKPO INTO WA_EKPO WITH KEY MATNR = IT_MAKT-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly for the same other statement also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.You are looping the MAKT table into workarea&lt;/P&gt;&lt;P&gt;2. And the reading the EKPO table into workarea with the key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here both the statements infer same meaning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2007 07:34:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read-statements/m-p/2972988#M701701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-05T07:34:49Z</dc:date>
    </item>
  </channel>
</rss>

