<?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: How to write your own SQL statement and execute it? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943101#M63575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kishan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try sq01 resp. sq02 and have a look here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb4138455611d189710000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb4138455611d189710000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jul 2005 05:43:17 GMT</pubDate>
    <dc:creator>andreas_mann3</dc:creator>
    <dc:date>2005-07-07T05:43:17Z</dc:date>
    <item>
      <title>How to write your own SQL statement and execute it?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943099#M63573</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;Is there a Transaction Code that could be used to write your own SQL query and execute. The QuickViewer is a graphical query designer and is not flexible for advance query design. You could also write your query in a ABAP program and execute it but this take time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls give me various methods that are available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kishan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2005 04:20:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943099#M63573</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-07T04:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to write your own SQL statement and execute it?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943100#M63574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kishan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I know, there's no transaction that would let you do it directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have these two options which may be somewhat helpful - &lt;/P&gt;&lt;P&gt;1. ST05 - There's an option to &amp;lt;i&amp;gt;Explain one SQL Request&amp;lt;/i&amp;gt;. Through this option you can find out the number of records that will be retrieved and other details. You will not get the resut, however. This transaction will help you write better SQL queries in terma of performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If you are looking for data from only a single table, you can use the SE16 transaction. You specify the table name and give the conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2005 04:26:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943100#M63574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-07T04:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to write your own SQL statement and execute it?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943101#M63575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kishan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try sq01 resp. sq02 and have a look here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb4138455611d189710000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb4138455611d189710000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2005 05:43:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943101#M63575</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2005-07-07T05:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to write your own SQL statement and execute it?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943102#M63576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kishan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you execute &lt;/P&gt;&lt;P&gt;- a SELECT-Statement, then see the answer from andrea (SQ01 and SQ02)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;- a any Statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then see&lt;/P&gt;&lt;P&gt;- EXEC SQL&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;- use the class CL CL_SQL_STATEMENT. An example is the abap ADBC_DEMO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sven&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2005 05:53:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943102#M63576</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-07T05:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to write your own SQL statement and execute it?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943103#M63577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;n order to create an ABAP query , one has to do the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Create an User group.&lt;/P&gt;&lt;P&gt;2.	Create a Functional Area&lt;/P&gt;&lt;P&gt;3.	Assign the User group to the Functional Area&lt;/P&gt;&lt;P&gt;4.	Create the query based on the functional area created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create or execute these, using the transactions below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQ01 for Query&lt;/P&gt;&lt;P&gt;SQ02 for Functional Area.&lt;/P&gt;&lt;P&gt;SQ03 for User Group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First Step is to create a dictionary structure . Include all the fields in this structure that you want to output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create a report program having the following structure .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report XXX .&lt;/P&gt;&lt;P&gt;TABLES tab . Declare the already created dictionary structure also here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters x . Define parameters here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select-Options:&amp;#133;&amp;#133;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :&amp;#133;..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN  OF itab OCCURS xxx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               END OF itab. Structure tab to hold the records to be evaluated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;lt;Query_head&amp;gt; This comment must always appear after your data declarations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Code to define the table itab&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Loop to retrieve each record and place it in itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT,DO, LOOP ,&amp;#133;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If necessary , code to format data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;lt;Query_body&amp;gt; This comment must always be the last statement in the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End of loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT , ENDDO, ENDLOOP ,&amp;#133;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get back to me if u need the document for doing so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Judith.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2005 06:06:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943103#M63577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-07T06:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to write your own SQL statement and execute it?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943104#M63578</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 this link.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ab4query.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ab4query.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2005 07:24:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943104#M63578</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-07-07T07:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to write your own SQL statement and execute it?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943105#M63579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use DBACOCKPIT choose Diagnostics and SQL Commands&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 12:03:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943105#M63579</guid>
      <dc:creator>soren_hansen</dc:creator>
      <dc:date>2009-06-10T12:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to write your own SQL statement and execute it?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943106#M63580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You waited five years after registration in order to post your first reply to a four year old thread?&lt;/P&gt;&lt;P&gt;I'm puzzled &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 12:29:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-your-own-sql-statement-and-execute-it/m-p/943106#M63580</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-06-10T12:29:22Z</dc:date>
    </item>
  </channel>
</rss>

