<?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: SQL TOOL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581959#M262528</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, there is no tool exactly like that, but you could probably write a utility program to do this quite easily.&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>Wed, 04 Oct 2006 21:49:46 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-10-04T21:49:46Z</dc:date>
    <item>
      <title>SQL TOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581958#M262527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any tool in SAP, where we can write plain SQL (open or native) against any transparant tables, without having to write ABAP code? Just for read-only, analysis/debugging purposes. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 21:47:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581958#M262527</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T21:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581959#M262528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, there is no tool exactly like that, but you could probably write a utility program to do this quite easily.&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>Wed, 04 Oct 2006 21:49:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581959#M262528</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-04T21:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581960#M262529</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;  If you want to do SQL analysis..Try Explain SQL in ST05..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 21:54:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581960#M262529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T21:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581961#M262530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here's a simple abap which may do the trick for you. It will dynamically run any abap statements you want but I usually use it to test out sql. The first parameter is expecting table names the others just raw abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's fine for a few lines of code but the messaging isn't perfect so any complexity would mean you're better off writing a new abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Neil Woodruff&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;REPORT ZNRW_sql_tool               MESSAGE-ID Z1.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_TABLE LIKE DD02L-TABNAME.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE1(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE2(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE3(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE4(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE5(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE6(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE7(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE8(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE9(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE10(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE11(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE12(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE13(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE14(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE15(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE16(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE17(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE18(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE19(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE20(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE21(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE22(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE23(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE24(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE25(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE26(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE27(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE28(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE29(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE30(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_CODE31(200) LOWER CASE.&lt;/P&gt;&lt;P&gt;DATA T_SOURCE_TAB(72) OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA G_PROGRAM_NAME LIKE SY-REPID.&lt;/P&gt;&lt;P&gt;DATA G_SYNTAX_MESSAGE(128).&lt;/P&gt;&lt;P&gt;DATA G_LINE_NO TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;PERFORM CHECK_DYNAMIC_ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;PERFORM DO_THE_BUSINESS IN PROGRAM (G_PROGRAM_NAME).&lt;/P&gt;&lt;P&gt;FORM CHECK_DYNAMIC_ABAP.&lt;/P&gt;&lt;P&gt;DATA  T_ABAP(80) OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;*set up a dynamic program&lt;/P&gt;&lt;P&gt;   REFRESH T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;   APPEND 'REPORT'                            TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;   APPEND SY-REPID                            TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;   APPEND '.'                                 TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;    APPEND 'tables:'                           TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;    APPEND P_TABLE                             TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;    APPEND '.'                                 TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;   APPEND 'DATA: begin of common part a,'             TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;   APPEND 'V_IN(5000),'            TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;   APPEND 'END OF COMMON PART.'     TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;   APPEND 'FORM do_the_business.'   TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;*macro to separate line's contents into table&lt;/P&gt;&lt;P&gt;DEFINE UNRAVEL.&lt;/P&gt;&lt;P&gt;   SPLIT &amp;amp;1 AT ' ' INTO TABLE T_ABAP.&lt;/P&gt;&lt;P&gt;   LOOP AT T_ABAP.&lt;/P&gt;&lt;P&gt;     SHIFT T_ABAP RIGHT BY 1 PLACES.&lt;/P&gt;&lt;P&gt;     APPEND T_ABAP TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;   ENDLOOP.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;CODE&amp;gt;.&lt;/P&gt;&lt;P&gt;DATA L_ABAP LIKE P_CODE1.&lt;/P&gt;&lt;P&gt;DATA L_FIELD_NAME(30).&lt;/P&gt;&lt;P&gt;DATA L_CHAR_INDEX(2).&lt;/P&gt;&lt;P&gt; DO.&lt;/P&gt;&lt;P&gt;   L_CHAR_INDEX = SY-INDEX.&lt;/P&gt;&lt;P&gt;   CONCATENATE 'P_code' L_CHAR_INDEX INTO L_FIELD_NAME.&lt;/P&gt;&lt;P&gt;   ASSIGN (L_FIELD_NAME) TO &amp;lt;CODE&amp;gt;.&lt;/P&gt;&lt;P&gt;   IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;     EXIT.&lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt;   UNRAVEL &amp;lt;CODE&amp;gt;.&lt;/P&gt;&lt;P&gt; ENDDO.&lt;/P&gt;&lt;P&gt;   APPEND '.' TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;   APPEND 'ENDFORM.'                          TO T_SOURCE_TAB.&lt;/P&gt;&lt;P&gt;*Generate the dynamic program so that the form can be used subsequently.&lt;/P&gt;&lt;P&gt;   GENERATE SUBROUTINE POOL T_SOURCE_TAB NAME G_PROGRAM_NAME&lt;/P&gt;&lt;P&gt;            MESSAGE G_SYNTAX_MESSAGE LINE G_LINE_NO.&lt;/P&gt;&lt;P&gt;   IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE E999 WITH G_SYNTAX_MESSAGE.&lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                         .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 02:48:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581961#M262530</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-10-05T02:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581962#M262531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neil, MAny thanks. I am really new to ABAP. So, this piece of code is not really simple for me &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; CAn you please explain, how would you use this to test SQL? SAy, I want to run a query such as SELECT BUKRS,COUNT(*) FROM BSEG GROUP BY BUKRS. Would I still need to declare the necessary internal tables and structures? If so, what's different here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 03:38:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581962#M262531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T03:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: SQL TOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581963#M262532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The sql you have is not 'open' so you may need to put exec sql stements in but basically you just put abap statements into the parameters.&lt;/P&gt;&lt;P&gt;eg,&lt;/P&gt;&lt;P&gt;Create the program by cutting and pasting via transaction se38.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run the program via se38.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the top parameter put: BSEG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the lines below put:&lt;/P&gt;&lt;P&gt;SELECT BUKRS FROM BSEG up to 10 rows. &lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;write:/ sy-dbcnt.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 03:55:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-tool/m-p/1581963#M262532</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-10-05T03:55:30Z</dc:date>
    </item>
  </channel>
</rss>

