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: 

find out when a program has been run

MariaJoãoRocha
Contributor
0 Kudos

Hi,

To find out when a program has been run, I've developed a z program that uses FM SAPWL_STATREC_READ_FILE.

However sometimes, the FM can't read the log file, and also I've known that a program was executed but it isn't on the tables return by the SAPWL_STATREC_READ_FILE.

Can you help?

Regards,

Maria João Rocha

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

The STAT file is refreshed periodically (or more correctly, when its size limit is reached). Due to performance reason, this has to be so. Which means, the FM is going to give you only a limited history data (maybe a few hours, maybe a few days; depending on when the last file refresh happened).

You can influence it a bit by increasing the file size but it will have a performance impact on the system (and your program will also take longer to read a larger file).

If you are interested in keeping the statistics, you may wish to create a Z table, and periodically run a report in a batch job (say every few hours), this report should update the data from the file to this table (ensuring no duplicate records are inserted and so on). You can then do the reporting on this Z table. This will not be a full-proof option, but may do. (For a full proof option, you will have to replicate SAP's statistics recording functionality or tweak it to update Z table).

cheers,

4 REPLIES 4

Former Member
0 Kudos

Hi,

The STAT file is refreshed periodically (or more correctly, when its size limit is reached). Due to performance reason, this has to be so. Which means, the FM is going to give you only a limited history data (maybe a few hours, maybe a few days; depending on when the last file refresh happened).

You can influence it a bit by increasing the file size but it will have a performance impact on the system (and your program will also take longer to read a larger file).

If you are interested in keeping the statistics, you may wish to create a Z table, and periodically run a report in a batch job (say every few hours), this report should update the data from the file to this table (ensuring no duplicate records are inserted and so on). You can then do the reporting on this Z table. This will not be a full-proof option, but may do. (For a full proof option, you will have to replicate SAP's statistics recording functionality or tweak it to update Z table).

cheers,

0 Kudos

Thanks,

What do you mean by refreshed - is it deleted? I thought that the stat file is rewrite.

Just tell me if there are any other circumstances that clears the file: a rebot, etc...

Reagards,

Maria João Rocha

0 Kudos

As I understand, the file is deleted (and recreated) if it reaches the size specified in the parameter settings

Following is an excerpt from help (do a search on 'statfile' in the help documentation..)

"<b>Options for reorganizing statistical data (for all servers)</b>

Delete seq. statfile after cumulation if size > (default: 100Mb).

This parameter specifies from what file size the system should delete the statistics file. The statistics file is required for individual statistics and is therefore not deleted until the file size has passed a specified maximum file size. Of course, the file is only deleted if it was completely processed by RSSTAT80 or RSSTAT83 ..

Max. no. of records cumulated per call (default: 20.000).

This is the maximum number of entries in the statistics file that can be processed by RSSTAT80 or RSSTAT83 in one session. This parameter is used to restrict the runtime of the collector.

Options for reorg of application statistic data (valid for all servers)

<b>Delete appl. statfile after cumulation if size > (default: 30Mb).</b>

This parameter specifies from what size the system should delete the application statistics file. Of course, the file is only deleted if it was completely processed by RSSTAT88 or RSSTAT89 .

Max. number of records cumulated per call (default: 20.000).

This is the maximum number of entries in the application statistics file that can be processed by RSSTAT80 or RSSTAT83 in one session. This parameter is used to restrict the runtime of the collector."

0 Kudos

Thanks,

According to the Application Development Expert Matthew Billingham on the searchsap.techtarget.com:

In R/3 Enterprise release 4.7 and beyond, you can use the ABAP Coverage Analyzer.

Until then I must deal with the reboots and the STAT file size.

Thanks,

Maria João Rocha