cancel
Showing results for 
Search instead for 
Did you mean: 

Stored Procedures

Former Member
0 Kudos

Is there a way to find witch storage procedures an abap (standard or not)

program will use ??

I think the SAP system, create them to cache and use them after...

is this right ?

Thank you .

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Just to understand how do Sap "build" stored procedures...

example:

In SE16 my query spends 2 seconds

In SQL Query analizer spends 1 minute

In my ABAP program the same query spends the same 1 minute.

<u>BUT:</u>

If i force SQL Query analizer to use other index ( the best one )

"select....<b>WITH(INDEX=NN)</b>..." i get 2 seconds!!!

the question is simple:

-the stored procedures exist to help the system work faster...

-when they are reevalueted ? (if i can say this...)

-how they are buid...

Cheers.

Former Member
0 Kudos

Hi Tiago,

if you think that the optimizer chooses the wrong SP, try one of the following:

- update statistics for the specific table, or

- use sp_recompile to create new SPs for that table

Regards,

Sven

Former Member
0 Kudos

Hello,

this is an interesting question. There is no simple way of getting a complete list of stored procedures, an ABAP program will call. The best you can do is to trace the program execution with ST05. Alternatively, you could use the SQL Server Profiler Trace and filter on the SPIDs corresponding to your ABAP work process. Both traces will only show the SQL statements actually executed. You will not see any statements, which might get executed if you use different program parameters.

SAP kernel 46D and older kernels use permanent stored procedure for all "simple" static SQL statements, and temporary stored procedures for statements with variable text (like FOR ALL ENTRIES). Kernels 620 and 640 use permanent stored procedures for simple, static statements, but they no longer use temporary stored procedures. 700 kernels do not use automatically created stored procedures at all.

Why do you want to find out, which stored procs are called by a particular ABAP program?

Best regards,

Christian