Ansicht
Dokumentation

EXIT_SAPLRPIN_001 -

EXIT_SAPLRPIN_001 -

CL_GUI_FRONTEND_SERVICES - Frontend Services   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

The function module RP_CHECK_PERNR can be used by other applications to check personnel numbers. Personnel numbers are checked against the HR master record.

If you do not want the system to check personnel numbers or if personnel numbers should be checked against your own tables, you can use the user exit.

The example below illustrates how a personnel number is checked against a table. You must create your own database table with the fields you require and use the name of the table and the fields in the coding.

The input parameters are:

  • DATE: key date
  • PNR: personnel number

The output parameters are:

  • NAME: employee name, 40 characters maximum
  • PERSA: personnel area
  • MOLGA: country grouping
  • BUKRS: company code
  • KOSTL: cost center
  • RET: return code

The return code can have the following values:

  • 0: employee active
  • 1: employee inactive
  • 2: personnel number unknown
  • 3: data inconsistency
  • 4: standard check

Personnel numbers can either undergo a standard or user-specific check depending on the client. The example shows a time-dependent check of a personnel number against a customer database table; standard checks are only carried out in client 000.

CASE SY-MANDT.
  WHEN 0.
    RET = 4.
  WHEN OTHERS.
    SELECT * FROM "database" WHERE "number"     EQ PNR
                               AND "end_date"   LE DATE
                               AND "begin_date" GE DATE .
      EXIT.
    ENDSELECT.
    IF SY-SUBRC EQ 0.
      IF "database-active" EQ 'X'.
        NAME = "database-name"
        RET = 0.
      ELSE.
        RET = 1.
      ENDIF.
    ELSE.
      RET = 2.
    ENDIF.
ENDCASE.

The designators in quotation marks must be replaced by the current field names.






PERFORM Short Reference   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 3101 Date: 20240425 Time: 230240     sap01-206 ( 31 ms )