<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/3378479#M811214</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;It seems to be you have an issue in the select statement. For testing purpose change can you do as below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 select single knumh into wa_knumh from (wa_tabl)
                where (where_tab) "Instead of dynamic where condition chnage it to normal condition then see it will work properly because it is not identifying the dynamic where condition.
                     and kappl eq kappl
                     and kschl eq t_kschl 
                     and datbi ge date
                     and datab le date.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Feb 2008 14:44:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-10T14:44:46Z</dc:date>
    <item>
      <title>runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/3378477#M811212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;i am modifying the existing custom program .. now i am getting the run time error if i enter iput for sales organization(KK01) only for other its working fine.we have input as sales org and condition type.. &lt;/P&gt;&lt;P&gt;if i enetr KK01 with condition type KL04 workign fine,, if i enter only KK01 its going to dump &lt;/P&gt;&lt;P&gt;please find the below dump and code and advise me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code writtena as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;002730   form get_cond_number_2 tables msg structure bmmsg&lt;/P&gt;&lt;P&gt;002740                               where_tab structure where_tab&lt;/P&gt;&lt;P&gt;002750                         using kappl wa_tabl tmp_kschl r_kschl&lt;/P&gt;&lt;P&gt;002760                               subrc date&lt;/P&gt;&lt;P&gt;002770                      changing  wa_knumh out structure zzsdcond.&lt;/P&gt;&lt;P&gt;002780     data:tmp_kbetr(20),&lt;/P&gt;&lt;P&gt;002790          tmp_subrc(3),&lt;/P&gt;&lt;P&gt;002800          tmp_konp like konp,&lt;/P&gt;&lt;P&gt;002810          t_kschl like konp-kschl.&lt;/P&gt;&lt;P&gt;002820&lt;/P&gt;&lt;P&gt;002830     if not r_kschl is initial.&lt;/P&gt;&lt;P&gt;002840      t_kschl = r_kschl.&lt;/P&gt;&lt;P&gt;002850     else.&lt;/P&gt;&lt;P&gt;002860      t_kschl = tmp_kschl.&lt;/P&gt;&lt;P&gt;002870     endif.&lt;/P&gt;&lt;P&gt;002880&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&amp;gt;     select single knumh into wa_knumh from (wa_tabl)&lt;/P&gt;&lt;P&gt;002900       where (where_tab)&lt;/P&gt;&lt;P&gt;002910       and kappl eq kappl&lt;/P&gt;&lt;P&gt;002920       and kschl eq t_kschl      &lt;/P&gt;&lt;P&gt;002930       and datbi ge date&lt;/P&gt;&lt;P&gt;002940       and datab le date.&lt;/P&gt;&lt;P&gt;002950&lt;/P&gt;&lt;P&gt;002960     if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;002970       format intensified on color 4.&lt;/P&gt;&lt;P&gt;002980   **    write: / wa_knumh.&lt;/P&gt;&lt;P&gt;002990&lt;/P&gt;&lt;P&gt;003000       add_msg: msg wa_knumh '' '' '' '' ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dump:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime errors         SAPSQL_INVALID_FIELDNAME&lt;/P&gt;&lt;P&gt;Exception              CX_SY_DYNAMIC_OSQL_SEMANTICS&lt;/P&gt;&lt;P&gt; One of the field names in the SELECT clause was not recognized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;Error analysis&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An exception occurred. This exception is dealt with in more detail below&lt;/P&gt;&lt;P&gt;. The exception, which is assigned to the class 'CX_SY_DYNAMIC_OSQL_SEMANTICS',&lt;/P&gt;&lt;P&gt; was neither&lt;/P&gt;&lt;P&gt;caught nor passed along using a RAISING clause, in the procedure&lt;/P&gt;&lt;P&gt; "GET_COND_NUMBER_2" "(FORM)"&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Since the caller of the procedure could not have expected this exception&lt;/P&gt;&lt;P&gt; to occur, the running program was terminated.&lt;/P&gt;&lt;P&gt;The reason for the exception is:&lt;/P&gt;&lt;P&gt;The SELECT clause was specified in an internal table at runtime.&lt;/P&gt;&lt;P&gt;It contains the field name "VKORG", but this does not occur in any of&lt;/P&gt;&lt;P&gt;the database tables listed in the FROM clause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Feb 2008 05:29:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/3378477#M811212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-10T05:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/3378478#M811213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the dump is saying&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; "&lt;EM&gt;The SELECT clause was specified in an internal table at runtime.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;It contains the field name "VKORG", but this does not occur in any of&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;the database tables listed in the FROM clause&lt;/EM&gt;".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===&amp;gt;  error is in the FROM clause.&lt;/P&gt;&lt;P&gt;===&amp;gt; in the OK test watch the value of the FROM clause &lt;STRONG&gt;wa_tabl&lt;/STRONG&gt; and the WHERE clause &lt;STRONG&gt;where_tab&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;===&amp;gt; in the KO test watch the value of the FROM clause &lt;STRONG&gt;wa_tabl&lt;/STRONG&gt; and the WHERE clause &lt;STRONG&gt;where_tab&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cordialement,&lt;/P&gt;&lt;P&gt;Chaouki.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Feb 2008 06:59:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/3378478#M811213</guid>
      <dc:creator>chaouki_akir</dc:creator>
      <dc:date>2008-02-10T06:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/3378479#M811214</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;It seems to be you have an issue in the select statement. For testing purpose change can you do as below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 select single knumh into wa_knumh from (wa_tabl)
                where (where_tab) "Instead of dynamic where condition chnage it to normal condition then see it will work properly because it is not identifying the dynamic where condition.
                     and kappl eq kappl
                     and kschl eq t_kschl 
                     and datbi ge date
                     and datab le date.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Feb 2008 14:44:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/3378479#M811214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-10T14:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/3378480#M811215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ramesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the select statement tries to fetch data from a condition table. Condition tables structure is user-defined. That means you can only fetch the fields that arte present in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may set a breakpoint at the select statement and check the value of wa_tabl at runtime. Then you have to check the structure of the table with wa_tabl's name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check with functional guys what is difference in conditions types provided for different sales org.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Feb 2008 16:45:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error/m-p/3378480#M811215</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2008-02-10T16:45:09Z</dc:date>
    </item>
  </channel>
</rss>

