Creation of External Candidate in EREC against a requisition via Interface
I came across simple but still interesting requirement which is re-usable across projects working on e-recruitment where we will have requirement to create candidates in ECC using an interface as now multiple companies are using third party applications for receiving job applications.
There could be multiple reasons for doing that one of them is to increase the visibility of job opening for the position.
Steps for candidate creation are specified below;
Step 1: Read the input data and pass it to BAPI “BAPI_ERC_APPL_CREATE_EXT”, This BAPI function module will create candidate and an application for the external candidate.
Few inputs to the FM are; TITLE_KEY, FIRSTNAME, LASTNAME, REGION, POSTL_COD1, COUNTRY, APPL_SOURCE, REFERENCE_CODE.
We can get the reference code from HRP5122 field EXTERNAL_CODE_MC using the object id for posting (Object Type ‘NC’) against the requisition (Object Type ‘NB’) from HRP1001.
Step 2: Create Candidate Information (Infotype 5102) using Class CL_HRRCF_CANDIDATE_INFO method INSERT_RECORD
It’s necessary to pass STATUS (Candidate Status), PRIVACY_STATUS (Data Privacy Statement Accepted), BEGDA (Start Date) and ENDDA (End Date) to the ls_p5102
Step 3: Saving the candidate’s CV as attachment
The candidacy updated in the portal against the requisition; Requisitions à Vacancy/application management
Another noticeable thing is candidacy and application will be created in status Draft and it will be visible on the portal only if status in not draft.