Customizing Appraisal Templetes (Offline, Web and Print Layouts)
This weblog is based on one of the replies I had given in past –
I had recieved several requests requesting help on the same topics, hence I am migrating this to weblog.
Special Thanks to Maurice Hagan for his blog Objective Setting & Appraisals: The Web Environment, which was very helpful.
1. This weblog will provide one of the ways to customize Offline, Web and Print Layout of Appraisal templetes. There may be other way which i have not explored.
2. PDF for print and Offline layout is available in ECC 6.0. Below version may have 2 Smartforms and hence customizing will be different. (You may need to implement instance of BADI HRHAP00_SMARTFORMS02)
3. User should have proper role and authorization to perform all activities given below.
Customizing Print Layout of Appraisal template
1. Create new Z PDF form by copying form hap_pdf_offline_form. Customize this PDF form as per your requirements.
2. Go to Transaction SE19 and create implemantation of HRHAP00_SMARTFORMS.
Note : Copy code for all methods from standard Implementation HRHAP00_SMARTFORMS01.
Also remember to copy private method (PRINT_DOCS) and private attributes into Z class generated for BADI. Remember, private methods and attributes will not be copied automatically. Refer standard implementation stated above.
4. Remember to activate BADI and PDF form.
1. In Transaction OOHAP_BASIC –> click on ENHANCEMENT AREA –> Select AP –> double click on Enhancement –> Click on Add new –> you will find new Badi description here –> Add it.
2. go to Transaction OOAM –> Double click on Category group –> go to Enhancement Tab –> Transfer your enhancement from available to selected.
3. Double click on any template under above category group — > goto layout tab –> In print layout you will find your enhancement –> select it and save.
Now you can view new print layout when you right click and select preview — print layout.
Customizing Offline Layout of Appraisal template
1. Create new Z PDF form by copying form hap_pdf_offline_form. Customize this PDF form as per your requirements. (You may use same custom PDF for Print layout and offline layout).
2. BADI Implementation : Create Implemantation of BADI HRHAP00_OFFLINE. You can refer to Standard Implemantation HRHAP00_OFFLINE01 and refer code of Upload, download and GET_INFORMATION methods for creating your implemantation.
Follow same config procedure as above, except the change in choosing Enhancement Area. Choose Enhancement Area = OF.
Customizing Web Layout of Appraisal template
1 . Copy BSP application HAP_DOCUMENT into Z BSP application (let’s say ZHAP_DOCUMENT).
2. Copy Controller Class CL_BSP_HAP_DOCUMENT_CO to new Z controller Class. Modify DO_REQUEST Method of Z Controller Class (If you want to modify and handle ZHAP_DOCUMENT on your own; you can implement it in DO_REQUEST method of this controller).
If you want to keep existing copied code, comment out code for checking if Custom Exit is implemented and BADI Implementation exists. (If you do not do so, it will go in infinite loop of calling itself).
Change l_application = “ZHAP_DOCUMENT” instead of HAP_DOCUMENT. Comment out condition which check l_flag in same IF condition (This flag is to check if data is fetched first time, if so it will create view for standard layout or else it will hand over control to layout contoller).
Assign this Z Class as Controller Class for “Layout_controller.do”.
3. Customize web layout as per requirement. (You can change layout by modifying page fragments document_header.htm and document_body.htm for appraisal templete)
Activate the BADI.
1. Through Transaction OOHAP_BASIC register your enhancement.
2. Double click on Enhancement Area –> Choose Enhancement Area = AW –> double click on Enhancement –> Create new entry (you will be able to find Enhancement name you have implemented above when you press F4). –> Save
3. Go to OOAM Transaction –> Double click on Category Group –> Go to Enhancement Tab –> Move your Enhancement from Available to Selected. –> Save
4. Select any of Appraisal Template –> Go to Layout –> In Web Layout select your custom layout name –> Save.
Custom Web Layout is now attached to your template. Repeat Step 4 in Config to attach it to other templates in OOAM.
Important Note : Even though you have developed custom BSP Application and implemented BADI to call this BSP, Custom BSP is never called directly. It is always routed through Standard BSP HAP_DOCUMENT. This is the reason you will need to attach Custom controller to Layout_controller. Also, application will not work if you are copying DO_REQUEST method from Standard controller as it will always check for enhancement and call itself again and again.
There may be other methods for performing small modifications to layout. (There is enhancement_controller.do controller, enhancement_alternative.htm view, enhancement_sap_standard.htm view, document_enhancement.htm page with flow logic — I haven’t explored what all these are meant for.)