<?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: Error: it_data is not an internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567083#M2008196</link>
    <description>&lt;P&gt;Don't use OCCURS, it's an obsolete form because it can lead to obscure errors.&lt;/P&gt;</description>
    <pubDate>Sun, 06 Nov 2022 07:43:15 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2022-11-06T07:43:15Z</dc:date>
    <item>
      <title>Error: it_data is not an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567072#M2008185</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
  &lt;P&gt;My requirement is to create an internal table it_data and tried fetching data from VBAK, VBUK and VBKD. After fetching the data records Loop through it_data to run a BDC program which updates the Sale Orders.&lt;/P&gt;
  &lt;P&gt;I defined my code as below. But receiving an error it_data is not an internal table. &lt;/P&gt;
  &lt;P&gt;While debugging I could see select statement loading each record into it_data structure and skips at LOOP AT statement. I tried all the ways to define it as an internal table. But did not work.&lt;/P&gt;
  &lt;P&gt;Kindly help me in this regard.&lt;/P&gt;
  &lt;P&gt;DATA: BEGIN OF it_data OCCURS 0,&lt;/P&gt;
  &lt;P&gt;vbeln TYPE vbak-vbeln&lt;/P&gt;
  &lt;P&gt;..&lt;/P&gt;
  &lt;P&gt;END OF it_data.&lt;/P&gt;
  &lt;P&gt;.&lt;/P&gt;
  &lt;P&gt;.&lt;/P&gt;
  &lt;P&gt;SELECT a~vbeln v~bstkd v~bstdk......&lt;/P&gt;
  &lt;P&gt;FROM vbak AS a&lt;/P&gt;
  &lt;P&gt;INNER JOIN vbuk AS v ON a~vbeln = v~vbeln&lt;/P&gt;
  &lt;P&gt;INTO it_data.&lt;/P&gt;
  &lt;P&gt;IF it_data[] NOT INITIAL.&lt;/P&gt;
  &lt;P&gt; LOOP AT it_data.&lt;/P&gt;
  &lt;P&gt; REFRESH bdcdata.&lt;/P&gt;
  &lt;P&gt; PERFORM mapping.&lt;/P&gt;
  &lt;P&gt; CALL TRANSACTION 'VA02' USING bdcdata MODE 'A'.&lt;/P&gt;
  &lt;P&gt; ENDLOOP.&lt;/P&gt;
  &lt;P&gt; ENDIF.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 15:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567072#M2008185</guid>
      <dc:creator>former_member856029</dc:creator>
      <dc:date>2022-11-04T15:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error: it_data is not an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567073#M2008186</link>
      <description>&lt;P&gt;Data: it_data TYPE STANDARD TABLE OF...&lt;/P&gt;&lt;P&gt;Also &lt;/P&gt;&lt;P&gt;SELECT a~vbeln v~bstkd v~bstdk......&lt;/P&gt;&lt;P&gt;FROM vbak AS a&lt;/P&gt;&lt;P&gt;INNER JOIN vbuk AS v ON a~vbeln = v~vbeln&lt;/P&gt;&lt;P&gt;INTO TABLE it_data.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 16:36:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567073#M2008186</guid>
      <dc:creator>Eduardo-CE</dc:creator>
      <dc:date>2022-11-04T16:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error: it_data is not an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567074#M2008187</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;I tried as you mentioned. Still I am getting the same error at &lt;STRONG&gt;INTO TABLE it_data.&lt;/STRONG&gt; that &lt;STRONG&gt;"IT_DATA is not an internal table."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I am still confused why IT_DATA is not getting considered as an internal table.&lt;/P&gt;&lt;P&gt;When I define as &lt;STRONG&gt;DATA: BEGIN OF it_data OCCURS 0,.....&lt;/STRONG&gt; I am not getting error but, While debugging I could see that select statement loading each record into it_data structure and skips at &lt;STRONG&gt;LOOP AT it_data.&lt;/STRONG&gt; statement. &lt;/P&gt;&lt;P&gt;Kindly help in this regard. &lt;/P&gt;&lt;P&gt;Thank you much in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 17:04:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567074#M2008187</guid>
      <dc:creator>former_member856029</dc:creator>
      <dc:date>2022-11-04T17:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error: it_data is not an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567075#M2008188</link>
      <description>&lt;P&gt;"DATA: BEGIN OF it_data OCCURS 0," is obsolete because it's prone to the error you are experiencing.&lt;/P&gt;&lt;P&gt;"BEGIN OF" and "OCCURS" declares an internal table + a header line. Header lines are obsolete because they are prone to errors. To distinguish the internal table, it's sometimes required to write it using square brackets (see below), otherwise "itab" without square brackets will be considered as being the header line.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;itab[]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The right way to declare internal tables is by using TYPE ... TABLE OF ... There are many forms.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 17:36:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567075#M2008188</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-11-04T17:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error: it_data is not an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567076#M2008189</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Are you using?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT...ENDSELECT. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Could you please paste the entire code?&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 17:47:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567076#M2008189</guid>
      <dc:creator>Eduardo-CE</dc:creator>
      <dc:date>2022-11-04T17:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error: it_data is not an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567077#M2008190</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please suggest how this issue can be resolved. Could you share a sample program to read data from multiple standard tables and writing the internal table data using Loop statement.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank you once again.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 17:50:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567077#M2008190</guid>
      <dc:creator>former_member856029</dc:creator>
      <dc:date>2022-11-04T17:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Error: it_data is not an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567078#M2008191</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Then theres no need for an internal table, you need a work area, for example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  TYPES: BEGIN OF ty_data,&lt;BR /&gt;           vbeln TYPE vbak-vbeln,&lt;BR /&gt;           rfstk TYPE vbuk-rfstk,&lt;BR /&gt;         END OF ty_data.&lt;BR /&gt;&lt;BR /&gt;  DATA: lw_data TYPE ty_data.&lt;BR /&gt;&lt;BR /&gt;  SELECT&lt;BR /&gt;    a~vbeln&lt;BR /&gt;    u~rfstk&lt;BR /&gt;    INTO lw_data&lt;BR /&gt;    FROM vbak AS a&lt;BR /&gt;      INNER JOIN vbuk AS u&lt;BR /&gt;      ON a~vbeln = u~vbeln.&lt;BR /&gt;&lt;BR /&gt;    WRITE: lw_data-vbeln,&lt;BR /&gt;           lw_data-rfstk.&lt;BR /&gt;&lt;BR /&gt;  ENDSELECT.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Nov 2022 17:59:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567078#M2008191</guid>
      <dc:creator>Eduardo-CE</dc:creator>
      <dc:date>2022-11-04T17:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error: it_data is not an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567079#M2008192</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for the explanation. I have tried with [], error stating that &lt;STRONG&gt;"IT_DATA is not an internal table."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please suggest how this issue can be resolved. Could you share a sample program to read data from multiple standard tables and writing the internal table data using Loop statement.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank you once again.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 18:00:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567079#M2008192</guid>
      <dc:creator>former_member856029</dc:creator>
      <dc:date>2022-11-04T18:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error: it_data is not an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567080#M2008193</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I have tried this option. Select statement not running more than once in this case, considering more no of Sale Orders to process. Ended up with a runtime error.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 18:29:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567080#M2008193</guid>
      <dc:creator>former_member856029</dc:creator>
      <dc:date>2022-11-04T18:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error: it_data is not an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567081#M2008194</link>
      <description>&lt;P&gt;How are you "receiving an error it_data is not an internal table"?&lt;/P&gt;&lt;P&gt;Syntax error? Runtime error?&lt;/P&gt;&lt;P&gt;If you have a runtime error, please attach the short dump.&lt;/P&gt;&lt;P&gt;If you have a syntax error, please paste the message and line of code.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 08:57:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567081#M2008194</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-11-05T08:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error: it_data is not an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567082#M2008195</link>
      <description>&lt;P&gt;I have run the above program. It works fine for me.&lt;/P&gt;&lt;P&gt;Please give proper details. "A runtime error" gives no meaningful information. Exactly what runtime error are you getting? And as others have asked you - post your full code.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2022 07:39:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567082#M2008195</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-11-06T07:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error: it_data is not an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567083#M2008196</link>
      <description>&lt;P&gt;Don't use OCCURS, it's an obsolete form because it can lead to obscure errors.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2022 07:43:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-it-data-is-not-an-internal-table/m-p/12567083#M2008196</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-11-06T07:43:15Z</dc:date>
    </item>
  </channel>
</rss>

