<?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 find which function used a certain sql statement in which programm. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-which-function-used-a-certain-sql-statement-in-which-programm/m-p/8960026#M1694828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Arthur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can suggest you writing a so-called enhancement to the standard function module. In your custom code in the beginning of the function module you can check when certain parameter from the selection is missing, get the call stack of ABAP and store it in some log table.&lt;/P&gt;&lt;P&gt;When you have enough information you can deactivate the enhancement again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Yuri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Sep 2012 09:40:30 GMT</pubDate>
    <dc:creator>yuri_ziryukin</dc:creator>
    <dc:date>2012-09-05T09:40:30Z</dc:date>
    <item>
      <title>how to find which function used a certain sql statement in which programm.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-which-function-used-a-certain-sql-statement-in-which-programm/m-p/8960022#M1694824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the performance traces of st04 we find a certain sql statement performing very poorly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp; "HRP1001"&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;&amp;nbsp; "MANDT" = :A0 AND "PLVAR" = :A1 AND "OTJID" = :A2 AND "SUBTY" = :A3 AND&lt;/P&gt;&lt;P&gt;&amp;nbsp; "BEGDA" &amp;lt;= :A4 AND "ENDDA" &amp;gt;= :A5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compared to a lot of other sql statements on the hrp1001 that perform well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now I can find that this sql statement is used in &lt;/P&gt;&lt;P&gt;RH_BASE_READ_INFTY_1001 &lt;/P&gt;&lt;P&gt;which relates to HRIQ_READ_INFTY_1001&lt;/P&gt;&lt;P&gt;but this function is used a couple of hundred times in different locations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it somehow possible to find or to set a trace with this certain sql statement to find which programm has an incomplete call to this function ( the parameter istat is omitted in this case)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with st05 it is not possible since I can only filter on hrp1001 and the amount of selects is so huge that even within a second I can get no trace back anymore and get an &lt;/P&gt;&lt;H3&gt;File end of performance trace file detected -&amp;gt; See long text&lt;/H3&gt;&lt;P&gt;Meldingsnr. 0S161&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but even with st05 I will also get back all the other select statements on the hrp1001 which are performing perfectly&lt;/P&gt;&lt;P&gt;anybody got a clue of how to find where and in which situation a certain sql statement is called ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;Arthur de Smidt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 12:18:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-which-function-used-a-certain-sql-statement-in-which-programm/m-p/8960022#M1694824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-31T12:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to find which function used a certain sql statement in which programm.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-which-function-used-a-certain-sql-statement-in-which-programm/m-p/8960023#M1694825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it the "shared cursor cache" in ST04 you are looking at? You can drill down to the underlying ABAP code for any statement listed there, did you try that for your long running statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 12:25:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-which-function-used-a-certain-sql-statement-in-which-programm/m-p/8960023#M1694825</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2012-08-31T12:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to find which function used a certain sql statement in which programm.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-which-function-used-a-certain-sql-statement-in-which-programm/m-p/8960024#M1694826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yeps I have the statement and the abap code. but the it is a generic function which is used at a lot of different locations. now I want to find out how I can trace where the function is called with incomplete parameters. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 12:41:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-which-function-used-a-certain-sql-statement-in-which-programm/m-p/8960024#M1694826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-31T12:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to find which function used a certain sql statement in which programm.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-which-function-used-a-certain-sql-statement-in-which-programm/m-p/8960025#M1694827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;seems no answer possible to find the calling programm &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 08:44:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-which-function-used-a-certain-sql-statement-in-which-programm/m-p/8960025#M1694827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-09-05T08:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to find which function used a certain sql statement in which programm.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-which-function-used-a-certain-sql-statement-in-which-programm/m-p/8960026#M1694828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Arthur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can suggest you writing a so-called enhancement to the standard function module. In your custom code in the beginning of the function module you can check when certain parameter from the selection is missing, get the call stack of ABAP and store it in some log table.&lt;/P&gt;&lt;P&gt;When you have enough information you can deactivate the enhancement again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Yuri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 09:40:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-which-function-used-a-certain-sql-statement-in-which-programm/m-p/8960026#M1694828</guid>
      <dc:creator>yuri_ziryukin</dc:creator>
      <dc:date>2012-09-05T09:40:30Z</dc:date>
    </item>
  </channel>
</rss>

