SAP Program RPR_UPDATE_TRAVEL_STATISTICS - Statistics Manager

Description
The report RPR_UPDATE_TRAVEL_STATISTICS is used to restructure andmaintain trip statistics.
In trip statistics, the most important data for a trip is updated indifferent transparent tables to make efficient reporting possible.
The following tables are currently updated:
PTRV_SHDR - Trip amounts such as amount paid by company,
reimbursement amount and total costs of trip
PTRV_SREC - Trip receipts with trip expense types and receipt
amounts in local and foreign currency
PTRV_SAAD - Additional receipt data such as reason for receipt,
business partner and location
PTRV_SCOS - Trip costs assignment

Options for executing the report:
Process backlog data
If, in Customizing of trip statistics, theoption: 'Create statistical data via batch program' was chosen, onlythe key information is saved in table PTRV_SBACKLOG when a trip issaved. This report processes the 'backlog data' in this table and setsup trip statistics for the corresponding trips. After the statisticshave been successfully set up, the data is deleted in tablePTRV_SBACKLOG. With a turnover of approximately 1000 - 2000 trips perday, this report should be executed every 6 hours. With a higher orlower turnover of trips, the interval can be adapted accordingly.
Set up statistical data
This option is used to create completely new statistical data. This isnecessary, for example, after a release change to 4.5A, to createstatistical data for all existing trips. For this purpose the reportshould definitely be executed using the matchcode ID's 'T' or 'S'. Fora database with approximately 350,000 trips, you can expect runtime tolast about 8 hours. To minimize runtime during setup, parallelprocessing of several variants of the report is advisable (for example,one variant per company code).
Delete statistical data
This should normally not be necessary, but can be used for purgeactions in the case of data inconsistencies.
Reorganize statistical data
Reorganization of statistical data should take place following thereorganization of 'regular' trip data. This program deletes thestatistical data of all archived trips.

List format
Overview
In the list, a line is created per personnel/trip number. This linecontains a message regarding the results of the update as well as thetotal amounts of the trip.
Detail
The output list has block format. The first output block is identicalwith the data that was output in the overview list. Three additionallist blocks follow with receipt data, additional receipt data and costdistribution data (if the relevant checkboxes were selected in theselection screen).
This display option should never be used for initial setup oftrip statistics, since it could result in bottlenecks in processing ofinternal tables.

Precondition
To set up statistical data the relevant update procedure must be chosenper trip provision variant in Trip Customizing.In the standard version, statistics are displayed in the dialog
To use the statistics manager you need authorization for object S_PROGRAM, with the settings:

  • Authorization Group ABAP/4-Program (P_GROUP) = STATMNGR

  • User Action ABAP/4 Program (P_ACTION) = SUBMIT
  • Further notes
    The 'DB commit after x data records' parameter is only relevant forprocessing of backlog data. It decides after how many processed datarecords the changes are permanently written to the database.

320758Termination in RPRTEC00 - SPOOL_TEMSE_ERROR