Skip to Content
0
Aug 23, 2023 at 10:15 AM

ABAP SQL Monitor - Request entry point is "driving" SQL statements

136 Views Last edit Aug 24, 2023 at 02:24 AM 2 rev

Dear SAP community,

I was looking for some document describing usage of SQL monitor. I have found out lots of information on blog here , but still i have some unanswered questions.

In SAP Note 3242700, there should be a link to some best practices document, but the URL is pointing to "Content unavailable".

So for my question, firstly we have to understand this information:

In the context of the SQL Monitor the term “request entry point” is used to describe one of two things:

  • A process that is initiated directly by a user such as calling a transaction, requesting a URL or executing a report.
  • A process triggered from the outside of the system such as a remote function call.

Lets enter SQL Monitor >

In this view, aggregation by request:

image.png

Question 1: I can see that Y0CS_RET_LUK is having value 4 in column "DB Statements", which should mean that this Request Entry Point (type Batch Job) was executing 4 different SQL statements - right?

image.png

Question 2: Going through the drilldown (clicking on value 4), i can see that Y0CS_RET_LUK was ?executing? / ?has relevant? 4 different SQL statements (I assume that "ABAP Source Code Fragment" is the exact SQL statement that is being executed by relevant Request Entry Point.):

image.png

What is the difference between Y0FC_BNT and Y0CS_RET_LUK, how are they relevant? Those are two different objects. The confusion got worse when i have created SWLT report:

image.png

Static check Findings (lower right part) is reporting an issue in SELECT for FORM OBJNUM_GET_FOR_S which is part of SAPLY0FC_BNT (object Y0FC_BNT).

In SQL Monitor Results (lower left part), i can see a list of Request Entry Points, and Y0CS_RET_LUK is on first place, with the SQL:

"SELECT VKONT INTO TABLE LT_VKONT FROM FKKVKP WHERE GPART EQ IV_GPART AND STDBK IN LR_BUKRS." - This SQL is in SQL monitor relevant to Y0FC_BNT. After analyzing the code of Y0CS_RET_LUK, this SQL is not being executed. Y0CS_RET_LUK is not using Y0FC_BNT object or include LY0FC_BNTU04.

Question 3: So what is the recommendation of this SWLT run and how to interpret it?

If we use the Static check findings and we optimize the SQL as recommended here:

image.pngWhat would be the outcome ? From my confused point of view, we would optimize SAPLY0FC_BNT, not Y0CS_RET_LUK performance. So how is this optimization relevant to Y0CS_RET_LUK and all the other request entry points? How are all those request entry points related to SQL "SELECT VKONT INTO TABLE LT_VKONT...." ?

image.png

Does it mean that during execution of Y0CS_RET_LUK, it somehow executes this SQL statement even if its not part of the ABAP code of this specific report/job? ..

Best Regards

Attachments

image.png (51.1 kB)
image.png (12.4 kB)
image.png (26.8 kB)
image.png (179.9 kB)
image.png (107.2 kB)
image.png (21.1 kB)
image.png (19.2 kB)
image.png (56.8 kB)