Note:

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

Development:

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.

3. Change initial value of attribute C_FORMNAME (Attibute of implementing class) to name to Z PDF form you have created in Step 1.

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)

Configuration:

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). –> Save3. Go to OOAM Transaction –> Double click on Category Group –> Go to Enhancement Tab –> Move your Enhancement from Available to Selected. –> Save4. 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.)