SAP Function Modules

HRAE_PBS_ACTIVE_PACKAGE_GET SAP Function module - Eligibility: Get Package from Infotypes







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

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


Pattern for FM HRAE_PBS_ACTIVE_PACKAGE_GET - HRAE PBS ACTIVE PACKAGE GET





CALL FUNCTION 'HRAE_PBS_ACTIVE_PACKAGE_GET' "Eligibility: Get Package from Infotypes
  EXPORTING
    pernr =                     " pernr-pernr   Personnel number
    date =                      " datum         Date and time, current (application server) date
    emp_info =                  " paep_empinfo  HR-CM: Employee Data for Compensation Administration
    pay_frequ =                 " t549r-zeinh   Payroll time units
*   no_remainder_calc =         " paep_xfeld    No remainder calculation
*   no_calculation =            " paep_xfeld    No calculation of salary comp.
  TABLES
*   elig_tab =                  " paep_component_info  Eligible components
    salpack_tab =               " paep_package_component  Package table
    iprel =                     " hrpbsae_iprel_table  Salary packaging: Iprel table
*   variant_data =              " paep_package_data  Salary packaging: package data
  EXCEPTIONS
    ERROR = 1                   "
    NO_PACKAGE = 2              "               No package date before hire date
    NEGATIVE_REMAINDER = 3      "
    .  "  HRAE_PBS_ACTIVE_PACKAGE_GET

ABAP code example for Function Module HRAE_PBS_ACTIVE_PACKAGE_GET





The ABAP code below is a full code listing to execute function module HRAE_PBS_ACTIVE_PACKAGE_GET 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_elig_tab  TYPE STANDARD TABLE OF PAEP_COMPONENT_INFO,"TABLES PARAM
wa_elig_tab  LIKE LINE OF it_elig_tab ,
it_salpack_tab  TYPE STANDARD TABLE OF PAEP_PACKAGE_COMPONENT,"TABLES PARAM
wa_salpack_tab  LIKE LINE OF it_salpack_tab ,
it_iprel  TYPE STANDARD TABLE OF HRPBSAE_IPREL_TABLE,"TABLES PARAM
wa_iprel  LIKE LINE OF it_iprel ,
it_variant_data  TYPE STANDARD TABLE OF PAEP_PACKAGE_DATA,"TABLES PARAM
wa_variant_data  LIKE LINE OF it_variant_data .


DATA(ld_pernr) = Check type of data required
DATA(ld_date) = 'Check type of data required'.
DATA(ld_emp_info) = 'Check type of data required'.

SELECT single ZEINH
FROM T549R
INTO @DATA(ld_pay_frequ).

DATA(ld_no_remainder_calc) = 'Check type of data required'.
DATA(ld_no_calculation) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_elig_tab to it_elig_tab.

"populate fields of struture and append to itab
append wa_salpack_tab to it_salpack_tab.

"populate fields of struture and append to itab
append wa_iprel to it_iprel.

"populate fields of struture and append to itab
append wa_variant_data to it_variant_data. . CALL FUNCTION 'HRAE_PBS_ACTIVE_PACKAGE_GET' EXPORTING pernr = ld_pernr date = ld_date emp_info = ld_emp_info pay_frequ = ld_pay_frequ * no_remainder_calc = ld_no_remainder_calc * no_calculation = ld_no_calculation TABLES * elig_tab = it_elig_tab salpack_tab = it_salpack_tab iprel = it_iprel * variant_data = it_variant_data EXCEPTIONS ERROR = 1 NO_PACKAGE = 2 NEGATIVE_REMAINDER = 3 . " HRAE_PBS_ACTIVE_PACKAGE_GET
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 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_pernr  TYPE PERNR-PERNR ,
it_elig_tab  TYPE STANDARD TABLE OF PAEP_COMPONENT_INFO ,
wa_elig_tab  LIKE LINE OF it_elig_tab,
ld_date  TYPE DATUM ,
it_salpack_tab  TYPE STANDARD TABLE OF PAEP_PACKAGE_COMPONENT ,
wa_salpack_tab  LIKE LINE OF it_salpack_tab,
ld_emp_info  TYPE PAEP_EMPINFO ,
it_iprel  TYPE STANDARD TABLE OF HRPBSAE_IPREL_TABLE ,
wa_iprel  LIKE LINE OF it_iprel,
ld_pay_frequ  TYPE T549R-ZEINH ,
it_variant_data  TYPE STANDARD TABLE OF PAEP_PACKAGE_DATA ,
wa_variant_data  LIKE LINE OF it_variant_data,
ld_no_remainder_calc  TYPE PAEP_XFELD ,
ld_no_calculation  TYPE PAEP_XFELD .


ld_pernr = Check type of data required

"populate fields of struture and append to itab
append wa_elig_tab to it_elig_tab.
ld_date = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_salpack_tab to it_salpack_tab.
ld_emp_info = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_iprel to it_iprel.

SELECT single ZEINH
FROM T549R
INTO ld_pay_frequ.


"populate fields of struture and append to itab
append wa_variant_data to it_variant_data.
ld_no_remainder_calc = 'Check type of data required'.
ld_no_calculation = '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 HRAE_PBS_ACTIVE_PACKAGE_GET or its description.