SAP HRPY_AVERA_AVERAGE_PERIOD Function Module for
HRPY_AVERA_AVERAGE_PERIOD is a standard hrpy avera average period SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for hrpy avera average period FM, simply by entering the name HRPY_AVERA_AVERAGE_PERIOD into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRPAY99_FUNCTION
Program Name: SAPLHRPAY99_FUNCTION
Main Program: SAPLHRPAY99_FUNCTION
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function HRPY_AVERA_AVERAGE_PERIOD pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'HRPY_AVERA_AVERAGE_PERIOD'".
EXPORTING
APER = "
MOLGA = "
EMPLOYEE_NUMBER = "
* ACCRUAL_BEGDA = "
* ACCRUAL_ENDDA = "
IMPORTING
MAX_WEEK = "
MAX_MONTH = "
MAX_ROLL_MONTH = "
WITH_CURRENT_PERIOD = "
AV_ENDDA_WEEK = "
AV_ENDDA_MONTH = "
AV_ENDDA_ROLL_MONTH = "
WARNING = "
TABLES
I51AV_A = "
BUFFER_DIR = "
I51AV_A_WEEK = "
I51AV_A_MONTH = "
I51AV_A_ROLL_MONTH = "
I51AV_A_ACCRUAL_PERIOD = "
AV_RGDIR = "
RGDIR = "
RESULTS = "
TBUFF = "
EXCEPTIONS
WRONG_PAYTYPE = 1 NOT_END_OF_PERIOD = 2 TECHNICAL_ERROR = 3
IMPORTING Parameters details for HRPY_AVERA_AVERAGE_PERIOD
APER -
Data type: PC2APEROptional: No
Call by Reference: No ( called with pass by value option)
MOLGA -
Data type: T500L-MOLGAOptional: No
Call by Reference: No ( called with pass by value option)
EMPLOYEE_NUMBER -
Data type: PERNR-PERNROptional: No
Call by Reference: Yes
ACCRUAL_BEGDA -
Data type: P2006-BEGDAOptional: Yes
Call by Reference: No ( called with pass by value option)
ACCRUAL_ENDDA -
Data type: P2006-ENDDAOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HRPY_AVERA_AVERAGE_PERIOD
MAX_WEEK -
Data type: T51AV_A-RELNUMPOptional: No
Call by Reference: No ( called with pass by value option)
MAX_MONTH -
Data type: T51AV_A-RELNUMPOptional: No
Call by Reference: No ( called with pass by value option)
MAX_ROLL_MONTH -
Data type: T51AV_A-RELNUMPOptional: No
Call by Reference: No ( called with pass by value option)
WITH_CURRENT_PERIOD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
AV_ENDDA_WEEK -
Data type: DOptional: No
Call by Reference: No ( called with pass by value option)
AV_ENDDA_MONTH -
Data type: DOptional: No
Call by Reference: No ( called with pass by value option)
AV_ENDDA_ROLL_MONTH -
Data type: DOptional: No
Call by Reference: No ( called with pass by value option)
WARNING -
Data type: COptional: No
Call by Reference: Yes
TABLES Parameters details for HRPY_AVERA_AVERAGE_PERIOD
I51AV_A -
Data type: T51AV_AOptional: No
Call by Reference: No ( called with pass by value option)
BUFFER_DIR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
I51AV_A_WEEK -
Data type: T51AV_AOptional: No
Call by Reference: No ( called with pass by value option)
I51AV_A_MONTH -
Data type: T51AV_AOptional: No
Call by Reference: No ( called with pass by value option)
I51AV_A_ROLL_MONTH -
Data type: T51AV_AOptional: No
Call by Reference: No ( called with pass by value option)
I51AV_A_ACCRUAL_PERIOD -
Data type: T51AV_AOptional: No
Call by Reference: Yes
AV_RGDIR -
Data type: PC261Optional: No
Call by Reference: No ( called with pass by value option)
RGDIR -
Data type: PC261Optional: No
Call by Reference: No ( called with pass by value option)
RESULTS -
Data type: HRPAY99_TAB_OF_RESULTSOptional: No
Call by Reference: No ( called with pass by value option)
TBUFF -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
WRONG_PAYTYPE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_END_OF_PERIOD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TECHNICAL_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for HRPY_AVERA_AVERAGE_PERIOD Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_aper | TYPE PC2APER, " | |||
lt_i51av_a | TYPE STANDARD TABLE OF T51AV_A, " | |||
lv_max_week | TYPE T51AV_A-RELNUMP, " | |||
lv_wrong_paytype | TYPE T51AV_A, " | |||
lt_buffer_dir | TYPE STANDARD TABLE OF T51AV_A, " | |||
lv_molga | TYPE T500L-MOLGA, " | |||
lv_max_month | TYPE T51AV_A-RELNUMP, " | |||
lt_i51av_a_week | TYPE STANDARD TABLE OF T51AV_A, " | |||
lv_not_end_of_period | TYPE T51AV_A, " | |||
lt_i51av_a_month | TYPE STANDARD TABLE OF T51AV_A, " | |||
lv_max_roll_month | TYPE T51AV_A-RELNUMP, " | |||
lv_employee_number | TYPE PERNR-PERNR, " | |||
lv_technical_error | TYPE PERNR, " | |||
lv_accrual_begda | TYPE P2006-BEGDA, " | |||
lt_i51av_a_roll_month | TYPE STANDARD TABLE OF T51AV_A, " | |||
lv_with_current_period | TYPE T51AV_A, " | |||
lv_accrual_endda | TYPE P2006-ENDDA, " | |||
lv_av_endda_week | TYPE D, " | |||
lt_i51av_a_accrual_period | TYPE STANDARD TABLE OF T51AV_A, " | |||
lt_av_rgdir | TYPE STANDARD TABLE OF PC261, " | |||
lv_av_endda_month | TYPE D, " | |||
lt_rgdir | TYPE STANDARD TABLE OF PC261, " | |||
lv_av_endda_roll_month | TYPE D, " | |||
lt_results | TYPE STANDARD TABLE OF HRPAY99_TAB_OF_RESULTS, " | |||
lv_warning | TYPE C, " | |||
lt_tbuff | TYPE STANDARD TABLE OF C. " |
  CALL FUNCTION 'HRPY_AVERA_AVERAGE_PERIOD' " |
EXPORTING | ||
APER | = lv_aper | |
MOLGA | = lv_molga | |
EMPLOYEE_NUMBER | = lv_employee_number | |
ACCRUAL_BEGDA | = lv_accrual_begda | |
ACCRUAL_ENDDA | = lv_accrual_endda | |
IMPORTING | ||
MAX_WEEK | = lv_max_week | |
MAX_MONTH | = lv_max_month | |
MAX_ROLL_MONTH | = lv_max_roll_month | |
WITH_CURRENT_PERIOD | = lv_with_current_period | |
AV_ENDDA_WEEK | = lv_av_endda_week | |
AV_ENDDA_MONTH | = lv_av_endda_month | |
AV_ENDDA_ROLL_MONTH | = lv_av_endda_roll_month | |
WARNING | = lv_warning | |
TABLES | ||
I51AV_A | = lt_i51av_a | |
BUFFER_DIR | = lt_buffer_dir | |
I51AV_A_WEEK | = lt_i51av_a_week | |
I51AV_A_MONTH | = lt_i51av_a_month | |
I51AV_A_ROLL_MONTH | = lt_i51av_a_roll_month | |
I51AV_A_ACCRUAL_PERIOD | = lt_i51av_a_accrual_period | |
AV_RGDIR | = lt_av_rgdir | |
RGDIR | = lt_rgdir | |
RESULTS | = lt_results | |
TBUFF | = lt_tbuff | |
EXCEPTIONS | ||
WRONG_PAYTYPE = 1 | ||
NOT_END_OF_PERIOD = 2 | ||
TECHNICAL_ERROR = 3 | ||
. " HRPY_AVERA_AVERAGE_PERIOD |
ABAP code using 7.40 inline data declarations to call FM HRPY_AVERA_AVERAGE_PERIOD
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8."SELECT single RELNUMP FROM T51AV_A INTO @DATA(ld_max_week). | ||||
"SELECT single MOLGA FROM T500L INTO @DATA(ld_molga). | ||||
"SELECT single RELNUMP FROM T51AV_A INTO @DATA(ld_max_month). | ||||
"SELECT single RELNUMP FROM T51AV_A INTO @DATA(ld_max_roll_month). | ||||
"SELECT single PERNR FROM PERNR INTO @DATA(ld_employee_number). | ||||
"SELECT single BEGDA FROM P2006 INTO @DATA(ld_accrual_begda). | ||||
"SELECT single ENDDA FROM P2006 INTO @DATA(ld_accrual_endda). | ||||
Search for further information about these or an SAP related objects