SAP Function Modules

CATT_GET_PERNR SAP Function module







CATT_GET_PERNR is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CATT_GET_PERNR into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: RPCA
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM CATT_GET_PERNR - CATT GET PERNR





CALL FUNCTION 'CATT_GET_PERNR' "
  EXPORTING
    beg =                       " p0001-begda
    pnr =                       " p0001-pernr
  IMPORTING
    name =                      " p0001-ename
    persa =                     " p0001-werks
    btrtl =                     " p0001-btrtl
    bukrs =                     " p0001-bukrs
    kostl =                     " p0001-kostl
    molga =                     " t500p-molga
  EXCEPTIONS
    DATA_FAULT = 1              "
    PERSON_NOT_ACTIVE = 2       "
    PERSON_UNKNOWN = 3          "
    EXIT_FAULT = 4              "
    PERNR_MISSING = 5           "
    DATE_MISSING = 6            "
    .  "  CATT_GET_PERNR

ABAP code example for Function Module CATT_GET_PERNR





The ABAP code below is a full code listing to execute function module CATT_GET_PERNR including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_name  TYPE P0001-ENAME ,
ld_persa  TYPE P0001-WERKS ,
ld_btrtl  TYPE P0001-BTRTL ,
ld_bukrs  TYPE P0001-BUKRS ,
ld_kostl  TYPE P0001-KOSTL ,
ld_molga  TYPE T500P-MOLGA .


DATA(ld_beg) = 20210129

DATA(ld_pnr) = Check type of data required . CALL FUNCTION 'CATT_GET_PERNR' EXPORTING beg = ld_beg pnr = ld_pnr IMPORTING name = ld_name persa = ld_persa btrtl = ld_btrtl bukrs = ld_bukrs kostl = ld_kostl molga = ld_molga EXCEPTIONS DATA_FAULT = 1 PERSON_NOT_ACTIVE = 2 PERSON_UNKNOWN = 3 EXIT_FAULT = 4 PERNR_MISSING = 5 DATE_MISSING = 6 . " CATT_GET_PERNR
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_name  TYPE P0001-ENAME ,
ld_beg  TYPE P0001-BEGDA ,
ld_persa  TYPE P0001-WERKS ,
ld_pnr  TYPE P0001-PERNR ,
ld_btrtl  TYPE P0001-BTRTL ,
ld_bukrs  TYPE P0001-BUKRS ,
ld_kostl  TYPE P0001-KOSTL ,
ld_molga  TYPE T500P-MOLGA .


ld_beg = 20210129

ld_pnr = Check type of data required

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CATT_GET_PERNR or its description.