on 10-31-2007 11:27 PM
Hello
The requirement is to convert the legacy Peformance Appraisal data into SAP. The appraisal template has five compentenices and maximum of eight development goals for a given year. Questions:
- What is the best way to approach the conversion?
- Is there any standard conversion template for pulling the data into SAP?
- Which tables/cluster(s) are involved and how can we load the "notes" section under each of the developement goals.
Please advise. Many thanks in advance,
Hi,
First use the FM "HRHAP_TEMPLATE_GET_DETAIL" to get the property of the template. Then pass the export parameters along with the legacy data into the FM "HRHAP_DOCUMENT_CREATE" to create the appraisal document.
A sample code would be like this.
Local Constants
CONSTANTS: lc_plversion TYPE plvar VALUE '01',
lc_p TYPE c VALUE 'P',
lc_status TYPE c VALUE '1',
lc_statusname(14) TYPE c VALUE 'In Preparation',
lc_0001 TYPE p0105-usrty VALUE '0001',
lc_x TYPE c VALUE 'X',
lc_01(2) TYPE c VALUE '01',
lc_12(2) TYPE c VALUE '12'.
Data types for FM call
DATA : li_appraiser TYPE hap_t_header_appraiser,
li_appraisee TYPE hap_t_header_appraisee,
li_others TYPE hap_t_header_others,
li_texts TYPE hap_s_header_texts,
li_dates TYPE hap_s_header_dates,
li_status TYPE hap_s_header_status,
li_display TYPE hap_s_header_display,
li_columns TYPE hap_t_body_columns,
li_elements TYPE hap_t_body_elements,
li_cells TYPE hap_t_body_cells,
li_processing TYPE hap_s_doc_processing,
li_appraisal_id TYPE hap_s_appraisal_id,
li_pappraisers TYPE hap_t_header_part_appraisers,
li_notes TYPE hap_t_body_cell_notes,
li_status_note TYPE hap_t_status_note.
Work Areas for filling the parameters
DATA : lw_appraisee TYPE hap_s_header_appraisee,
lw_appraiser TYPE hap_s_header_appraiser,
lv_appraiser TYPE pernr-pernr,
lv_begda TYPE p0105-begda,
lv_endda TYPE p0105-endda,
lv_syuname TYPE p0105-usrid.
Clear all the Local Variables before usgae.
Get the template properties from the FM 'HRHAP_TEMPLATE_GET_DETAIL'
CALL FUNCTION 'HRHAP_TEMPLATE_GET_DETAIL'
EXPORTING
plan_version = lc_plversion
template_id = template_id
IMPORTING
s_appraisal_id = li_appraisal_id
s_header_texts = li_texts
s_header_status = li_status
s_header_display = li_display
t_body_columns = li_columns
t_body_elements = li_elements
t_body_cells = li_cells
t_body_cell_notes = li_notes.
Check for the Employee id (Appraisee)
IF pernr IS INITIAL.
lv_syuname = sy-uname.
CONCATENATE sy-datum(4) sy-datum4(2) sy-datum6(2) INTO lv_begda.
CONCATENATE sy-datum(4) sy-datum4(2) sy-datum6(2) INTO lv_endda.
Call the FM 'RP_GET_PERNR_FROM_USERID'
CALL FUNCTION 'RP_GET_PERNR_FROM_USERID'
EXPORTING
begda = lv_begda
endda = lv_endda
usrid = lv_syuname
usrty = lc_0001
IMPORTING
usr_pernr = pernr
EXCEPTIONS
retcd = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
**********************************************************************
Populating FM parameters before calling the FM to create *
**********************************************************************
Get the supervisor's employee id from the reusable component of ENH-E084.
lv_appraiser = '81'.
Populate Appraiser
lw_appraiser-plan_version = lc_plversion.
lw_appraiser-type = lc_p.
lw_appraiser-id = lv_appraiser.
APPEND lw_appraiser TO li_appraiser.
CLEAR lw_appraiser.
Populate Appraisee
lw_appraisee-plan_version = lc_plversion.
lw_appraisee-type = lc_p.
lw_appraisee-id = pernr.
APPEND lw_appraisee TO li_appraisee.
CLEAR lw_appraisee.
Populate the status
li_status-ap_status = lc_status.
li_status-ap_status_name = lc_statusname.
Populate the Dates.
CONCATENATE sy-datum(4) lc_01 lc_01 INTO li_dates-ap_start_date.
CONCATENATE sy-datum(4) lc_12 lc_01 INTO li_dates-ap_end_date.
Populate the Processing status
li_processing-administrator = lc_x.
CLEAR: li_appraisal_id,
li_pappraisers,
li_notes,
li_status_note.
Call the FM 'HRHAP_DOCUMENT_CREATE' to create the appraisal document.
Document is created in status 'In Process'
CALL FUNCTION 'HRHAP_DOCUMENT_CREATE'
EXPORTING
plan_version = lc_plversion
t_header_appraiser = li_appraiser
t_header_appraisee = li_appraisee
t_header_others = li_others
s_header_texts = li_texts
s_header_dates = li_dates
s_header_status = li_status
s_header_display = li_display
t_body_columns = li_columns
t_body_elements = li_elements
t_body_cells = li_cells
s_doc_processing = li_processing
CHANGING
s_appraisal_id = li_appraisal_id
t_header_part_appraisers = li_pappraisers
t_body_cell_notes = li_notes
t_status_notes = li_status_note.
appraisal_id = li_appraisal_id-appraisal_id.
Hope this helps.
Reward if this helps.
Regards,
Subbu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Subbu,
I am also facing a similar problem while uploading the data.When I try to upload the data it is not getting uploaded in the sequence as my excel sheet.Could you please tell me what could be the problem or how to fill the parameters t_body_cells,t_body_columns,t_body_elements into the FM
HRHAP_DOCUMENT_CREATE.
Regards,
Gopi.
Hi Subramaniam,
I have almost exactly the same requirement. I have passed the same thing in HRHAP_DOCUMENT_CREATE. but i can see only one entry from my excel sheet getting populated i.e the 1st one whereas my excel sheet contains multiple entries.
Kindly guide me on how do i go about this.....I have passes Appraisal ID, Appraisee ID, Header_status, Beg_date, end_date.
Kindly help.
Thanks and regards,
Frank.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Subbu
Thanks a million. We shall develop the program as suggested.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Subbu
We now have the legacy data in the excel sheet. The competency, ratings etc. are all in one row and many columns on the spreadsheet.
Now how do we read the data from excel or txt file and populate the information in SAP? Which tables store the appraisal data? We need to populate the data in the "Completed" status.
Your immediate feedback in this regard is much appreciated.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The competencies are the criterias of the appraisal docuemnt.
The appraisal document cannot be created directly by inserting in the DB tables. So, you have to use the FM's as posted above.
The import parameter "T_BODY_ELEMENTS" of the FM "HRHAP_DOCUMENT_CREATE" will be holding the criterias or competencies or goals or KRA's.
The corresponding ratings will be in "T_BODY_CELLS".
The DB table for storing the appraisal docs starts with "HRHAP*" and these tables do not have display data authorization.
So use the report "RHHAP_DISPLAY_DB" to get the data from these tables.
The status can be set to completed in the import parameter "S_HEADER_STATUS".
Also i would advice your ABAPer to use the FM "HRHAP_DOCUMENT_GET_DETAIL" in debugging mode for an existing appraisla document to find out how the import and export parameters have to be passed to the FM for creation.
Hope this helps you.
Regards,
Subbu.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.