<?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: Problem in working with Native SQL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840636#M44173</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;Check these links for information about Native SQL.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/34/8e73dc6df74873e10000009b38f9b8/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/en/34/8e73dc6df74873e10000009b38f9b8/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/exec.htm" target="test_blank"&gt;http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/exec.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jun 2005 09:06:33 GMT</pubDate>
    <dc:creator>jayanthi_jayaraman</dc:creator>
    <dc:date>2005-06-14T09:06:33Z</dc:date>
    <item>
      <title>Problem in working with Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840634#M44171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;      when i run the attached native sql query i have written in my program i get a dump error can anyone help me.&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;exec sql.&lt;/P&gt;&lt;P&gt;     select ( select bdmng from resb&lt;/P&gt;&lt;P&gt;                 where bdter = lk_wk1_1 )&lt;/P&gt;&lt;P&gt;            ( select bdmng from resb&lt;/P&gt;&lt;P&gt;                 where bdter = lk_wk2_1 )&lt;/P&gt;&lt;P&gt;            ( select bdmng from resb&lt;/P&gt;&lt;P&gt;                 where bdter = lk_wk3_1 )&lt;/P&gt;&lt;P&gt;            ( select bdmng from resb&lt;/P&gt;&lt;P&gt;                 where bdter = lk_wk4_1 )&lt;/P&gt;&lt;P&gt;            ( select bdmng from resb&lt;/P&gt;&lt;P&gt;                 where bdter = lk_wk5_1 )&lt;/P&gt;&lt;P&gt;            ( select bdmng from resb&lt;/P&gt;&lt;P&gt;                 where bdter = lk_wk6_1 )&lt;/P&gt;&lt;P&gt;            ( select bdmng from resb&lt;/P&gt;&lt;P&gt;                 where bdter = lk_wk7_1 )&lt;/P&gt;&lt;P&gt;            ( select bdmng from resb&lt;/P&gt;&lt;P&gt;                 where bdter = lk_wk8_1 )&lt;/P&gt;&lt;P&gt;            from resb&lt;/P&gt;&lt;P&gt;            into :l_powk1,:l_powk2,:l_powk3,:l_powk4,&lt;/P&gt;&lt;P&gt;                 :l_powk5,:l_powk6,:l_powk7,:l_powk8&lt;/P&gt;&lt;P&gt;            where BDART = 'F'&lt;/P&gt;&lt;P&gt;            and matnr eq it_mard-matnr&lt;/P&gt;&lt;P&gt;            and werks eq it_mard-werks&lt;/P&gt;&lt;P&gt;            and aufnr eq space.&lt;/P&gt;&lt;P&gt;endexec.&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;Guhapriyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2005 07:34:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840634#M44171</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-14T07:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in working with Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840635#M44172</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;As far I know,it's not possible to use as you told.&lt;/P&gt;&lt;P&gt;Moreover I think it_mard-matnr is internaltable-field.&lt;/P&gt;&lt;P&gt;I don't think you can use this here.If you want to join two database tables , you can use joins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exec sql.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bdmng into :l_powk1 from resb&lt;/P&gt;&lt;P&gt;where bdter = :lk_wk1_1&lt;/P&gt;&lt;P&gt;and BDART = 'F'&lt;/P&gt;&lt;P&gt;and aufnr eq space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bdmng into :l_powk2 from resb&lt;/P&gt;&lt;P&gt;where bdter = :lk_wk2_1&lt;/P&gt;&lt;P&gt;and BDART = 'F'&lt;/P&gt;&lt;P&gt;and aufnr eq space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endexec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;J.Jayanthi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jayanthi Jayaraman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2005 08:19:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840635#M44172</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-06-14T08:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in working with Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840636#M44173</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;Check these links for information about Native SQL.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/34/8e73dc6df74873e10000009b38f9b8/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/en/34/8e73dc6df74873e10000009b38f9b8/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/exec.htm" target="test_blank"&gt;http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/exec.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2005 09:06:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840636#M44173</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-06-14T09:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in working with Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840637#M44174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Guhapriyan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EXEC SQL.

    SELECT
    ...
    AND AUFNR EQ SPACE
 
ENDEXEC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't use the "." at the end of native query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck, Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 12:28:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840637#M44174</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T12:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in working with Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840638#M44175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to place a semi-column before all variables that come from ABAP,&lt;/P&gt;&lt;P&gt;input as well as output :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exec sql.&lt;/P&gt;&lt;P&gt;select ( select bdmng from resb&lt;/P&gt;&lt;P&gt;where bdter = &amp;lt;b&amp;gt;:lk_wk1_1&amp;lt;/b&amp;gt; )&lt;/P&gt;&lt;P&gt;( select bdmng from resb&lt;/P&gt;&lt;P&gt;where bdter = &amp;lt;b&amp;gt;:lk_wk2_1&amp;lt;/b&amp;gt; )&lt;/P&gt;&lt;P&gt;( select bdmng from resb&lt;/P&gt;&lt;P&gt;where bdter = &amp;lt;b&amp;gt;:lk_wk3_1&amp;lt;/b&amp;gt; )&lt;/P&gt;&lt;P&gt;( select bdmng from resb&lt;/P&gt;&lt;P&gt;where bdter = &amp;lt;b&amp;gt;:lk_wk4_1&amp;lt;/b&amp;gt; )&lt;/P&gt;&lt;P&gt;( select bdmng from resb&lt;/P&gt;&lt;P&gt;where bdter = &amp;lt;b&amp;gt;:lk_wk5_1&amp;lt;/b&amp;gt; )&lt;/P&gt;&lt;P&gt;( select bdmng from resb&lt;/P&gt;&lt;P&gt;where bdter = &amp;lt;b&amp;gt;:lk_wk6_1&amp;lt;/b&amp;gt; )&lt;/P&gt;&lt;P&gt;( select bdmng from resb&lt;/P&gt;&lt;P&gt;where bdter = &amp;lt;b&amp;gt;:lk_wk7_1&amp;lt;/b&amp;gt; )&lt;/P&gt;&lt;P&gt;( select bdmng from resb&lt;/P&gt;&lt;P&gt;where bdter = &amp;lt;b&amp;gt;:lk_wk8_1&amp;lt;/b&amp;gt; )&lt;/P&gt;&lt;P&gt;from resb&lt;/P&gt;&lt;P&gt;into :l_powk1,:l_powk2,:l_powk3,:l_powk4,&lt;/P&gt;&lt;P&gt;:l_powk5,:l_powk6,:l_powk7,:l_powk8&lt;/P&gt;&lt;P&gt;where BDART = 'F'&lt;/P&gt;&lt;P&gt;and matnr eq &amp;lt;b&amp;gt;:it_mard-matnr&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;and werks eq &amp;lt;b&amp;gt;:it_mard-werks&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;and aufnr eq space.&lt;/P&gt;&lt;P&gt;endexec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides, you should check that "space" is a valid constant&lt;/P&gt;&lt;P&gt;in your DB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 13:11:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840638#M44175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T13:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in working with Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840639#M44176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the little mistake. I feel confident you understood I was meaning :&lt;/P&gt;&lt;P&gt;colon, and not semi-colon...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 14:03:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-working-with-native-sql/m-p/840639#M44176</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T14:03:41Z</dc:date>
    </item>
  </channel>
</rss>

