<?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: RFC and dynamic SQL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342682#M1992235</link>
    <description>&lt;P&gt;No.&lt;/P&gt;&lt;P&gt;Neither in update, nor in local.&lt;/P&gt;&lt;P&gt;When I debug locally, I don't get the exception.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jan 2021 13:34:35 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2021-01-20T13:34:35Z</dc:date>
    <item>
      <title>RFC and dynamic SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342680#M1992233</link>
      <description>&lt;P&gt;I've got an RFC enabled function module, which uses a dynamic where clause, like&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;TRY.
       DATA(Where) = `somefield EQ zcl_someclass=&amp;gt;c_constant-value`.
       SELECT * FROM table INTO internal_Table WHERE (where).    
    CATCH cx_sy_dynamic_osql_error INTO DATA(sql_error).
      e_error-message = sql_error-&amp;gt;get_text( ) &amp;amp;&amp;amp; ` : ` &amp;amp;&amp;amp; sql_error-&amp;gt;get_longtext( ).
      e_error-type = 'E'.
      RETURN.
  ENDTRY.
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I'm calling it with a destinations that's just to another client &lt;STRONG&gt;in the same instance. &lt;/STRONG&gt;It throws an exception - it does not like zcl_someclass=&amp;gt;c_constant-value. It says that the value can't be established.&lt;/P&gt;
  &lt;P&gt;This is in a 7.31 system. I'll be testing in a 752 system when I get some time.&lt;/P&gt;
  &lt;P&gt;Has anyone noticed this strange behaviour, or have an explanation? It only happens with an RFC. Locally, it works fine.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 12:13:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342680#M1992233</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-01-20T12:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: RFC and dynamic SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342681#M1992234</link>
      <description>&lt;P&gt;in debug, the class=&amp;gt;constant gives a result ? &lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 13:23:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342681#M1992234</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2021-01-20T13:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: RFC and dynamic SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342682#M1992235</link>
      <description>&lt;P&gt;No.&lt;/P&gt;&lt;P&gt;Neither in update, nor in local.&lt;/P&gt;&lt;P&gt;When I debug locally, I don't get the exception.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 13:34:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342682#M1992235</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-01-20T13:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: RFC and dynamic SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342683#M1992236</link>
      <description>&lt;P&gt;sorry, you debug in RFC ? or just in local call ? &lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 13:36:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342683#M1992236</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2021-01-20T13:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: RFC and dynamic SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342684#M1992237</link>
      <description>&lt;P&gt;I get the error in RFC (debug or not debug -&amp;gt; I updated the question):&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Could not interpret the value 'CLASS=&amp;gt;CONSTANT'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;An attempt was made to execute an Open SQL stateme
nt, in which the dynamic WHERE or SET condition contains the illegal value 'CLASS=&amp;gt;CONSTANT&lt;/EM&gt;&lt;EM&gt;'. For instance, one of the value fields, addressed by a LIKE operator in the WHERE clause, is not type C.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The constant type is CHAR 1.&lt;/P&gt;&lt;P&gt;When I put the value in directly, like &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;       DATA(Where) = `somefield EQ '1'`.
       SELECT * FROM table INTO internal_Table WHERE (where). &lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It also works fine.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 13:44:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342684#M1992237</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-01-20T13:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: RFC and dynamic SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342685#M1992238</link>
      <description>&lt;P&gt;Try assigning zcl_someclass=&amp;gt;c_constant-value to a local helper variable to see if that makes any difference...?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 14:14:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342685#M1992238</guid>
      <dc:creator>joltdx</dc:creator>
      <dc:date>2021-01-20T14:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: RFC and dynamic SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342686#M1992239</link>
      <description>&lt;P&gt;There's no mention of it in the 7.31 documentation, but in the &lt;A href="https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abenwhere_logexp_dynamic.htm" target="_blank"&gt;7.52 docs says right here&lt;/A&gt; that: &lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;In dynamic SQL conditions, static attributes or constants of a class cannot be accessed from outside in cases where the class has a static constructor and the constructor was not yet executed.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Both doc versions says that:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;The data objects specified in a dynamic condition should be declared in the same context, if possible, since searches in higher contexts at runtime are more unwieldy.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I don't know what it could be, but is it something with the class and RFC?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 14:30:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342686#M1992239</guid>
      <dc:creator>joltdx</dc:creator>
      <dc:date>2021-01-20T14:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: RFC and dynamic SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342687#M1992240</link>
      <description>&lt;P&gt;Tried that - works.&lt;/P&gt;&lt;P&gt;Also tried &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(Where) = `somefield EQ '` &amp;amp;&amp;amp;  zcl_someclass=&amp;gt;c_constant-value &amp;amp;&amp;amp; `'`.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and that works too.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 14:37:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342687#M1992240</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-01-20T14:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: RFC and dynamic SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342688#M1992241</link>
      <description>&lt;P&gt;There you go. The caller of the FM has already run class constructor. - it works locally.&lt;/P&gt;&lt;P&gt;However, in the RFC context in the FM, the class constructor has not run - and we get the error.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 14:39:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342688#M1992241</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-01-20T14:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: RFC and dynamic SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342689#M1992242</link>
      <description>&lt;P&gt;Lovely! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 14:56:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-and-dynamic-sql/m-p/12342689#M1992242</guid>
      <dc:creator>joltdx</dc:creator>
      <dc:date>2021-01-20T14:56:13Z</dc:date>
    </item>
  </channel>
</rss>

