Application Development and Automation 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: 
Read only

When was a program/ transaction last run?

Former Member
0 Likes
4,836

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
Read only

Former Member
0 Likes
1,282

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).

Read only

0 Likes
1,282

John,

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

Regards

KB

Read only

0 Likes
1,282

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

Read only

Former Member
0 Likes
1,282

Check this tcode

STAT

Read only

Former Member
0 Likes
1,282

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

Read only

0 Likes
1,282

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

Read only

Private_Member_17805
Participant
0 Likes
1,282

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

Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,282

SPAU tcode also may help u.

STAT too check