Personnel Number Selection 

Use

The process model must start with a program that selects the personnel numbers for the complete process run. Each process model starts with a specific selection program.

You specify the selection program when you create the process model.

Integration

Personnel numbers that have not been selected using the selection program defined in the process model can still be included in a process containing payroll. For example, you can include new employees in a process. If the process is repeated, they are read from matchcode W.

SAP provides an international selection program H99_SELECT_PERNR.

If you use your own selection program, base it on the following structure. The given source text must remain.

 

REPORT MY_SELECTION_PROGRAM.

INCLUDE RPUPMDP1.

RANGE: PROCESS_EMPLOYEES FOR PERNR-PERNR.

DATA: This_report like sy-repid

...

START-OF-SELECTION.

This_report = sy-repid

CALL FUNCTION 'HRPY_PROCESS_INIT_SELECTION’

EXPORTING

IMP_PROGRAM = This_report

CHANGING

CHAN_PROCESSID = STPROCID

CHAN_STEPID = STSTEPID

CHAN_CONNECT = CONNECT

CHAN_CONT = CONT

... Specific processing: In the PROCESS_EMPLOYEES table, enter the

personnel numbers to be processed.

END-OF-SELECTION.

CALL FUNCTION 'HRPY_PROCESS_CLOSE_SELECTION'

EXPORTING

IMP_PROCESSID = STPROCID

IMP_STEPID = STSTEPID

IMP_CONNECT = CONNECT

IMP_CONT = CONT

TABLES

IMP_PERNR_INDEX = PROCESS_EMPLOYEES

LEAVE PROGRAM.