SAP Function Modules

HRPY_AVERA_LOOP_AT_MONTH SAP Function module







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

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


Pattern for FM HRPY_AVERA_LOOP_AT_MONTH - HRPY AVERA LOOP AT MONTH





CALL FUNCTION 'HRPY_AVERA_LOOP_AT_MONTH' "
  EXPORTING
    max_month =                 "
    av_endda_month =            "
    with_current_period =       "
    aper =                      " pc2aper
    employee_number =           " pernr-pernr
  TABLES
    i51av_a_month =             " t51av_a
    i51av_r =                   " t51av_r
    i51av_roc =                 " t51av_roc
    i51av_b =                   " t51av_b
    i51av_c =                   " t51av_c
    rgdir =                     " pc261
    results =                   " hrpay99_tab_of_results
    cumulation =                " hrpy_av_cumulation
    result_rel_payr_all =       " hrpy_av_rel_payr
    result_rel_period =         " hrpy_av_rel_period
    datumsangabe =              "
    p0000 =                     " p0000
    p0001 =                     " p0001
    .  "  HRPY_AVERA_LOOP_AT_MONTH

ABAP code example for Function Module HRPY_AVERA_LOOP_AT_MONTH





The ABAP code below is a full code listing to execute function module HRPY_AVERA_LOOP_AT_MONTH 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_i51av_a_month  TYPE STANDARD TABLE OF T51AV_A,"TABLES PARAM
wa_i51av_a_month  LIKE LINE OF it_i51av_a_month ,
it_i51av_r  TYPE STANDARD TABLE OF T51AV_R,"TABLES PARAM
wa_i51av_r  LIKE LINE OF it_i51av_r ,
it_i51av_roc  TYPE STANDARD TABLE OF T51AV_ROC,"TABLES PARAM
wa_i51av_roc  LIKE LINE OF it_i51av_roc ,
it_i51av_b  TYPE STANDARD TABLE OF T51AV_B,"TABLES PARAM
wa_i51av_b  LIKE LINE OF it_i51av_b ,
it_i51av_c  TYPE STANDARD TABLE OF T51AV_C,"TABLES PARAM
wa_i51av_c  LIKE LINE OF it_i51av_c ,
it_rgdir  TYPE STANDARD TABLE OF PC261,"TABLES PARAM
wa_rgdir  LIKE LINE OF it_rgdir ,
it_results  TYPE STANDARD TABLE OF HRPAY99_TAB_OF_RESULTS,"TABLES PARAM
wa_results  LIKE LINE OF it_results ,
it_cumulation  TYPE STANDARD TABLE OF HRPY_AV_CUMULATION,"TABLES PARAM
wa_cumulation  LIKE LINE OF it_cumulation ,
it_result_rel_payr_all  TYPE STANDARD TABLE OF HRPY_AV_REL_PAYR,"TABLES PARAM
wa_result_rel_payr_all  LIKE LINE OF it_result_rel_payr_all ,
it_result_rel_period  TYPE STANDARD TABLE OF HRPY_AV_REL_PERIOD,"TABLES PARAM
wa_result_rel_period  LIKE LINE OF it_result_rel_period ,
it_datumsangabe  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_datumsangabe  LIKE LINE OF it_datumsangabe ,
it_p0000  TYPE STANDARD TABLE OF P0000,"TABLES PARAM
wa_p0000  LIKE LINE OF it_p0000 ,
it_p0001  TYPE STANDARD TABLE OF P0001,"TABLES PARAM
wa_p0001  LIKE LINE OF it_p0001 .

DATA(ld_max_month) = 'some text here'.
DATA(ld_av_endda_month) = 'some text here'.
DATA(ld_with_current_period) = 'some text here'.
DATA(ld_aper) = 'Check type of data required'.

DATA(ld_employee_number) = Check type of data required

"populate fields of struture and append to itab
append wa_i51av_a_month to it_i51av_a_month.

"populate fields of struture and append to itab
append wa_i51av_r to it_i51av_r.

"populate fields of struture and append to itab
append wa_i51av_roc to it_i51av_roc.

"populate fields of struture and append to itab
append wa_i51av_b to it_i51av_b.

"populate fields of struture and append to itab
append wa_i51av_c to it_i51av_c.

"populate fields of struture and append to itab
append wa_rgdir to it_rgdir.

"populate fields of struture and append to itab
append wa_results to it_results.

"populate fields of struture and append to itab
append wa_cumulation to it_cumulation.

"populate fields of struture and append to itab
append wa_result_rel_payr_all to it_result_rel_payr_all.

"populate fields of struture and append to itab
append wa_result_rel_period to it_result_rel_period.

"populate fields of struture and append to itab
append wa_datumsangabe to it_datumsangabe.

"populate fields of struture and append to itab
append wa_p0000 to it_p0000.

"populate fields of struture and append to itab
append wa_p0001 to it_p0001. . CALL FUNCTION 'HRPY_AVERA_LOOP_AT_MONTH' EXPORTING max_month = ld_max_month av_endda_month = ld_av_endda_month with_current_period = ld_with_current_period aper = ld_aper employee_number = ld_employee_number TABLES i51av_a_month = it_i51av_a_month i51av_r = it_i51av_r i51av_roc = it_i51av_roc i51av_b = it_i51av_b i51av_c = it_i51av_c rgdir = it_rgdir results = it_results cumulation = it_cumulation result_rel_payr_all = it_result_rel_payr_all result_rel_period = it_result_rel_period datumsangabe = it_datumsangabe p0000 = it_p0000 p0001 = it_p0001 . " HRPY_AVERA_LOOP_AT_MONTH
IF SY-SUBRC EQ 0. "All OK 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_max_month  TYPE STRING ,
it_i51av_a_month  TYPE STANDARD TABLE OF T51AV_A ,
wa_i51av_a_month  LIKE LINE OF it_i51av_a_month,
ld_av_endda_month  TYPE STRING ,
it_i51av_r  TYPE STANDARD TABLE OF T51AV_R ,
wa_i51av_r  LIKE LINE OF it_i51av_r,
ld_with_current_period  TYPE STRING ,
it_i51av_roc  TYPE STANDARD TABLE OF T51AV_ROC ,
wa_i51av_roc  LIKE LINE OF it_i51av_roc,
ld_aper  TYPE PC2APER ,
it_i51av_b  TYPE STANDARD TABLE OF T51AV_B ,
wa_i51av_b  LIKE LINE OF it_i51av_b,
ld_employee_number  TYPE PERNR-PERNR ,
it_i51av_c  TYPE STANDARD TABLE OF T51AV_C ,
wa_i51av_c  LIKE LINE OF it_i51av_c,
it_rgdir  TYPE STANDARD TABLE OF PC261 ,
wa_rgdir  LIKE LINE OF it_rgdir,
it_results  TYPE STANDARD TABLE OF HRPAY99_TAB_OF_RESULTS ,
wa_results  LIKE LINE OF it_results,
it_cumulation  TYPE STANDARD TABLE OF HRPY_AV_CUMULATION ,
wa_cumulation  LIKE LINE OF it_cumulation,
it_result_rel_payr_all  TYPE STANDARD TABLE OF HRPY_AV_REL_PAYR ,
wa_result_rel_payr_all  LIKE LINE OF it_result_rel_payr_all,
it_result_rel_period  TYPE STANDARD TABLE OF HRPY_AV_REL_PERIOD ,
wa_result_rel_period  LIKE LINE OF it_result_rel_period,
it_datumsangabe  TYPE STANDARD TABLE OF STRING ,
wa_datumsangabe  LIKE LINE OF it_datumsangabe,
it_p0000  TYPE STANDARD TABLE OF P0000 ,
wa_p0000  LIKE LINE OF it_p0000,
it_p0001  TYPE STANDARD TABLE OF P0001 ,
wa_p0001  LIKE LINE OF it_p0001.

ld_max_month = 'some text here'.

"populate fields of struture and append to itab
append wa_i51av_a_month to it_i51av_a_month.
ld_av_endda_month = 'some text here'.

"populate fields of struture and append to itab
append wa_i51av_r to it_i51av_r.
ld_with_current_period = 'some text here'.

"populate fields of struture and append to itab
append wa_i51av_roc to it_i51av_roc.
ld_aper = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i51av_b to it_i51av_b.

ld_employee_number = Check type of data required

"populate fields of struture and append to itab
append wa_i51av_c to it_i51av_c.

"populate fields of struture and append to itab
append wa_rgdir to it_rgdir.

"populate fields of struture and append to itab
append wa_results to it_results.

"populate fields of struture and append to itab
append wa_cumulation to it_cumulation.

"populate fields of struture and append to itab
append wa_result_rel_payr_all to it_result_rel_payr_all.

"populate fields of struture and append to itab
append wa_result_rel_period to it_result_rel_period.

"populate fields of struture and append to itab
append wa_datumsangabe to it_datumsangabe.

"populate fields of struture and append to itab
append wa_p0000 to it_p0000.

"populate fields of struture and append to itab
append wa_p0001 to it_p0001.

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