Starting Payroll in the Test Mode 

In a test run, the database is not updated. Since the payroll results from the previous period are used as the basis for calculating the results of the following period, the results of the actual payroll run would differ from those of the test run, if this test run were executed over several periods.

The use of the buffer enables trouble-free access to the required results for the previous period.

What is required for exporting/importing data to/from the PCLn files using the buffer?

RPPPXD00

RPPPXD10

Include RPPPXD10 must be in the common part ‘BUFFER’ .

Include RPPPXM00, which contains the buffer management routines, is also required.

The macros for importing and exporting data must comply with the following naming convention:

 

Naming Convention for EXPORT/ IMPORT Macros:

RP-aaa-Cn-xy

where aaa = IMP / EXP, n=1 for PCL1, 2 for PCL2, 3 for PCL3, 4 or PCL4
and xy = cluster name.

This guarantees consistency between the export and import of data and also ensures that all exported objects are imported again.

 

Export Using the Data Buffer

When macros are used for exporting, records are written to a main memory buffer and not directly to the database. When the program run has been completed, the records in the buffer are stored in the appropriate PCLn database.

 

 

Import Using the Data Buffer

When the macros are used to import data, the data records are not read directly from file PCLn. Instead, the system checks the buffer directory to see whether the main memory already contains a record with the same key. If this is not the case, the record is read from PCLn to the buffer and then retrieved from the buffer for the report.

If the import is successful, the return code RP-IMP-xy-SUBRC = 0 is set. When data is read from the buffer, the system carries out a check for cluster authorization. Standard import programs follow the naming convention RPCLSTxy (xy = cluster name).

report rpttcdmg.

tables:

     pernr,

     pcl1,

     pcl2.

include rpppxd00.    "buffer definitions

     data: begin of common part 'BUFFER'.

     include rpppxd10. "PCLx buffer

     data: end of common part.

     data: begin of common part 'CLUSTER_DIRECTORY'.

     include rpc2cd00. " "cluster directory definitions

     data: end of common part.

include rpc2rdd0.

get pernr.

   rp-init-buffer. "reset buffer

   cd-key-pernr = pernr-pernr.

   rp-imp-c2-cd. "read cluster CD from

  buffer/DB

   perform cd_manager using ... .

* alternative: call function rp_evaluation_periods...

   ...

   rx-key-pernr = pernr-pernr.

   rx-key-seqno = rgdir-seqnr.

   rp-imp-c2-rd. "read cluster RD from

  buffer/DB

   ...

   rp-exp-c2-rd. "update cluster RD in buffer

   ...

   perform prepare_update using 'V'. "update database (DB)

*--------------------------------------------------------------------

* Subroutines CD manager and Cluster buffer

*--------------------------------------------------------------------

include rpcmgr00. "Cluster Directory Manager

include rpppxm00. "module pcl1(2)-buffer