SAP Function Modules

CATS_PERNR_LIST_SACHZ SAP Function module







CATS_PERNR_LIST_SACHZ 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 CATS_PERNR_LIST_SACHZ into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM CATS_PERNR_LIST_SACHZ - CATS PERNR LIST SACHZ





CALL FUNCTION 'CATS_PERNR_LIST_SACHZ' "
  EXPORTING
    sbmod =                     " pernr_list_structure-sbmod
    sachz =                     " pernr_list_structure-sachz
    begda =                     " catshr-workdate
    endda =                     " catshr-workdate
    variant =                   " cats_variant-variant
  IMPORTING
    sachn =                     " cats_sachn-sachn
  TABLES
    pernr_list =                " pernr_list_structure
  EXCEPTIONS
    SACHZ_NOT_FOUND = 1         "
    .  "  CATS_PERNR_LIST_SACHZ

ABAP code example for Function Module CATS_PERNR_LIST_SACHZ





The ABAP code below is a full code listing to execute function module CATS_PERNR_LIST_SACHZ 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_sachn  TYPE CATS_SACHN-SACHN ,
it_pernr_list  TYPE STANDARD TABLE OF PERNR_LIST_STRUCTURE,"TABLES PARAM
wa_pernr_list  LIKE LINE OF it_pernr_list .


DATA(ld_sbmod) = some text here

DATA(ld_sachz) = some text here

SELECT single WORKDATE
FROM CATSHR
INTO @DATA(ld_begda).


SELECT single WORKDATE
FROM CATSHR
INTO @DATA(ld_endda).


DATA(ld_variant) = some text here

"populate fields of struture and append to itab
append wa_pernr_list to it_pernr_list. . CALL FUNCTION 'CATS_PERNR_LIST_SACHZ' EXPORTING sbmod = ld_sbmod sachz = ld_sachz begda = ld_begda endda = ld_endda variant = ld_variant IMPORTING sachn = ld_sachn TABLES pernr_list = it_pernr_list EXCEPTIONS SACHZ_NOT_FOUND = 1 . " CATS_PERNR_LIST_SACHZ
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_sachn  TYPE CATS_SACHN-SACHN ,
ld_sbmod  TYPE PERNR_LIST_STRUCTURE-SBMOD ,
it_pernr_list  TYPE STANDARD TABLE OF PERNR_LIST_STRUCTURE ,
wa_pernr_list  LIKE LINE OF it_pernr_list,
ld_sachz  TYPE PERNR_LIST_STRUCTURE-SACHZ ,
ld_begda  TYPE CATSHR-WORKDATE ,
ld_endda  TYPE CATSHR-WORKDATE ,
ld_variant  TYPE CATS_VARIANT-VARIANT .


ld_sbmod = some text here

"populate fields of struture and append to itab
append wa_pernr_list to it_pernr_list.

ld_sachz = some text here

SELECT single WORKDATE
FROM CATSHR
INTO ld_begda.


SELECT single WORKDATE
FROM CATSHR
INTO ld_endda.


ld_variant = some text here

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 CATS_PERNR_LIST_SACHZ or its description.