All the appraisal templates can be accessed via PHAP_CATALOG transaction. Every template has a common kind of structure which have some unique element ids.
Each template has a unique id called VA element. Then Every VA element can have multiple VB elements. VB elements can also have multiple VB or multiple VC directly attached to it or also can be assigned dynamically while updating the data.
Now to read some specific element data and then update or change, there a procedure. Actually as these template is based on VA, VB, VC elements which are nothing some unique numbers only we can read those specific elements by hard coding their values in our code. To read the specific element id you can follow the below steps.
1) Read table T_BODY_COLUMNS and find out the specific column_iid for the actor or action.
READ TABLE t_body_columns INTO lwa_body_column WITH KEY column_id = ‘Hard code the value’.
2) a) Now read the T_BODY_ELEMENTS table with specific VB
READ TABLE t_body_elements INTO lwa_body_element
WITH KEY element_type = ‘VB’
element_id =’ELEMENT ID’.
b) Now read VC of that VB
READ TABLE t_body_elements INTO lwa_body_data WITH KEY parent = lwa_body_element–row_iid
element_type = ‘VC’.
Here ROW_IID of VB is the PARENT of all its child VC.
3) Now to read the rating or proficiency data read table t_body_cells with the column_iid from step 1 and with row_iid from step 2(b)
READ TABLE t_body_cells INTO lwa_body_cells WITH KEY row_iid = from step 2(b)
column_iid = from step1
Now in this lwa_body_cells structure you will get the value in VALUE_NUM and VALUE_TEXT field. As per your requirement you can update or delete some data and then modify the data back to t_body_cells with respected index no.
4) Similar to step 3 you can read the comment data from T_BODY_CELL_NOTES table.
After doing all the update or change in template you have to call the below Fm to update the template with new changes.
HRHAP_DOCUMENT_MODIFY or HRHAP_DOCUMENT_CHANGE_STATUS.
You can use any one of them. They will directly update the data to template. If any issue happen during updating that will return by return table, similar to BAPI function modules.