<?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: Problems using EXEC SQL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173388#M1623463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stephan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;In Open SQL I can simply use a field called EKKO~/SOL/BESTNR_EX and get the result. Due to a runtime problem I tried to use Native SQL via EXEC SQL. But as soon as I try to use this field I get a dump.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can you elaborate what runtime error you're experiencing with Open &amp;amp; Native SQL? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Before anyone asks the final SQL statement will be much bigger, but this sample shows the situation.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If i were in your place, i would definitely post the entire SQL construct(both Open &amp;amp; Native)! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Aug 2011 09:00:35 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2011-08-30T09:00:35Z</dc:date>
    <item>
      <title>Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173387#M1623462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem using EXEC SQL. Not the command itself but a conflict with our naming conventions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Open SQL I can simply use a field called &lt;STRONG&gt;EKKO~/SOL/BESTNR_EX&lt;/STRONG&gt; and get the result. Due to a runtime problem I tried to use Native SQL via EXEC SQL. But as soon as I try to use this field I get a dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know how to use a field named like this in Native SQL?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  TYPES:
        BEGIN OF ls_test,
          lifnr TYPE elifn,
          matnr TYPE matnr,
          arktx TYPE arktx,
          werks TYPE werks_d,
          ean11 TYPE ean11,
          vgbel TYPE vgbel,
          posnr TYPE posnr_vl,
          pstyp type pstyp,
          bsart type esart,
          /sol/bestnr_ex TYPE /sol/mm_bestnr_ex,
          menge TYPE bstmg,
          elikz TYPE elikz,
          erekz TYPE erekz,
        END OF ls_test.

  DATA:
          ls_test TYPE ls_test.

    EXEC SQL.
      OPEN c1 FOR
SELECT EKKO.LIFNR, EKPO.MATNR, EKPO.TXZ01, EKPO.WERKS, EKPO.EAN11, EKKO.EBELN, EKPO.EBELP, EKPO.PSTYP, EKKO.BSART, EKKO./SOL/BESTNR_EX, EKPO.MENGE, EKPO.ELIKZ, EKPO.EREKZ
FROM EKKO
INNER JOIN EKPO ON EKKO.EBELN = EKPO.EBELN
    ENDEXEC.

    DO.
      EXEC SQL.
        FETCH NEXT c1 INTO :LS_TEST
      ENDEXEC.
      IF sy-subrc &amp;lt;&amp;gt; 0.
        EXIT.
      ELSE.
        WRITE LS_TEST-LIFNR.
      ENDIF.
    ENDDO.
    EXEC SQL.
      CLOSE c1
    ENDEXEC.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before anyone asks the final SQL statement will be much bigger, but this sample shows the situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Stephan Knecht&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: stknec on Aug 30, 2011 10:51 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: stknec on Aug 30, 2011 10:52 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 08:51:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173387#M1623462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T08:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173388#M1623463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stephan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;In Open SQL I can simply use a field called EKKO~/SOL/BESTNR_EX and get the result. Due to a runtime problem I tried to use Native SQL via EXEC SQL. But as soon as I try to use this field I get a dump.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can you elaborate what runtime error you're experiencing with Open &amp;amp; Native SQL? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Before anyone asks the final SQL statement will be much bigger, but this sample shows the situation.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If i were in your place, i would definitely post the entire SQL construct(both Open &amp;amp; Native)! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 09:00:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173388#M1623463</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-08-30T09:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173389#M1623464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you should put back quotes around the field name as it contains special characters (in this case the slash)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 09:08:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173389#M1623464</guid>
      <dc:creator>franois_henrotte</dc:creator>
      <dc:date>2011-08-30T09:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173390#M1623465</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;Just for curiosity   .. why i  can't find this field &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EKKO./SOL/BESTNR_EX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in ekko  table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 09:44:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173390#M1623465</guid>
      <dc:creator>deepak_dhamat</dc:creator>
      <dc:date>2011-08-30T09:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173391#M1623466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably because it's part of an an add-in.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 09:48:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173391#M1623466</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2011-08-30T09:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173392#M1623467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@for Deepak Dhamat:&lt;/P&gt;&lt;P&gt;The field is an include from us and as we told by SAP it is in our namespace /SOL/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Suhas Saha:&lt;/P&gt;&lt;P&gt;I'm sorry I forgot the error message, it's included in this post. I've seen no use in posting the whole sql since a small part of it shows the problem, but as you wished here is the complete native SQL, there is no counterpart in Open SQL because this SQL wont work in Open SQL, it has been done in some sqls which are Open SQL compatible (since there is more then one join).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR MESSAGE:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime Errors         DBIF_DSQL2_SQL_ERROR&lt;/P&gt;&lt;P&gt;Except.                CX_SY_NATIVE_SQL_ERROR&lt;/P&gt;&lt;P&gt;Date and Time          30.08.2011 11:45:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Short text&lt;/P&gt;&lt;P&gt;     An SQL error occurred when executing Native SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; What happened?&lt;/P&gt;&lt;P&gt;     The error "-104" occurred in the current database connection "DEFAULT".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to correct the error&lt;/P&gt;&lt;P&gt;    Database error text........: "SQL0104N An unexpected token "/" was found&lt;/P&gt;&lt;P&gt;     following "P, EKKO.BSART, EKKO.". Expected tokens may include: "&amp;lt;space&amp;gt;".&lt;/P&gt;&lt;P&gt;     SQLSTATE=42601"&lt;/P&gt;&lt;P&gt;    Database error code........: "-104"&lt;/P&gt;&lt;P&gt;    Triggering SQL statement...: "SELECT EKKO.LIFNR, EKPO.MATNR, EKPO.TXZ01,&lt;/P&gt;&lt;P&gt;     EKPO.WERKS, EKPO.EAN11, EKKO.EBELN, EKPO.EBELP, EKPO.PSTYP, EKKO.BSART,&lt;/P&gt;&lt;P&gt;     EKKO./SOL/BESTNR_EX, EKPO.MENGE, EKPO.ELIKZ, EKPO.EREKZ FROM EKKO INNER JOIN&lt;/P&gt;&lt;P&gt;     EKPO ON EKKO.EBELN = EKPO.EBELN"&lt;/P&gt;&lt;P&gt;    Internal call code.........: "[DBDS/NEW DSQL]"&lt;/P&gt;&lt;P&gt;    Please check the entries in the system log (Transaction SM21).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    If the error occures in a non-modified SAP program, you may be able to&lt;/P&gt;&lt;P&gt;    find an interim solution in an SAP Note.&lt;/P&gt;&lt;P&gt;    If you have access to SAP Notes, carry out a search with the following&lt;/P&gt;&lt;P&gt;    keywords:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    "DBIF_DSQL2_SQL_ERROR" "CX_SY_NATIVE_SQL_ERROR"&lt;/P&gt;&lt;P&gt;    "/SOL/CL_MM_ASA================CP" or "/SOL/CL_MM_ASA================CM00C"&lt;/P&gt;&lt;P&gt;    "BUILD_DATA"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    If you cannot solve the problem yourself and want to send an error&lt;/P&gt;&lt;P&gt;    notification to SAP, include the following information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    4. Details about the conditions under which the error occurred or which&lt;/P&gt;&lt;P&gt;    actions and input led to the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    The exception must either be prevented, caught within proedure&lt;/P&gt;&lt;P&gt;    "BUILD_DATA" "(METHOD)", or its possible occurrence must be declared in the&lt;/P&gt;&lt;P&gt;    RAISING clause of the procedure.&lt;/P&gt;&lt;P&gt;    To prevent the exception, note the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System environment&lt;/P&gt;&lt;P&gt;    SAP-Release 701&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Application server... "xxxxxxxxx"&lt;/P&gt;&lt;P&gt;    Network address...... "xxxxxxxxx"&lt;/P&gt;&lt;P&gt;    Operating system..... "AIX"&lt;/P&gt;&lt;P&gt;    Release.............. "6.1"&lt;/P&gt;&lt;P&gt;    Hardware type........ "000D014AD400"&lt;/P&gt;&lt;P&gt;    Character length.... 16 Bits&lt;/P&gt;&lt;P&gt;    Pointer length....... 64 Bits&lt;/P&gt;&lt;P&gt;    Work process number.. 0&lt;/P&gt;&lt;P&gt;    Shortdump setting.... "full"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Database server... "xxxxxxxxxx"&lt;/P&gt;&lt;P&gt;    Database type..... "DB6"&lt;/P&gt;&lt;P&gt;    Database name..... "E01"&lt;/P&gt;&lt;P&gt;    Database user ID.. "SAPSR3"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Terminal.......... "xxxxxxxxxx"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Char.set.... "C"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SAP kernel....... 701&lt;/P&gt;&lt;P&gt;    created (date)... "Oct 31 2010 21:35:22"&lt;/P&gt;&lt;P&gt;    create on........ "AIX 2 5 00CB5A5B4C00"&lt;/P&gt;&lt;P&gt;    Database version. "DB6_81 "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Patch level. 117&lt;/P&gt;&lt;P&gt;    Patch text.. " "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Database............. "DB6 08.02.&lt;STRONG&gt;, DB6 09.&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;    SAP database version. 701&lt;/P&gt;&lt;P&gt;    Operating system..... "AIX 1 5, AIX 2 5, AIX 3 5, AIX 1 6, AIX 1 7"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Memory consumption&lt;/P&gt;&lt;P&gt;    Roll.... 16192&lt;/P&gt;&lt;P&gt;    EM...... 12569544&lt;/P&gt;&lt;P&gt;    Heap.... 0&lt;/P&gt;&lt;P&gt;    Page.... 73728&lt;/P&gt;&lt;P&gt;    MM Used. 1325488&lt;/P&gt;&lt;P&gt;    MM Free. 2861760&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Stephan Knecht&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Aug 30, 2011 3:31 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 09:58:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173392#M1623467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T09:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173393#M1623468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm, I used  but it does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NATIVE SQL STATEMENT:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
      SELECT EKKO.MANDT, RES2.VBELN, EKKO.EBELN, RES3.BELNR, EKPO.MATNR, RES2.POSNR, EKPO.WERKS, EKPO.EBELP, RES2.LIFEX, RES2.LIFNR, RES2.LFDAT, RES2.ARKTX, RES2.LFIMG, EKPO.EAN11, EKKO.BSART, EKKO./SOL/BESTNR_EX, EKPO.MENGE, EKPO.ELIKZ, EKPO.EREKZ,
RES3.XBLNR, RES3.RMENGE, '' AS STATUS, CURRENT_DATE AS DBDAT, EKPO.PSTYP
      FROM EKKO
      INNER JOIN EKPO ON EKKO.EBELN = EKPO.EBELN
      INNER JOIN /SOL/MM_ASA_E ON /SOL/MM_ASA_E.EBELN = EKKO.EBELN
      LEFT OUTER JOIN (
        SELECT DISTINCT LIKP.LIFNR, LIKP.VBELN, LIKP.LFDAT, LIKP.LIFEX, LIPS.ARKTX, LIPS.POSNR, LIPS.LFIMG, LIPS.WERKS, LIPS.VGBEL, LIPS.VGPOS, LIPS.EAN11
        FROM LIKP
        INNER JOIN LIPS ON LIKP.VBELN=LIPS.VBELN
        INNER JOIN /SOL/MM_ASA_E ON /SOL/MM_ASA_E.EBELN = LIPS.VGBEL WHERE LIPS.MATNR IS NOT NULL) AS RES2 ON RES1.EBELN = RES2.VGBEL
      LEFT OUTER JOIN (
        SELECT RSEG.EBELN, RSEG.EBELP, RBKP.BELNR, RBKP.XBLNR, SUM(RSEG.MENGE) AS RMENGE
        FROM RBKP
        INNER JOIN RSEG ON RBKP.BELNR=RSEG.BELNR AND RBKP.GJAHR=RSEG.GJAHR
        INNER JOIN /SOL/MM_ASA_E ON /SOL/MM_ASA_E.EBELN=RSEG.EBELN
        GROUP BY RSEG.EBELN, RSEG.EBELP, RBKP.BELNR, RBKP.XBLNR) AS RES3 ON RES1.EBELN=RES3.EBELN AND RES1.EBELP=RES3.EBELP
      LEFT OUTER JOIN (
        SELECT EBKE.EBELN, EKBE.EBELP, SUM(CASE WHEN VGABE = 1 THEN MENGE ELSE 0 END) AS V1MENGE, SUM(CASE WHEN VGABE = 2 THEN MENGE ELSE 0 END) AS V2MENGE, SUM(CASE WHEN VGABE = 6 THEN MENGE ELSE 0 END) AS V6MENGE
        FROM EKBE
        INNER JOIN /SOL/MM_ASA_E ON /SOL/MM_ASA_E.EBELN = EKBE.EBELN
        GROUP BY EKBE.EBELN, EKBE.EBELP) AS RES4 ON RES1.EBELN=RES4.EBELN AND RES1.EBELP=RES4.EBELP
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator Message: I've done that for you &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Aug 30, 2011 3:37 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 10:03:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173393#M1623468</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T10:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173394#M1623469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ERROR MESSAGE:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Runtime Errors         DBIF_DSQL2_SQL_ERROR
Except.                CX_SY_NATIVE_SQL_ERROR
Date and Time          30.08.2011 11:45:00

 Short text
     An SQL error occurred when executing Native SQL.

 What happened?
     The error "-104" occurred in the current database connection "DEFAULT".

 What can you do?
     Note down which actions and inputs caused the error.

     To process the problem further, contact you SAP system
     administrator.

     Using Transaction ST22 for ABAP Dump Analysis, you can look
     at and manage termination messages, and you can also
     keep them for a long time.

How to correct the error
    Database error text........: "SQL0104N An unexpected token "/" was found
     following "P, EKKO.BSART, EKKO.". Expected tokens may include: "&amp;lt;space&amp;gt;".
     SQLSTATE=42601"
    Database error code........: "-104"
    Triggering SQL statement...: "SELECT EKKO.LIFNR, EKPO.MATNR, EKPO.TXZ01,
     EKPO.WERKS, EKPO.EAN11, EKKO.EBELN, EKPO.EBELP, EKPO.PSTYP, EKKO.BSART,
     EKKO./SOL/BESTNR_EX, EKPO.MENGE, EKPO.ELIKZ, EKPO.EREKZ FROM EKKO INNER JOIN
     EKPO ON EKKO.EBELN = EKPO.EBELN"
    Internal call code.........: "[DBDS/NEW DSQL]"
    Please check the entries in the system log (Transaction SM21).

    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:

    "DBIF_DSQL2_SQL_ERROR" "CX_SY_NATIVE_SQL_ERROR"
    "/SOL/CL_MM_ASA================CP" or "/SOL/CL_MM_ASA================CM00C"
    "BUILD_DATA"

    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:

    1. The description of the current problem (short dump)

       To save the description, choose "System-&amp;gt;List-&amp;gt;Save-&amp;gt;Local File
    (Unconverted)".

    2. Corresponding system log

       Display the system log by calling transaction SM21.
       Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System-&amp;gt;List-&amp;gt;Save-&amp;gt;Local File
    (Unconverted)".

    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
       In the editor, choose "Utilities-&amp;gt;More
    Utilities-&amp;gt;Upload/Download-&amp;gt;Download".

    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.

    The exception must either be prevented, caught within proedure
    "BUILD_DATA" "(METHOD)", or its possible occurrence must be declared in the
    RAISING clause of the procedure.
    To prevent the exception, note the following:

System environment
    SAP-Release 701

    Application server... "xxxxxxxxx"
    Network address...... "xxxxxxxxx"
    Operating system..... "AIX"
    Release.............. "6.1"
    Hardware type........ "000D014AD400"
    Character length.... 16 Bits
    Pointer length....... 64 Bits
    Work process number.. 0
    Shortdump setting.... "full"

    Database server... "xxxxxxxxxx"
    Database type..... "DB6"
    Database name..... "E01"
    Database user ID.. "SAPSR3"

    Terminal.......... "xxxxxxxxxx"

    Char.set.... "C"

    SAP kernel....... 701
    created (date)... "Oct 31 2010 21:35:22"
    create on........ "AIX 2 5 00CB5A5B4C00"
    Database version. "DB6_81 "

    Patch level. 117
    Patch text.. " "

    Database............. "DB6 08.02.*, DB6 09.*"
    SAP database version. 701
    Operating system..... "AIX 1 5, AIX 2 5, AIX 3 5, AIX 1 6, AIX 1 7"

    Memory consumption
    Roll.... 16192
    EM...... 12569544
    Heap.... 0
    Page.... 73728
    MM Used. 1325488
    MM Free. 2861760&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 10:09:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173394#M1623469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T10:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173395#M1623470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems there can not be two  segments in one post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 10:09:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173395#M1623470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T10:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173396#M1623471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt/Suhas  ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  After searching  i came to this  NOTE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Note 1145460 - DB6: DBA Cockpit - error due to unquoted partitioning keys

Symptom

In the DBA Cockpit, you use the BI Data Distribution Wizard to distribute data accross new database partitions.
 When you execute the selected actions at the end of the wizard, you receive an SQL error -104.

Other terms

SQL0104N, add partition,

Reason and Prerequisites

Partitioning key column names in the generated DDL are not quoted.

Solution

SAP Basis 7.00: Import Basis Support Package 16.
SAP Basis 7.10: Import Basis Support Package 6.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this relevant  to  the error  ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 11:01:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173396#M1623471</guid>
      <dc:creator>deepak_dhamat</dc:creator>
      <dc:date>2011-08-30T11:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173397#M1623472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems there can not be two  segments in one post.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Thanks Suhas&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;yes&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;there can&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put the field name in double quotes  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;   EXEC SQL.
      OPEN c1 FOR
          SELECT EKKO.LIFNR, EKPO.MATNR, EKPO.TXZ01, 
                 EKPO.WERKS, EKPO.EAN11, EKKO.EBELN, EKPO.EBELP, 
                 EKPO.PSTYP, EKKO.BSART, "EKKO./SOL/BESTNR_EX", 
                 EKPO.MENGE, EKPO.ELIKZ, EKPO.EREKZ
    FROM EKKO
    INNER JOIN EKPO ON EKKO.EBELN = EKPO.EBELN
  ENDEXEC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 11:19:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173397#M1623472</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2011-08-30T11:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173398#M1623473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Double quoting kinda helped, but I get a new error message. Since the only name I know for this field is &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EKKO~/SOL/BESTNR_EX&lt;/STRONG&gt; I don't know it's name on the database itself. Since I have no access direct to the database I cannot have a look on the physical table to see it's name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SQLSTATE 42703 says that the field does not exist.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 11:34:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173398#M1623473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T11:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173399#M1623474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;New error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Runtime Errors         DBIF_DSQL2_SQL_ERROR
Except.                CX_SY_NATIVE_SQL_ERROR
Date and Time          30.08.2011 13:28:03

What happened?
    The error "-206" occurred in the current database connection "DEFAULT".

How to correct the error
    Database error text........: "SQL0206N "EKKO./SOL/BESTNR_EX" is not valid in
     the context where it is used. SQLSTATE=42703"
    Database error code........: "-206"
    Triggering SQL statement...: "SELECT EKKO.LIFNR, EKPO.MATNR, EKPO.TXZ01,
     EKPO.WERKS, EKPO.EAN11, EKKO.EBELN, EKPO.EBELP, EKPO.PSTYP, EKKO.BSART,
     "EKKO./SOL/BESTNR_EX", EKPO.MENGE, EKPO.ELIKZ, EKPO.EREKZ FROM EKKO INNER JOIN
     EKPO ON EKKO.EBELN = EKPO.EBELN"
    Internal call code.........: "[DBDS/NEW DSQL]"
    Please check the entries in the system log (Transaction SM21).

    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:

    "DBIF_DSQL2_SQL_ERROR" "CX_SY_NATIVE_SQL_ERROR"
    "/SOL/CL_MM_ASA================CP" or "/SOL/CL_MM_ASA================CM00C"
    "BUILD_DATA"

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 11:37:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173399#M1623474</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T11:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173400#M1623475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;EXEC SQL.
      OPEN c1 FOR
          SELECT EKKO.LIFNR, EKPO.MATNR, EKPO.TXZ01, 
                 EKPO.WERKS, EKPO.EAN11, EKKO.EBELN, EKPO.EBELP, 
                 EKPO.PSTYP, EKKO.BSART, EKKO."/SOL/BESTNR_EX", 
                 EKPO.MENGE, EKPO.ELIKZ, EKPO.EREKZ
    FROM EKKO
    INNER JOIN EKPO ON EKKO.EBELN = EKPO.EBELN
  ENDEXEC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The solution is, to only quote the field, and not the table qualifier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks to all, especially Matt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Stephan Knecht&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 11:44:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173400#M1623475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T11:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173401#M1623476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I told you "around the field name" &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 09:48:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173401#M1623476</guid>
      <dc:creator>franois_henrotte</dc:creator>
      <dc:date>2011-08-31T09:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173402#M1623477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, but since the back quotes produced the same error as I had before I could not really fix my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 10:01:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-exec-sql/m-p/8173402#M1623477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-31T10:01:30Z</dc:date>
    </item>
  </channel>
</rss>

