<?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: run time error with select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368575#M524595</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sarita,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A couple of errors in your approach. You are looping at itab_s yet you are using FOR ALL ENTRIES in your SELECT statement which is unnecessary. You either use the LOOP or the FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are selecting the fields ZZPOOL ZZVALID_FR AUFNR ZZOWNER from the ZOWNERPOST table but you are moving them INTO TABLE i_ve1 which has the fields in different order. You cannot use INTO when the target fields are not of same type. Instead use INTO CORRESPONDING FIELDS OF TABLE or change the order you fields of the itab to match your SELECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using LOOP instead of FOR ALL ENTRIES remember that your INTO TABLE will replace the contents of I_VE1 in every pass of the LOOP. In such cases you will have to use APPENDING TABLE or APPENDING CORRESPONDING FIELDS OF option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you make these changes, the error should go away.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 09 Jun 2007 02:18:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-09T02:18:02Z</dc:date>
    <item>
      <title>run time error with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368569#M524589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BEGIN OF t_ve,&lt;/P&gt;&lt;P&gt;     AUFNR type zownerpost-AUFNR,&lt;/P&gt;&lt;P&gt;     zzpool type zownerpost-zzpool,&lt;/P&gt;&lt;P&gt;     ZZOWNER type zownerpost-ZZOWNER,&lt;/P&gt;&lt;P&gt;      zzvalid_fr type zownerpost-zzvalid_fr,&lt;/P&gt;&lt;P&gt;      zzvalid_to type zownerpost-zzvalid_to,&lt;/P&gt;&lt;P&gt;     starttot type p decimals 2,&lt;/P&gt;&lt;P&gt;     endtot type p decimals 2,&lt;/P&gt;&lt;P&gt;     variation type p decimals 2,&lt;/P&gt;&lt;P&gt;     discrepancy(10) type c,&lt;/P&gt;&lt;P&gt;  END OF t_ve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : i_ve1 type standard table of t_ve.&lt;/P&gt;&lt;P&gt;data : wa_i_ve1 type t_ve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab_s into wa_itab_s.&lt;/P&gt;&lt;P&gt;SELECT  zzpool zzvalid_fr AUFNR zzOWNER FROM zownerpost&lt;/P&gt;&lt;P&gt;       INTO table i_ve1&lt;/P&gt;&lt;P&gt;       FOR ALL ENTRIES IN Itab_s&lt;/P&gt;&lt;P&gt;       WHERE&lt;/P&gt;&lt;P&gt;       zzPOOL  EQ Itab_s-ZZPOOL&lt;/P&gt;&lt;P&gt;       AND zzVALID_FR EQ Itab_s-ZZVALID_FR.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it got activated, but when i tried to execute it, &lt;/P&gt;&lt;P&gt;it was giving the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following reason caused a runtime error:&lt;/P&gt;&lt;P&gt;In a select access, the read file could not be placed in the target field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as the above code i do not see any discrepancy.&lt;/P&gt;&lt;P&gt;can some one help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 21:49:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368569#M524589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T21:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: run time error with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368570#M524590</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;Please try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
BEGIN OF t_ve,
AUFNR type zownerpost-AUFNR,
zzpool type zownerpost-zzpool,
ZZOWNER type zownerpost-ZZOWNER,
zzvalid_fr type zownerpost-zzvalid_fr,
zzvalid_to type zownerpost-zzvalid_to,
starttot type p decimals 2,
endtot type p decimals 2,
variation type p decimals 2,
discrepancy(10) type c,
END OF t_ve.

data : i_ve1 type standard table of t_ve.
data : wa_i_ve1 type t_ve.

IF NOT Itab_s[] IS INITIAL.
  SELECT zzpool zzvalid_fr AUFNR zzOWNER 
  FROM zownerpost
  INTO table i_ve1
  FOR ALL ENTRIES IN Itab_s
  WHERE zzPOOL EQ Itab_s-ZZPOOL
    AND zzVALID_FR EQ Itab_s-ZZVALID_FR.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 21:53:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368570#M524590</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-06-08T21:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: run time error with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368571#M524591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ferry,&lt;/P&gt;&lt;P&gt;thanks for the reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the error didnot change,&lt;/P&gt;&lt;P&gt;it still says the same error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'in the select access the read file could not be placed in the target field provided.&lt;/P&gt;&lt;P&gt;Either the conversion is not supported for the type of target field, &lt;/P&gt;&lt;P&gt;the target field is too small to include the value '&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 22:45:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368571#M524591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T22:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: run time error with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368572#M524592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saritha ,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Could you please try like this ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  SELECT AUFNR zzpool zzowner zzvalid_fr zzvalid_to
  FROM zownerpost
  INTO  table i_ve1
  FOR ALL ENTRIES IN Itab_s
  WHERE zzPOOL EQ Itab_s-ZZPOOL
    AND zzVALID_FR EQ Itab_s-ZZVALID_FR.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Caglar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 22:57:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368572#M524592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T22:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: run time error with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368573#M524593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change the SELECT to&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT zzpool zzvalid_fr AUFNR zzOWNER 
  FROM zownerpost
  INTO corresponding fields of table i_ve1
  FOR ALL ENTRIES IN Itab_s
  WHERE zzPOOL EQ Itab_s-ZZPOOL
    AND zzVALID_FR EQ Itab_s-ZZVALID_FR.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 23:21:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368573#M524593</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2007-06-08T23:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: run time error with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368574#M524594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saritha change the query as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab_s into wa_itab_s.&lt;/P&gt;&lt;P&gt;SELECT zzpool zzvalid_fr AUFNR zzOWNER FROM zownerpost&lt;/P&gt;&lt;P&gt;INTO &amp;lt;b&amp;gt;CORRESPONDING FIELDS OF&amp;lt;/b&amp;gt; table i_ve1&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN Itab_s&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;zzPOOL EQ Itab_s-ZZPOOL&lt;/P&gt;&lt;P&gt;AND zzVALID_FR EQ Itab_s-ZZVALID_FR.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2007 00:01:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368574#M524594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-09T00:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: run time error with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368575#M524595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sarita,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A couple of errors in your approach. You are looping at itab_s yet you are using FOR ALL ENTRIES in your SELECT statement which is unnecessary. You either use the LOOP or the FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are selecting the fields ZZPOOL ZZVALID_FR AUFNR ZZOWNER from the ZOWNERPOST table but you are moving them INTO TABLE i_ve1 which has the fields in different order. You cannot use INTO when the target fields are not of same type. Instead use INTO CORRESPONDING FIELDS OF TABLE or change the order you fields of the itab to match your SELECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using LOOP instead of FOR ALL ENTRIES remember that your INTO TABLE will replace the contents of I_VE1 in every pass of the LOOP. In such cases you will have to use APPENDING TABLE or APPENDING CORRESPONDING FIELDS OF option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you make these changes, the error should go away.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2007 02:18:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368575#M524595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-09T02:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: run time error with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368576#M524596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Saritha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;either you arrange internal table properly ( I mean when you select the data what ever order is in internal table ,use same order in select query ) or into corresponding fields option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Into corresponding fields option is performance issue ,so use internal table order always.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2007 02:26:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368576#M524596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-09T02:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: run time error with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368577#M524597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI saritha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better to use the same field order in internal table as well as select statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of using select in Loop, try to use for all entries. Because performance is faster in For all entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regadrs&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2007 02:55:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-time-error-with-select-statement/m-p/2368577#M524597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-09T02:55:18Z</dc:date>
    </item>
  </channel>
</rss>

