<?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: problems with READ STATEMENT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675184#M297853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just say&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_ekko occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this should solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prince&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Oct 2006 22:14:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-31T22:14:52Z</dc:date>
    <item>
      <title>problems with READ STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675181#M297850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ABAPers, &lt;/P&gt;&lt;P&gt;I have this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT ebeln bukrs&lt;/P&gt;&lt;P&gt;  FROM ekko&lt;/P&gt;&lt;P&gt;  INTO TABLE it_ekko&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN idata&lt;/P&gt;&lt;P&gt;  WHERE ebeln = idata-vbeln_p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT idata WHERE ebeln IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    READ TABLE it_ekko WITH KEY ebeln = idata-ebeln&lt;/P&gt;&lt;P&gt;                                bukrs = idata-bukrs_r.&lt;/P&gt;&lt;P&gt;    MODIFY idata.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting this error:&lt;/P&gt;&lt;P&gt;The internal table IT_EKKO has no header line - explicit specification of an output area with INOT wa or ASSIGNING &amp;lt;fs&amp;gt; is required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see what I'm doing wrong. Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ol Pom.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 21:52:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675181#M297850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T21:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: problems with READ STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675182#M297851</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;The internal table it_ekko is declared with out header line..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this...You have a declare a work area and use INTO addition for the READ TABLE IT_EKKO..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: WA LIKE LINE OF it_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT idata WHERE ebeln IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;READ TABLE it_ekko &amp;lt;b&amp;gt;INTO WA&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;           WITH KEY ebeln = idata-ebeln&lt;/P&gt;&lt;P&gt;bukrs = idata-bukrs_r.&lt;/P&gt;&lt;P&gt;MODIFY idata.&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 21:56:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675182#M297851</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T21:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: problems with READ STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675183#M297852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do I have to do a MOVE statement after I added the WA?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 21:58:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675183#M297852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T21:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: problems with READ STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675184#M297853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just say&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_ekko occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this should solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prince&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 22:14:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675184#M297853</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T22:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: problems with READ STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675185#M297854</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;Once you do "READ TABLE it_ekko INTO WA" that record that matches the key will be stored in WA..You don't have to write specific move statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that what you are asking??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 22:47:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675185#M297854</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T22:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: problems with READ STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675186#M297855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Naren, Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 22:51:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675186#M297855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T22:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: problems with READ STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675187#M297856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;others have pointed out why you are getting the syntax error.but why are you doing the read anyway? You are not referring to the data after the read and are immediately doing a modify. &amp;lt;b&amp;gt;This loop is not actually doing anything.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT idata WHERE ebeln IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;READ TABLE it_ekko into wa WITH KEY ebeln = idata-ebeln&lt;/P&gt;&lt;P&gt;bukrs = idata-bukrs_r.&lt;/P&gt;&lt;P&gt;MODIFY idata.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 22:52:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675187#M297856</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-10-31T22:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: problems with READ STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675188#M297857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neil, How can I fix this problem then?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 22:56:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675188#M297857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T22:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: problems with READ STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675189#M297858</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;Looks like you want to update ebeln and bukrs in the internal table idata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ebeln bukrs&lt;/P&gt;&lt;P&gt;FROM ekko&lt;/P&gt;&lt;P&gt;INTO TABLE it_ekko&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN idata&lt;/P&gt;&lt;P&gt;WHERE ebeln = idata-vbeln_p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: V_TABIX TYPE SYTABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT idata WHERE ebeln IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE it_ekko into wa &lt;/P&gt;&lt;P&gt;     WITH KEY ebeln = idata-vbeln_p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  idata-ebeln = wa-ebeln.&lt;/P&gt;&lt;P&gt;  idata-bukrs_r = wa-bukrs.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  MODIFY idata index v_tabix&lt;/P&gt;&lt;P&gt;         transporting ebeln bukrs_r.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 23:33:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675189#M297858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T23:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: problems with READ STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675190#M297859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ol Pom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  What Neil was pointing to is highlighted below. Please check the same to have some understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;b&amp;gt;Current Logic&amp;lt;/b&amp;gt;:
SELECT ebeln bukrs
   FROM ekko
   INTO TABLE it_ekko
   FOR ALL ENTRIES IN idata
   WHERE ebeln = idata-vbeln_p.

LOOP AT idata WHERE ebeln IS NOT INITIAL.
     READ TABLE it_ekko WITH KEY ebeln = idata-ebeln
     bukrs = idata-bukrs_r. 
     MODIFY idata.
ENDLOOP.
--&amp;gt; Nowhere between the loop and end, any data of 
internal table &amp;lt;b&amp;gt;idata&amp;lt;/b&amp;gt; is modified, hence the 
statement MODIFY IDATA doesnt make any modifications.

For avoiding the syntax error, declare a work area of 
type IT_EKKO or declare IT_EKKO with header line.

Options to do the same:
data: wa_ekko like it_ekko.
&amp;lt;b&amp;gt;OR&amp;lt;/b&amp;gt;
data: begin of it_ekko &amp;lt;b&amp;gt;occurs 0&amp;lt;/b&amp;gt;,
       ...
      end of it_ekko.

Above will rectify the syntax error.

Please see that your code resembles something like below:
data: wa_ekko like it_ekko.
IF NOT it_ekko[] is INITIAL.
   SELECT ebeln bukrs
     FROM ekko
     INTO TABLE it_ekko
     FOR ALL ENTRIES IN idata
     WHERE ebeln = idata-vbeln_p.
ENDIF.

LOOP AT idata WHERE ebeln IS NOT INITIAL.
     READ TABLE it_ekko into it_ekko 
          WITH KEY ebeln = idata-ebeln
                   bukrs = idata-bukrs_r. 
     check sy-subrc eq 0.
*     ... change contents of idata w.r.t it_ekko.
     MODIFY idata.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 01:11:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675190#M297859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-01T01:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: problems with READ STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675191#M297860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ol,&lt;/P&gt;&lt;P&gt;please tell us what it is you want to do with the internal table and we will be able to advise you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 02:52:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-read-statement/m-p/1675191#M297860</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-11-01T02:52:48Z</dc:date>
    </item>
  </channel>
</rss>

