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: 

When was a program/ transaction last run?

Former Member
0 Kudos

I have been asked if it is possible to determine when an ABAP program or SAP transaction was last run. Does anyone know if this information is held on the system and if so where?

8 REPLIES 8

Former Member
0 Kudos

Kevin;

That data is stored in a statistics file. To get to it, try using function module SAPWL_STATREC_READ_FILE. Before calling the function, you will need to get the path of the statistics file, and to do that try this:

CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'stat/file'

ID 'VALUE' FIELD WS_PATH.

You will need to use WS_PATH on the STATISTIC_FILE exporting parameter on the call to SAPWL_STATREC_READ_FILE. You should get the data back in the V2 records (releases over 4.0) and in V1 (releases < 4.0).

0 Kudos

John,

Many thanks for your reply. I'll give it a go!

Regards

KB

0 Kudos

I was wondering which function I should use

I am trying to use SAPWL_STATREC_READ_FILE on UNIX and it fails in the same time

I am running the same code on windows and it receives the information.

Can you help me figure out why do I get exception WRONG_PARAMETER_COMBINATION?

While it seems that my information is acceptable on windows

I am using 47 App servers

This code used to work against 46c

10x

Assaf

Former Member
0 Kudos

Check this tcode

STAT

Former Member
0 Kudos

The only issue with STAT is that this file is overwritten from time to time depending on the transaction volume your system has.

0 Kudos

How can we configure our system, so that the file can be overwritten after desired period of time.

Private_Member_17805
Participant
0 Kudos

If your TRACE is switched on (ST05) you will be able to list out the transactions and programs that gets executed.

hymavathi_oruganti
Active Contributor
0 Kudos

SPAU tcode also may help u.

STAT too check