Skip to end of metadata
Go to start of metadata

Problem:

You have a requirement to discover all the users/candidates that have job agents associated for reporting purposes.

Solution:

This information is contained in table PCL_RCF, with OBJID = JA. There, you can obtain the user linked to the CP object in E-recruiting.

Below, a sample report was written on how to obtain the candidate information based on the user from PCL_RCF table and present it on the screen.

 REPORT  Z_SHOW_USERS_WITH_JOB_AGENTS.

 TABLES: PCL_RCF.

 DATA: d_candidate TYPE REF TO cl_hrrcf_candidate,

       c_user TYPE SYUNAME,

       oref   TYPE REF TO cx_root.

 START-OF-SELECTION.

   ULINE.
   WRITE: 'Candidates with Job Agent Assigned'.

   SELECT * FROM pcl_rcf
     INTO pcl_rcf
     WHERE relid EQ 'JA'.

     c_user = pcl_rcf-srtfd.

     TRY.

         CALL METHOD CL_HRRCF_CANDIDATE=>GET
           EXPORTING
             user      = c_user
           IMPORTING
             candidate = d_candidate.

         "All candidate information is within object *d_candidate*
         WRITE: / d_candidate->id.

       CATCH CX_HRRCF_MAINTAIN_OBJECT INTO oref.
         "You should deal here with exceptions for missing relationships
     ENDTRY.
   ENDSELECT.

The structure d_candidate is of type CL_HRRCF_CANDIDATE which contains all the candidate's information, such as BP, user and CP. You can use it to obtain further information on your report.

Don't forget to have your validations for missing relationships on the CATCH statement.

  • No labels