Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Finding callers of function module in the workload

Rudi_Wiesmayr
Active Participant
0 Kudos

Servus from Austria!

I have the following problem:

  • As a DBA i see an SQL Statement which is called very frequently in the DBACockpit's hit list.
    Very means: 50 to 200 calls per SECOND (from 1500 users)
  • The SELECT is easy to analyze and it runs very fast.
  • Due to the high call frequency this Statement makes it into the high consumers of DB resources.
  • So the question has to be answered: Is this high call frequency OK or is it a symptom of a coding Problem?
  • The DBACockpit leads me easily into the ABAP code, so the function module (or whatever unit it may be) is found quickly.
  • This unit has e.g. 2000 callers - this also can be found easily.
  • But: Which of this 2000 make the load in my system?

Debugging and static code Analysis cannot answer this question.

So my question to the trace professionals is:

Which of the ABAP tools can produce a trace which shows me:

  • every call of the unit specified
  • for every user on the System (or Server)
  • with the calling program (or better callstack)

Who can help?

1 ACCEPTED SOLUTION

former_member195402
Active Contributor
0 Kudos

Hi Rudolf,

you can try to use BADI WORKLOAD_STATISTIC for that. See SAP note 931446 and its attachments.

For example we are logging incoming and outgoing RFC function module calls into custom db tables from an implementation of this badi.

Regards,

Klaus

5 REPLIES 5

guilherme_frisoni
Contributor
0 Kudos

Hi Rudolf,

you can activate a SQL Trace in ST01 transaction.

After deactivate, search your table in results and double click for details. You will notice an icon to navigato to source code.

This trace log by user, but its layout is not friendly, so you need to check one by one.

Regards,

Frisoni

0 Kudos

Thanks, Guilherme, for your answer.  But it does not answer my question ...

I already KNOW the location in the ABAP code.

The question is to find the actual callers at runtime, because in the code there are too many.

Kind regards, Rudi

former_member195402
Active Contributor
0 Kudos

Hi Rudolf,

you can try to use BADI WORKLOAD_STATISTIC for that. See SAP note 931446 and its attachments.

For example we are logging incoming and outgoing RFC function module calls into custom db tables from an implementation of this badi.

Regards,

Klaus

0 Kudos

Servus Klaus!

Sounds interesting, but AFAIK the statistics only record complete dialog steps.

So your RFC logging works.

What I need is to capture every call of a certain function module with the ABAP call stack.

There is a call stack trace option in the ST05 traces. And SAT also shows some info about the callers ...

But either i am not (yet) able to read the SAT trace right or SAT is the wrong tool ...

Kind regards, Rudi

0 Kudos

Hi Rudi,

neither ST05 nor SAT are the right tools for your issue, and both are performance killers.

The WORKLOAD_STATISTIC BADI offers tons of data in lots of tables, and it might be tricky to get the needed ones, but you can give it a try.

For this sounds interesting; I will sometimes try to create my own fm call statistic table with a new implementation of this BADI, if I will have the time to do this.

At the moment we have two custom implementations:

  • Creation of a call statistic table of custom reports with a counter for each month and last caller name.
  • Creation of two  RFC statistic tables for incoming and outgoing RFC calls with counter for each month, partner systems ...

The workload statistics are available as well for dialogue, batch and rfc,

Regards,

Klaus