‎2012 Aug 31 1:18 PM
in the performance traces of st04 we find a certain sql statement performing very poorly.
SELECT
*
FROM
"HRP1001"
WHERE
"MANDT" = :A0 AND "PLVAR" = :A1 AND "OTJID" = :A2 AND "SUBTY" = :A3 AND
"BEGDA" <= :A4 AND "ENDDA" >= :A5
compared to a lot of other sql statements on the hrp1001 that perform well.
now I can find that this sql statement is used in
RH_BASE_READ_INFTY_1001
which relates to HRIQ_READ_INFTY_1001
but this function is used a couple of hundred times in different locations.
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)
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
Meldingsnr. 0S161
but even with st05 I will also get back all the other select statements on the hrp1001 which are performing perfectly
anybody got a clue of how to find where and in which situation a certain sql statement is called ?
kind regards
Arthur de Smidt
‎2012 Aug 31 1:25 PM
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?
Thomas
‎2012 Aug 31 1:41 PM
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.
‎2012 Sep 05 9:44 AM
seems no answer possible to find the calling programm
‎2012 Sep 05 10:40 AM
Hello Arthur,
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.
When you have enough information you can deactivate the enhancement again.
Regards,
Yuri