<?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: Dereferencing in Native SQL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dereferencing-in-native-sql/m-p/1078030#M96914</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting, not sure if you can to Native SQL dynamically or not.  I know that you woud probably be able to generate a subroutine with the code in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Dec 2005 20:15:36 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2005-12-09T20:15:36Z</dc:date>
    <item>
      <title>Dereferencing in Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dereferencing-in-native-sql/m-p/1078029#M96913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to run a SQL command built from a variable, and I am receiving an error.  Is what I am trying to do not possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
EXEC SQL.
   :l_statement
ENDEXEC.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_statement contains a valid Oracle statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 20:12:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dereferencing-in-native-sql/m-p/1078029#M96913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-09T20:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dereferencing in Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dereferencing-in-native-sql/m-p/1078030#M96914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting, not sure if you can to Native SQL dynamically or not.  I know that you woud probably be able to generate a subroutine with the code in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 20:15:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dereferencing-in-native-sql/m-p/1078030#M96914</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-12-09T20:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dereferencing in Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dereferencing-in-native-sql/m-p/1078031#M96915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;EXEC SQL. 
  SELECT CLIENT, ARG1 INTO :F1, :F2 FROM AVERI_CLNT 
         WHERE ARG2 = :F3 
ENDEXEC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what kind of error you are getting....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 20:16:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dereferencing-in-native-sql/m-p/1078031#M96915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-09T20:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dereferencing in Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dereferencing-in-native-sql/m-p/1078032#M96916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example.  Just put your statement in the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report   zrich_0001  .


types: t_source(72).

data: routine(32) value 'TEMP_ROUTINE',
            program(8),
            message(128),
            line type i.
data: l_statement(50) type c value 'What Ever'.
data: isource type table of t_source,
            xsource type t_source.



xsource = 'REPORT ZTEMP_REPORT.'.
insert xsource  into isource index 1.
xsource = 'FORM &amp;amp;.'.
replace '&amp;amp;' with routine into xsource.
insert xsource  into isource index 2.


xsource = 'EXEC SQL.'.
append xsource to isource.
xsource = l_statement.
append xsource to isource.
xsource = 'ENDEXEC.'.
append xsource to isource.


xsource = 'ENDFORM.'.
append xsource to isource.

generate subroutine pool isource name program
                         message message
                         line line.
if sy-subrc = 0.
  perform (routine) in program (program).
else.
  write:/ message.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 20:21:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dereferencing-in-native-sql/m-p/1078032#M96916</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-12-09T20:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dereferencing in Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dereferencing-in-native-sql/m-p/1078033#M96917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Subroutine Calls Not Allowed in an ABAP Objects context.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are using in OO it won't work....&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EXEC SQL.
   :l_statement
ENDEXEC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;will fail...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 20:29:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dereferencing-in-native-sql/m-p/1078033#M96917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-09T20:29:35Z</dc:date>
    </item>
  </channel>
</rss>

