This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
E-Recruitment: Adding AdditionalTab to Requisition Maintenance
Appl ies to:
SAP E-Recruitment 6.0. E-recruitment Recruiter Scenario developed using BSP technology
Summary
In SAP E-recruitment, requisition maintenance, SAP has provided many standard fields to be used forrequisition maintenance. However there are many business specific requirements where customer wants toadd a whole new set of fields which are logically grouped together, so to provide flexibility SAP has providedprovision to add a complete new additional tab, to display such logically grouped fields together. Thisdocument explains how such fields can be added to requisition maintenance, by creating a whole new tab.Apart from this, document will also explain how such fields can be stored in database and made searchrelevant.
Author : Hemendra Singh Manral
Company: SAP Labs India
Created on: 04 August 2009
Author Bio
Hemendra Singh Manral is a Sr. Consultant with Custom Development, SAP Labs India. He hasworked on various customer projects in the area of HCM and E-Recruitment using SAPtechnologies like BSP, ABAP Web-Dynpro, XML for ABAP, Web services, Enhancementframework etc.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
E-Recruitment: Adding Additional Tab to Requisition Maintenance
Table of Contents
Introduction.........................................................................................................................................................3 Description of Requirement................................................................................................................................4 Creating a Custom Infotype................................................................................................................................5 Creating a New BSP Application for Rendering New Fields ..............................................................................8 Maintaining Additional Customizing for Custom Fields ....................................................................................10 Customization Required for Adding New Tab...............................................................................................10
Field Level Customization for Newly Added Fields.......................................................................................12 Making fields Search Relevant.........................................................................................................................13
Enabling Search Profile Generation of Field.................................................................................................13 Enabling Search UI for Field.........................................................................................................................15
UI Output of Our Requirement..........................................................................................................................16 Related Content................................................................................................................................................16 Copyright...........................................................................................................................................................17
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
E-Recruitment: Adding Additional Tab to Requisition Maintenance
Introduction
In E-recruitment requisition maintenance, many times, there are requirement to add several additional fieldswhich are logically grouped together. In such cases the need is to have a new infotype to store such fieldsand create a new Tab on UI for user maintenance.
Before going forward with the document its important to know about different layers in E-Recruitment, so thatwe can create new objects accordingly, at different layers and set up a good communication link usingobjects at different layer. Below is a layered architecture of E-Recruitment.
E-Recruitment Layered Architecture
This document will explain how to add additional custom tab to the requisition maintenance. We take anexample requirement and frame the document accordingly.
The whole document is broadly categorized into following sections:
1. Description of requirement
2. Creating a custom Infotype
3. Creating a new BSP application for rendering new fields
4. Maintaining additional customizing for custom fields
5. Making fields search relevant
6. UI Output of our requirement
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
E-Recruitment: Adding Additional Tab to Requisition Maintenance
Description of Requirement
Let’s say, a customer wants following fields to be added to requisition maintenance by creating a whole newtab. New tab will actually help in logically grouping all such fields on requisition maintenance. Let’s say for acomplete R&D lab, some additional basic requirements, might be required for some jobs, like as follows:
Field Field Type
Worked with any government outsidenative country Checkbox
Minimum Number of Thesissubmitted
Inputfield
Minimum number of paperspublished
Inputfield
Minimum number of patents filed Inputfield
Here we will not take much fields, but in actual scenario the count of fields are generally higher. We put thename of new tab as “Additional work detail”
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
E-Recruitment: Adding Additional Tab to Requisition Maintenance
Creating a New BSP Application for Rendering New Fields
Now we are all set with the database of our new fields, so our next task is to create an application pagewhich will provide UI for new fields. Here we will create a new BSP application which will be later added viacustomizing to the container sequence of requisition maintenance.
The best way to create a new BSP application is to copy a standard BSP application which closely meetsyour requirement, and then we will prune it to meet our exact requirements
In our case, we are going to copy standard application “HRRCF_REQ_MNT”. We will keep the following
views and controllers in the application and rename them as follows:
Now create two new controller classes with following configuration for controllers.
Controllers Controller class configuration
Addwork_m.do Super class: CL_HRRCF_CONTROLLER
Interfaces: IF_HRRCF_REQ_MNT_EXCHG
Addwork.do Super class: CL_HRRCF_CONTROLLER
Interfaces: IF_HRRCF_SUBVIEW
Again here, the easiest way to create controller classes is to copy from one of the standard controller class,for e.g., here we can copy from controller classes of “basicdata.do” and “basicinfo_m.do”.
J ust go through the standard code to derive logic for methods of interface and to identify which all arerequired. If you have copied from standard controller class then additionally in your new controller class youhave to make changes in methods like “DO_INIT”, “DO_INITATTRIBUTES”, “DO_HANDLE_EVENT”,“ON_SAVE”, to save and retrieve data from business logic layer (See Architecture diagram above).
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
E-Recruitment: Adding Additional Tab to Requisition Maintenance
Change/create main view for fields rendering, this main view will contain a call to your view with fields. Anexample in our case is as follows:
Change/create BSP view for rendering of new fields. Use <hr r cf : f ormLayout *> tag for fields renderingon view, so that, each field can be customized with the context, check out the documentation of <phtmlb:formLayout*>before using.
Create OTR texts for your field labels, its better to create new OTR’s rather then using existing ones, this willhelp you to have different text’s for different context’s with out effecting other objects
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
E-Recruitment: Adding Additional Tab to Requisition Maintenance
Making fields Search Relevant
The next step is to make our custom added fields, search relevant, i.e. to make fields available, wheneversomeone searches for postings or requisitions. This part can be subdivided into two as follows:
1. Enabling search profile generation of field
2. Enabling search UI for field.
Enabling Search Profile Generation of Field To make a field relevant for search all we need a CEC (Content extractor class) and Infotype access class.We have already created infotype access class, so the left is CEC class.
Create a global class and assign following interfaces to it:
1. IF_HRRCF_CONSTANTS
2. IF_HRRCF_CONTENT_EXTRACTOR
You can also refer standard CEC class like “CL_HRRCF_CEC_INFOTYPE” for creating CEC class of yourown.
In most of the cases, where there are no package namespace, standard CEC class can be used rather thencreating a new one. The reason being, the standard class uses offset “1” to get the infotype no. from the
infotype P structure, this will actually fail in case of package namespace, as the P structure name is prefixedby package namespace, if it exist. So in all such cases its advisable to create a new CEC class.
Note: If you are copying the standard CEC class to create a new one, just check all the logic and change code whereever offset is read to get the infotype no. correctly.
Now register your infotype access class for search profile using maintenance view “T77RCF_SPT_INFTY”.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
E-Recruitment: Adding Additional Tab to Requisition Maintenance
For rest of the customization follow the IMG path as below:
1. Define Information Categories
Define new information category using the CEC class and Infotype “P” structure created above.Remember the P structure will be pre-fixed by the package namespace, if exist. Assign this for object
type “NB” i.e. requisitions.2. Assign Information Category Fields to a Search Profile Type
Make assignment for both “EXT_POST” and “INT_POER” i.e. internal and external postings andrequisitions. Use the Information category defined above and select the custom added fields using F4help (These fields are populated from the structure defined for information category).
Use “Type” either “Free text” (If it’s a free text field, as in our case), “Entity” (If it has a value table orcheck table) or both (if you want the field to be searched from both value selection or free text search,this is more relevant in case the field has values associated with it, and has a text table as well and youwant search based on text but for this you must have implemented logic for method“ASSIGN_TEXT_TO_ENTRIES” in infotype access class)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
E-Recruitment: Adding Additional Tab to Requisition Maintenance
Enabling Search UI for Field
Follow the IMG path as below
1. Define Search TemplatesDefine two new search templates one for each “EXT_POST” and “INT_POER”. Use type
“General”.
2. Define Search Template Elements
Define new template elements for each new custom field. For each field define the attributes of information category defined above. If you have specified element type which require set of values likedrop down, list box etc. then you also have to define Data class, for data access class standard classcan be referred like “CL_HRRCF_T77RCF_DEGREE”.
3. Assign Search Template Elements to Search Templates
4. Assign Search Templates to Search Template Groups
Assign newly created search templates to existing search template groups which includesrequisition search.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9,iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server,PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes,BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX,Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe SystemsIncorporated in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts
Institute of Technology.
J ava is a registered trademark of Sun Microsystems, Inc.
J avaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented byNetscape.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentionedherein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, andother Business Objects products and services mentioned herein as well as their respective logos are trademarks or registeredtrademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.
All other product and service names mentioned are the trademarks of their respective companies. Data contained in this documentserves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAPGroup") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in theexpress warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting anadditional warranty.