<?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: Dynamic SQl results in DUMP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203423#M1203804</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm also missing a dot ('.') at the end of the line. Command should always end with a point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For numeric characters you can use '0000' (depending on number of characters).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW. you are creating the dynamic where clause within the loop, without clearing (initializing ) anything. This will lead to the next problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Micky Oestreich on Feb 19, 2009 2:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Feb 2009 12:57:35 GMT</pubDate>
    <dc:creator>Sm1tje</dc:creator>
    <dc:date>2009-02-19T12:57:35Z</dc:date>
    <item>
      <title>Dynamic SQl results in DUMP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203417#M1203798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does someone see what is wrong in my dynamic SQL statement is reuslts in a dump!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DUMP and CODE below!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime error          SAPSQL_WHERE_MISSING_VALUE                                                   &lt;/P&gt;&lt;P&gt;Except.                CX_SY_DYNAMIC_OSQL_SYNTAX                                                    &lt;/P&gt;&lt;P&gt;Datum en tijd          19.02.2009 13:30:13                                                                                &lt;/P&gt;&lt;P&gt;Korte tekst                                                                                &lt;/P&gt;&lt;P&gt;A comparison value is missing in a condition specified dynamically.                                                                                &lt;/P&gt;&lt;P&gt;Wat is er gebeurd?                                                                                &lt;/P&gt;&lt;P&gt;Error in the ABAP Application Program                                                                                &lt;/P&gt;&lt;P&gt;The current ABAP program "!PR_RVVEEN_USED_FIELDS" had to be terminated because                 &lt;/P&gt;&lt;P&gt;      it has                                                                                &lt;/P&gt;&lt;P&gt;come across a statement that unfortunately cannot be executed.                                                                                &lt;/P&gt;&lt;P&gt;Foutenanalyse                                                                                &lt;/P&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_SYNTAX', was not                 &lt;/P&gt;&lt;P&gt;      caught and                                                                                &lt;/P&gt;&lt;P&gt;therefore caused a runtime error.                                                              &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;     in which a condition was (partially) specified dynamically. In the                             &lt;/P&gt;&lt;P&gt;     part specified at runtime, the program expects to find a literal as                            &lt;/P&gt;&lt;P&gt;     the comparison value.                                                                                &lt;/P&gt;&lt;P&gt;===============================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itable = 'pa0001'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DD_NAMETAB_TO_DDFIELDS'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      tabname  = iname&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      ddfields = ddfields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT ddfields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: where_tab(30) occurs 1 with header line,&lt;/P&gt;&lt;P&gt;where_clause(30) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate ddfields-fieldname '&amp;lt;&amp;gt; " "' into where_clause SEPARATED BY space.&lt;/P&gt;&lt;P&gt;append where_clause to where_tab.&lt;/P&gt;&lt;P&gt;select pernr from (itable) into table lt_pernr where (where_tab).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    write 'FIELD COTAINS A VALUE'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 12:31:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203417#M1203798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-19T12:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic SQl results in DUMP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203418#M1203799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The dump is because of a error in the where clause!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 12:32:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203418#M1203799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-19T12:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic SQl results in DUMP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203419#M1203800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;while debugging check the values in where_tab and itable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 12:34:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203419#M1203800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-19T12:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic SQl results in DUMP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203420#M1203801</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;Concatenate operator also in where-clause, like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate ddfields-fieldname  &lt;STRONG&gt;' = '&lt;/STRONG&gt;  ' " "' into where_clause SEPARATED BY space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks\&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 12:37:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203420#M1203801</guid>
      <dc:creator>former_member222860</dc:creator>
      <dc:date>2009-02-19T12:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic SQl results in DUMP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203421#M1203802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I look at the coding. I'm missing the rest of the WHERE clause&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the where_tab I can't find any operator like 'EQ' or 'NE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. try to catch the exception using TRY -- ENDTRY and retrieve the error message.&lt;/P&gt;&lt;P&gt;2. In debugging, before SELECT, check the contents of the where_tab. It should look like a 'normal select' , something like this WHERE fielda = 10.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 12:38:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203421#M1203802</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-02-19T12:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic SQl results in DUMP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203422#M1203803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Already tried this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate ddfields-fieldname 'NE space' into where_clause SEPARATED BY space.&lt;/P&gt;&lt;P&gt;append where_clause to where_tab.&lt;/P&gt;&lt;P&gt;select pernr from (itable) into table lt_pernr where (where_tab).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this work for Characterfields but not for no character fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 12:42:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203422#M1203803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-19T12:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic SQl results in DUMP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203423#M1203804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm also missing a dot ('.') at the end of the line. Command should always end with a point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For numeric characters you can use '0000' (depending on number of characters).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW. you are creating the dynamic where clause within the loop, without clearing (initializing ) anything. This will lead to the next problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Micky Oestreich on Feb 19, 2009 2:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 12:57:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203423#M1203804</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-02-19T12:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic SQl results in DUMP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203424#M1203805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, forget about the IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got it working for me, but your requirement is not all to clear to me, since you are looking for a selection, where a certain field is NOT filled?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is probably only a test program, so it's not that important.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 13:13:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-sql-results-in-dump/m-p/5203424#M1203805</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-02-19T13:13:27Z</dc:date>
    </item>
  </channel>
</rss>

