Monday, April 5, 2010

How to retrieve data from transaction STAT

The STAT transaction is transaction for analyze the statistics by users or programs. These data is kept in the server as file. If we want to retrieve these data, we should apply function 'SAPWL_STATREC_READ_FILE'. this function will return the raw data. you can take these data to analyze or verify depend on your requirement.

Example

CALL FUNCTION 'SAPWL_STATREC_READ_FILE'
EXPORTING
READ_CLIENT = CLIENT
READ_END_DATE = ENDDATE
READ_END_TIME = ENDTIME
READ_START_DATE = STARTDATE
READ_START_TIME = STARTTIME
TABLES
V2_NORMAL_RECORDS = V2_NORMAL_RECORDS.


In above example, i want to retreive stat data by client, enddate, endtime, startdate and starttime. After i call this function, the retreived data will be returned in internal table V2_NORMAL_RECORDS.

No comments:

Post a Comment