While going thru the forums to answer some questions about OSA I stumbled on a question about our data model. The question made sense; where is the document data stored, and why in such a structuring.
Well, before I go in detail on the where I while first answer the why question. The old appraisal module stored the document data in infotypes that created a huge number of entries in a few tables which made for imperformant reads.
With the design of the AES-engine we already envisioned other applications besides OSA using the appraisal engine. This would mean that there would be an even bigger mass of documents created as before. As such that made performance one of the top issues. Currently there are 4 applications using the appraisal engine; that being OSA (Performance Management), LSO (Learning Solution), E-Recruitement and EIC (Employee Interaction Centre).
The data structure of a document consists out of two parts.
- The header which contains all the necessary administrative data of the document. Things like who or what is being appraised, by whom and for which time period are just a few of the possible options.
- The document body. In here the actual appraisal takes place. The elements (objectives, questions etc) are in here, but also the different ratings from each participant. Even automatically generated data is filled out in here.
The main identifier is always the appraisal ID. This is a GUID32 and is stored in the HRHAP table. With this key you can uniquely identify a document, and the ID is used always as a pointer in the rest of our tables. Besides the ID also all the appraisal dates are stored in the HRHAP table. The appraisal document can have a title and this is stored in the HRHAP_T.
An appraisal is always performed on someone/something (the appraisee). Appraisee data is stored in the HRHAP_APPEE table. The main object/person appraising the appraisee (the appraiser) is stored in HRHAP_APPER. Besides a mandatory appraisee and an appraiser you can have part appraisers. They are stored in HRHAP_P_APPER. And finally all other participants are stored in HRHAP_OTHERS.
The above mentioned tables make up the document header. The main body table is the HRHAP_BASIC, this table contains all the elements available in the appraisal document. Each element consists out of one or more columns and the entered values and/or notes (exception can be the criterion group element which can be empty).
We store the column data in groups. All the objective setting data (all the columns with technical name OBJ* or QBJ*) is stored in the HRHAP_OBJECT table. The final appraisal data (column FWGT and FAPP) is stored in HRHAP_FINAL and the part appraisal data (column PAPP and PWGT) in HRHAP_PART. All other columns, be it standard delivered or customer specific, are stored in HRHAP_FURTHER. All the notes belong to the document are stored in the SAPScript tables.
That leaves us with the last 3 tables in which document data is stored. The HRHAP_ACT_LOG contains additional data that belongs to the action log. In the HRHAP_PROCESS all the follow-up process are registered when they are performed. And finally the HRHAP_ANON, this table contains the information whether a user is allowed to perform the appraisal in cause of a non-named template mode. When it is an anonymous document the HRHAP_APPER stays empty and the changed by information in the HRHAP table is left blank.
In the picture below you can see the above in a nice graphical overview. There are several other HRHAP* tables besides the ones mentioned here, however these tables don't belong to the document directly. They are used in a process supporting role.

This concludes the quick overview of the data model for an appraisal document. One recommendation, do not read directly from the database tables when you can avoid it. Use the function module HRHAP_DOCUMENT_GET_DETAIL instead. Reading directly can give invalid values from a process point of view, especially if the document hasn't been completed yet.