Example: Recording Attendances for Human Resources 

An employee, David Andersen, records eight attendance hours for last Thursday and for last Friday. His data entry profile determines that he does not have to release her data in a separate step. As soon as David has saved the data, it is made available to his superior, Joy Flanders, for approval.

Joy approves the recorded data the same day. Every evening, attendance and absence data recorded in the time sheet is transferred to Human Resources. This means that the next day both records have already been transferred. David Andersen notices, however, that he recorded one hour too few for Friday. He changes the record for Friday to nine hours. He informs his superior, who then approves the changed record.

That evening, the time sheet data is transferred to Human Resources as usual. However, David’s changed record cannot be transferred because his payroll area is locked during the transfer. The next morning, the data records that could not be posted to Human Resources are transferred again. This time, David’s record is transferred successfully.

Processes in the tables

The above example is represented in the database table for the Time Sheet CATSDB as follows:

David Andersen records eight hours for Thursday and for Friday. He does not have to release the data in a separate step, which means that when he saves the data, the system assigns it the processing status 20 (Released for approval) and writes it to CATSDB.

As soon as Joy Flanders approves the recorded data, it is assigned the processing status 30 (Approved). As soon as a record has the processing status 30 (Approved), the system assigns it a document number. To make the example clearer, the document number is not shown in its full 12-digit form (as in table CATSDB).

David Andersen now changes the data record from Friday, which has already been approved. You can recognize a record that has already been approved by its processing status and reference counter. The original record (in this example, the record from Friday with eight hours, counter 5001, and document number 501) is assigned the processing status 50 (Changed after approval). At the same time, the system creates a new record with the following specifications: Nine hours, status 20, counter 5002, and reference counter 5001. The reference counter forms the link with the original record. Once the changed record has been approved, the original record is assigned the processing status 60 ( Canceled) and the new record the processing status 30 (Approved) and a document number (502).

Transferring data to a target component has no effect on the dataset of table CATSDB.

Now we want to know what has happened in the interface table for attendances/absences (PTEX2000) during these processes. This is represented in the graphic below:

In this example, David Andersen has recorded two attendances. He entered an attendance type as a working time attribute for the working hours. Based on this working time attribute, the system determines that the recorded data is relevant for the Human Resources interface table.

Once Joy Flanders has approved the recorded attendances, the system writes them to the interface table PTEX2000. In the interface table PTEX2000, the Object key field (AWKEY) is used to form a link with the record of table CATSDB, because the object key corresponds to the document number in CATSDB.

After the data has been transferred successfully, the system assigns two further statuses. Based on these statuses, you can see whether the transfer was successful or, if errors occurred, what type of errors they were. In this example, the initial transfer was successful, an error occurred during the second, and the third was again successful.

For more information, see: The Interface Tables for the Time Sheet

If a record has been changed after approval, the interface table PTEX2000 contains three records for the changed record: The original record without the cancelation indicator, the original record with the cancelation indicator, and the new record. The cancelation indicator enables the system to recognize that both original records cancel each other out. Since the original record had already been transferred, the system also transfers the original record with the cancelation indicator during the next transfer, so that the original records cancel each other out in Human Resources. If the original record had not yet been transferred, both original records would remain in the interface table and neither would be transferred to Human Resources.

A directory table exists in addition to the two Human Resources interface tables. In this example, the following information is stored in this table:

The system stores the approved attendance data in table PTEXDIR, as for PTEX2000. This table also contains an object key (AWKEY), which corresponds to the document number in table CATSDB and forms the link with the record in CATSDB.

For more information, see: The Interface Tables for the Time Sheet.

After the data has been transferred, the system writes the following records to the Attendances infotype (table PA2002):

As the graphic shows, this table also contains a link to table CATSDB: The CATSDB document number is stored as the reference document in table PA2002. At the same time, the reference document in table PA2002 corresponds to the object key in the Human Resources interface table.

In this example, the original record from Friday remains in table PA2002 until the changed record has been posted in Human Resources during the repeat transfer.

The original record is then deleted from table PA2002 because, during the repeat transfer, the original record is transferred with the cancelation indicator. The cancelation indicator enables the system to recognize that the original record must be deleted. The new record is then stored in its place. If the change to the record had been a cancelation, there would now no longer be a record stored in table PA2002 for that Friday.