Start of Content Area

Object documentation Selection Program  Locate the document in its SAP Library structure

Definition

Program that determines the personnel numbers to be included in a process.

Use

The selection program is located at the start of every process model, and therefore at the start of every process. It is not a process step like the other programs. Instead, it is part of the process model attributes. The standard system includes several selection programs that you can use for your process models.

Note

To display a list of available selection programs, call the input help for the Selection Program field when determining the attributes of a new process model.

If you create a process model, select the selection program you want to use for this process model.

If you start a process, execute the selection program directly.

Note

If you start the process immediately, you must not execute the selection program in the background. For this reason, the function is not included in the menu. If you want to execute the selection program in the background, you must schedule the process for a specific time. To do this, you need a variant for the selection program.

If you schedule a process, the system executes the selection program in the background as soon as it starts the process.

Structure

If you create your own selection program, it must include the following source text:

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_PARCEL     =  PYPARAID

    CHAN_CONNECT    =  CONNECT

    CHAN_CONT       =  CONT

* Specific processing: fill table PROCESS_EMPLOYEES with the
* personnel numbers to be processed.

END-OF-SELECTION.

CALL FUNCTION 'HRPY_PROCESS_CLOSE_SELECTION'

  EXPORTING

    IMP_PARCEL      =  PYPARAID

    IMP_CONNECT     =  CONNECT

    IMP_CONT        =  CONT

  TABLES

    IMP_PERNR_INDEX =  PROCESS_EMPLOYEES

LEAVE PROGRAM.

 

 

End of Content Area