Programme SAP RFKLET00 - Extract for the Accumulated Historical Balance Audit Trail

Description
Program RFKLET00 creates the extract (balance audit trail data set) forthe historical balance audit trail. Customer, vendor and G/L accountassignments are sorted and extracted according to the posting date.This data is stored on a UNIX file.
There are four types of processing.
Creating a data set for the first time.
Creating a data set periodically.
Reading data from the database and writing to several work files.
Archiving data records stored in the data set.

1. Creating a data set for the accumulated historical balance audit
trail for the first time.
When creating the data set for the first time with automatic selection,the program uses 1/1/1900 as the lower limit and the current date asthe upper limit. Data is read from the document and master recorddatabase or from the work file already created.

2. Creating a new extract by merging the old data set.
In this process, the program selects documents from the document fileor from the work file already created, merges them with the items inthe last data set, and outputs them to a new data set.
When creating another data set (generally periodically), the programuses the upper limit from the last run as the lower limit, and thecurrent date as the upper limit. Data from the prior run is then takenfrom the old data set which has values stored in the header record.With manual selection, the program uses the limits you enter on theselection screen. If several runs are made with manual selection, theprogram checks whether there are any gaps between the date of the lastrun and the date of the current run (for example, upper limit of thelast run is 05/31/1990, lower limit of the current run is 06/15/1990).If a gap is found, then the program replaces the lower limit with theupper limit from the last run (in the above example, the lower limit isinternally set to 05/31/1990).

3. Reading data from the database and writing to a work file
In this process, the program reads data from the database and stores iton one or more work files. Then when the programs are run later, thework file data is merged with the existing data set. N.B. Both historicand open item account balance audit trails use those same files whichare all opened by the system when work files are written.
This method is useful for large data volumes since the program has toread the database only once, and then it fills the various balanceaudit trial data sets, separated, for example, by account type orcompany code, with data from the created work files.

4. Archiving data records stored in the data set
When archiving, the program removes the required data records from thedata set. Both archiving and merging can be carried out in the samerun.

Output
Storage space requirement
The program stores records in compressed form in the data set, whichrequires around 250 bytes for each line item.

Precondition
Create two logical files for historical account balance audit trail(old dataset/new dataset) as well as logical files for the work files.
IF &DEVICE& = 'SCREEN'
Proceed
ENDIF
To output the extract stored on work files, you must define the workfiles. If necessary, check whether this requirement is met.
IF &DEVICE& = 'SCREEN'
Proceed
ENDIF
If postings are still being made during the program run and you specifythat the program should be run for up to the current date, you shouldsuppress the reconciliation, since the program reads documents firstand then transaction figures. Variances which should not exist couldthen result.

368817Expiring currencies reporting