<?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: Runtime error at select statement in RFC_READ TABLE FM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-at-select-statement-in-rfc-read-table-fm/m-p/6687098#M1450457</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now that's what I call a join statement...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably have a bug in how you build po_search_text-cond_text, the content must be a syntactically correct where clause. It seems that in your example there is just "&amp;lt;L_LINE&amp;gt;-PSTYP" without a condition, so try omitting it altogether.&lt;/P&gt;&lt;P&gt;Debug the content of po_search_text-cond_text before it hits the select statement.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Mar 2010 21:37:15 GMT</pubDate>
    <dc:creator>ThomasZloch</dc:creator>
    <dc:date>2010-03-17T21:37:15Z</dc:date>
    <item>
      <title>Runtime error at select statement in RFC_READ TABLE FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-at-select-statement-in-rfc-read-table-fm/m-p/6687097#M1450456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;   I have copied the standard FM RFC_READ_TABLE to incorporate the customer needs. Below is the select query which I have written in this FM.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT (po_search_text-column_text) INTO &amp;lt;wa&amp;gt; FROM ekko
      INNER JOIN ekpo ON ekko~ebeln = ekpo~ebeln
      INNER JOIN eket ON ekpo~ebeln = eket~ebeln AND ekpo~ebelp = eket~ebelp
      INNER JOIN lfa1 ON ekko~lifnr = lfa1~lifnr
      INNER JOIN lfm1 ON ekko~lifnr = lfm1~lifnr AND ekko~ekorg = lfm1~ekorg
      INNER JOIN lfb1 ON ekko~lifnr = lfb1~lifnr AND ekko~bukrs = lfb1~bukrs
      INNER JOIN t024 ON ekko~ekgrp = t024~ekgrp
      INNER JOIN zatscsng_status ON eket~ebeln = zatscsng_status~po_number
      AND   eket~ebelp = zatscsng_status~po_line
      AND   eket~etenr = zatscsng_status~po_sched_line
      INNER JOIN adrc ON zatscsng_status~delivery_addr = adrc~addrnumber
      WHERE (po_search_text-cond_text)
      ORDER BY (po_search_text-sort_text).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here, &lt;U&gt;po&lt;/U&gt;search_text-column_text_ will have the fields to be selected at runtime and &lt;U&gt;po&lt;/U&gt;search_text-cond_text_ is the where condition. It is running fine in this case. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try to select Item Category ( EKPO-PSTYP), if data is present for this category, it is returning the values but if data is not there for the particular item category in the where clause, it is giving a RUNTIME ERROR at the select statement. &lt;/P&gt;&lt;P&gt;Here is the ERROR ANALYSIS:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt; An exception occurred that is explained in detail below.&lt;/P&gt;&lt;P&gt; The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was&lt;/P&gt;&lt;P&gt;  not caught in&lt;/P&gt;&lt;P&gt; procedure "ZATSCSNG_RFC_READ_TABLE" "(FUNCTION)", nor was it propagated by a&lt;/P&gt;&lt;P&gt;  RAISING clause.&lt;/P&gt;&lt;P&gt; Since the caller of the procedure could not have anticipated that the&lt;/P&gt;&lt;P&gt; exception would occur, the current program is terminated.&lt;/P&gt;&lt;P&gt; The reason for the exception is:&lt;/P&gt;&lt;P&gt; The current ABAP program has tried to execute an Open SQL statement&lt;/P&gt;&lt;P&gt; which contains a WHERE, ON or HAVING condition with a dynamic part.&lt;/P&gt;&lt;P&gt; The part of the WHERE, ON or HAVING condition specified at runtime in&lt;/P&gt;&lt;P&gt; a field or an internal table, contains the invalid value "&amp;lt;L_LINE&amp;gt;-PSTYP".&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Mar 17, 2010 5:09 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 20:54:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-at-select-statement-in-rfc-read-table-fm/m-p/6687097#M1450456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-17T20:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error at select statement in RFC_READ TABLE FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-at-select-statement-in-rfc-read-table-fm/m-p/6687098#M1450457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now that's what I call a join statement...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably have a bug in how you build po_search_text-cond_text, the content must be a syntactically correct where clause. It seems that in your example there is just "&amp;lt;L_LINE&amp;gt;-PSTYP" without a condition, so try omitting it altogether.&lt;/P&gt;&lt;P&gt;Debug the content of po_search_text-cond_text before it hits the select statement.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 21:37:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-at-select-statement-in-rfc-read-table-fm/m-p/6687098#M1450457</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-03-17T21:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error at select statement in RFC_READ TABLE FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-at-select-statement-in-rfc-read-table-fm/m-p/6687099#M1450458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thomas,&lt;/P&gt;&lt;P&gt;Thanks for your inputs.&lt;/P&gt;&lt;P&gt;Actually the select statement was already there and PSTYP was also present in the WHERE clause.&lt;/P&gt;&lt;P&gt;Now I am trying to select field PSTYP along with the other fields . And when I do this, it gives me a dump when data is not found.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 22:18:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-at-select-statement-in-rfc-read-table-fm/m-p/6687099#M1450458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-17T22:18:26Z</dc:date>
    </item>
  </channel>
</rss>

