Ansicht
Dokumentation

HR_GET_NEXT_OBJPS - Determine Free Object ID for Infotype

HR_GET_NEXT_OBJPS - Determine Free Object ID for Infotype

General Material Data   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

Determining the Next Sequential Number (Object ID) for an Infotype

The infotype field OBJS is used as a sequential number if an employee can have several records in an infotype with the same subtype at the same time. (Time constraint!) This function module determines the first unassigned number. This can be used as a default value when creating a new record.

The numbering begins with 1 and is sequential. In the standard system, the gaps are closed up. This means that if the numbers 1 and 3 are already assigned, the function module proposes the number 2. If the parameter FILL_GAPS is left blank, the function module continues counting from the largest value available. In this case, an error occurs if 99, the highest number that can be saved in this two-digit field, has already been reached. In the standard system, an error only occurs if all the numbers from 01 to 99 really are assigned.

As an option, you can also specify the subtype if you already know this. Each subtype is then numbered separately.

Example

Infotype 0026 - Direct insurance

An employee's direct insurance contracts are numbered using infotype field OBJPS. When creating a new record, the function module HR_GET_NEXT_OBJPS determines the first free (unassigned) number.

Further information





Parameters

FILL_GAPS
INFOTYPE
OBJID
PERNR
SUBTYPE

Exceptions

NO_FREE_ID_FOUND
SYSTEM_ERROR

Function Group

HRPAY01_UTILS

CPI1466 during Backup   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 1720 Date: 20240523 Time: 113655     sap01-206 ( 45 ms )