SAP Function Modules

HR_BE_TX_ENTRY_LEAVE_DATES SAP Function module - delivery of entry and exit dates of an employee within beg/endda period







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

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


Pattern for FM HR_BE_TX_ENTRY_LEAVE_DATES - HR BE TX ENTRY LEAVE DATES





CALL FUNCTION 'HR_BE_TX_ENTRY_LEAVE_DATES' "delivery of entry and exit dates of an employee within beg/endda period
  EXPORTING
    int_begda = '18000101'      " datum         Start Date period of interest
    int_endda = '99991231'      " datum         End Date period of interest
    int_pernr =                 " prelp-pernr   Personnel Number
  TABLES
    entry_dates =               " taxan_entry_exit  employee's tax institution entry dates
    exit_dates =                " taxan_entry_exit  employee's tax institution leave dates
  EXCEPTIONS
    NO_TAXAN = 1                "               Impossible to determine TAXAN due to wrong PERSA or BTRTL
    WRONG_PERIOD = 2            "               Wrong period: begda must be smaller than endda
    READ_INFTY_0_FAILED = 3     "               Failure when reading infotype 0
    READ_INFTY_1_FAILED = 4     "               Failure when reading infotype 1
    .  "  HR_BE_TX_ENTRY_LEAVE_DATES

ABAP code example for Function Module HR_BE_TX_ENTRY_LEAVE_DATES





The ABAP code below is a full code listing to execute function module HR_BE_TX_ENTRY_LEAVE_DATES 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:
it_entry_dates  TYPE STANDARD TABLE OF TAXAN_ENTRY_EXIT,"TABLES PARAM
wa_entry_dates  LIKE LINE OF it_entry_dates ,
it_exit_dates  TYPE STANDARD TABLE OF TAXAN_ENTRY_EXIT,"TABLES PARAM
wa_exit_dates  LIKE LINE OF it_exit_dates .

DATA(ld_int_begda) = 'Check type of data required'.
DATA(ld_int_endda) = 'Check type of data required'.

DATA(ld_int_pernr) = Check type of data required

"populate fields of struture and append to itab
append wa_entry_dates to it_entry_dates.

"populate fields of struture and append to itab
append wa_exit_dates to it_exit_dates. . CALL FUNCTION 'HR_BE_TX_ENTRY_LEAVE_DATES' EXPORTING int_begda = ld_int_begda int_endda = ld_int_endda int_pernr = ld_int_pernr TABLES entry_dates = it_entry_dates exit_dates = it_exit_dates EXCEPTIONS NO_TAXAN = 1 WRONG_PERIOD = 2 READ_INFTY_0_FAILED = 3 READ_INFTY_1_FAILED = 4 . " HR_BE_TX_ENTRY_LEAVE_DATES
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 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_int_begda  TYPE DATUM ,
it_entry_dates  TYPE STANDARD TABLE OF TAXAN_ENTRY_EXIT ,
wa_entry_dates  LIKE LINE OF it_entry_dates,
ld_int_endda  TYPE DATUM ,
it_exit_dates  TYPE STANDARD TABLE OF TAXAN_ENTRY_EXIT ,
wa_exit_dates  LIKE LINE OF it_exit_dates,
ld_int_pernr  TYPE PRELP-PERNR .

ld_int_begda = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_entry_dates to it_entry_dates.
ld_int_endda = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_exit_dates to it_exit_dates.

ld_int_pernr = 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 HR_BE_TX_ENTRY_LEAVE_DATES or its description.