on 07-07-2012 2:57 PM
Hi All,
I have a certain requirement in which the KRA'S entered in the appraisal template needs to be displayed and shown in a report.
For this I am unable to get the table which stores the text of the KRA.
Can anyone help me on this.Is there a BAPI or FM available which van give this output?
Thanks & regards,
Rijuraj
Hi Jyothi,Puneet,
Thanks for your detailed replies.But my requirement was a little different.
I wanted to get the text of the entered KRA and not the cell values under each column.
Ex : Under an appraisal template named : 'Performance Appraisal 2012', if I have created 2 KRA's viz
1. Goals achieved
2. Sales Target achieved.
Its these texts which I wanted to fetch.
I have found out the solution.Its to use the tables HRP1000 and HRP1001 iteratively from the appraisal template level to the criterion level(my KRA level).
My code snippet is as below....
**--fetch all the criteria group under the appraisal template
SELECT * FROM hrp1001
INTO CORRESPONDING FIELDS OF TABLE lt_criterion
WHERE otype = 'VB' AND
plvar = '01' AND
sclas = 'VA' AND
sobid = " Appraisal template ID from selection screen"
LOOP AT lt_criterion INTO ls_criterion.
MOVE ls_criterion-objid TO ls_criterion-lv_objid." for data length matching
MODIFY lt_criterion FROM ls_criterion INDEX sy-tabix TRANSPORTING lv_objid.
ENDLOOP.
**--fetch all the criterion under the criteria group
IF lt_criterion IS NOT INITIAL.
SELECT * FROM hrp1001
INTO CORRESPONDING FIELDS OF TABLE lt_hrp1001
FOR ALL ENTRIES IN lt_criterion
WHERE otype = 'VC' AND
plvar = '01' AND
sclas = lt_criterion-otype AND
sobid = lt_criterion-lv_objid.
**-->fetch descriptions of criteria group to get my KRA text
IF lt_hrp1001 IS NOT INITIAL.
SELECT * FROM hrp1000
INTO CORRESPONDING FIELDS OF TABLE lt_hrp1000
FOR ALL ENTRIES IN lt_hrp1001
WHERE plvar = '01' AND
otype = lt_hrp1001-otype AND
objid = lt_hrp1001-objid.
Thanks and Regards,
Rijuraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use the function module 'HRHAP_DOCUMENT_GET_DETAIL' to get the document data.
CALL FUNCTION 'HRHAP_DOCUMENT_GET_DETAIL'
EXPORTING
plan_version = '01'
s_appraisal_id = wa_final-app_id
IMPORTING
s_doc_processing = s_doc_processing
s_header_texts = s_header_texts
t_header_appraiser = t_header_appraiser
t_header_appraisee = t_header_appraisee
t_header_part_appraiser = t_header_part_appraiser
t_header_others = t_header_others
s_header_status = s_header_status
s_header_dates = s_header_dates
t_header_add_data = t_header_add_data
s_header_display = s_header_display
t_buttons = t_buttons
t_body_columns = t_body_columns
t_body_elements = t_body_elements
t_body_element_buttons = t_body_element_buttons
t_body_element_descr = t_body_element_descr
t_body_cells = t_body_cells
t_body_cell_val_values = t_body_cell_val_values
t_body_cell_val_ranges = t_body_cell_val_ranges
t_body_cell_val_c_like = t_body_cell_val_c_like
t_body_cell_val_descr = t_body_cell_val_descr
t_body_cell_notes = t_body_cell_notes
t_status_notes = t_status_notes
t_status_description = t_status_description
s_return = s_return.
Find the column id and row id of KRA.
Read the body cell where the KRA's are saved for the required row and column id.
Below is the sample code. Please Change according to your requirement.
READ TABLE t_body_columns INTO wa_body_columns WITH KEY column_id = c_fapp.
IF sy-subrc = 0.
READ TABLE t_body_elements INTO wa_body_elements WITH KEY name = text-007.
IF sy-subrc = 0.
LOOP AT t_body_cells INTO wa_body_cells.
IF wa_body_cells-row_iid = wa_body_elements-row_iid AND wa_body_cells-column_iid = wa_body_columns-column_iid.
wa_body_cells-value_txt = wa_final-value_fapp.
wa_body_cells-value_num = wa_final-value_fapp.
wa_body_cells-value_text = wa_final-value_fapp.
ENDIF.
APPEND wa_body_cells TO t_body_cells_new.
CLEAR wa_body_cells.
ENDLOOP.
ENDIF.
ENDIF.
Regards,
Jyothi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Run report RHHAP_DISPLAY_DB to display the appraisal data. It gives the list of tables and the data stored in them. Also the function modules in this area begin with HRHAP_
-Puneet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
9 | |
8 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.