SAP Function Modules

HR_TIME_EVALUATION SAP Function module







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

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


Pattern for FM HR_TIME_EVALUATION - HR TIME EVALUATION





CALL FUNCTION 'HR_TIME_EVALUATION' "
* EXPORTING
*   evaluation_begin =          " rptaxxxx-begda  Forced recalculation as of
*   evaluation_end =            " rptaxxxx-endda  Evaluation up to
*   selection_variant =         " vari-variant  Report variant for time evaluation
*   log =                       "
  TABLES
    employee_numbers =          " rptpernr      Personnel numbers for evaluation
*   simulated_infotypes =       " rptinfty      List of infotypes for simulation
*   simulated_data =            " prelp         Infotype records for simulation
*   buffer =                    "
*   buffer_directory =          "               PCLx buffer directory
*   ppsoper =                   "               Changed infotype records
*   list_output =               "               Time evaluation log as ASCI list
  EXCEPTIONS
    VARIANT_NOT_EXIST = 1       "               Report variant does not exist
    PROGRAM_NOT_EXIST = 2       "               Time evaluation program does not exist
    .  "  HR_TIME_EVALUATION

ABAP code example for Function Module HR_TIME_EVALUATION





The ABAP code below is a full code listing to execute function module HR_TIME_EVALUATION 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_employee_numbers  TYPE STANDARD TABLE OF RPTPERNR,"TABLES PARAM
wa_employee_numbers  LIKE LINE OF it_employee_numbers ,
it_simulated_infotypes  TYPE STANDARD TABLE OF RPTINFTY,"TABLES PARAM
wa_simulated_infotypes  LIKE LINE OF it_simulated_infotypes ,
it_simulated_data  TYPE STANDARD TABLE OF PRELP,"TABLES PARAM
wa_simulated_data  LIKE LINE OF it_simulated_data ,
it_buffer  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_buffer  LIKE LINE OF it_buffer ,
it_buffer_directory  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_buffer_directory  LIKE LINE OF it_buffer_directory ,
it_ppsoper  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_ppsoper  LIKE LINE OF it_ppsoper ,
it_list_output  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_list_output  LIKE LINE OF it_list_output .


DATA(ld_evaluation_begin) = 20210129

DATA(ld_evaluation_end) = 20210129

SELECT single VARIANT
FROM VARI
INTO @DATA(ld_selection_variant).

DATA(ld_log) = 'some text here'.

"populate fields of struture and append to itab
append wa_employee_numbers to it_employee_numbers.

"populate fields of struture and append to itab
append wa_simulated_infotypes to it_simulated_infotypes.

"populate fields of struture and append to itab
append wa_simulated_data to it_simulated_data.

"populate fields of struture and append to itab
append wa_buffer to it_buffer.

"populate fields of struture and append to itab
append wa_buffer_directory to it_buffer_directory.

"populate fields of struture and append to itab
append wa_ppsoper to it_ppsoper.

"populate fields of struture and append to itab
append wa_list_output to it_list_output. . CALL FUNCTION 'HR_TIME_EVALUATION' * EXPORTING * evaluation_begin = ld_evaluation_begin * evaluation_end = ld_evaluation_end * selection_variant = ld_selection_variant * log = ld_log TABLES employee_numbers = it_employee_numbers * simulated_infotypes = it_simulated_infotypes * simulated_data = it_simulated_data * buffer = it_buffer * buffer_directory = it_buffer_directory * ppsoper = it_ppsoper * list_output = it_list_output EXCEPTIONS VARIANT_NOT_EXIST = 1 PROGRAM_NOT_EXIST = 2 . " HR_TIME_EVALUATION
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 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_evaluation_begin  TYPE RPTAXXXX-BEGDA ,
it_employee_numbers  TYPE STANDARD TABLE OF RPTPERNR ,
wa_employee_numbers  LIKE LINE OF it_employee_numbers,
ld_evaluation_end  TYPE RPTAXXXX-ENDDA ,
it_simulated_infotypes  TYPE STANDARD TABLE OF RPTINFTY ,
wa_simulated_infotypes  LIKE LINE OF it_simulated_infotypes,
ld_selection_variant  TYPE VARI-VARIANT ,
it_simulated_data  TYPE STANDARD TABLE OF PRELP ,
wa_simulated_data  LIKE LINE OF it_simulated_data,
ld_log  TYPE STRING ,
it_buffer  TYPE STANDARD TABLE OF STRING ,
wa_buffer  LIKE LINE OF it_buffer,
it_buffer_directory  TYPE STANDARD TABLE OF STRING ,
wa_buffer_directory  LIKE LINE OF it_buffer_directory,
it_ppsoper  TYPE STANDARD TABLE OF STRING ,
wa_ppsoper  LIKE LINE OF it_ppsoper,
it_list_output  TYPE STANDARD TABLE OF STRING ,
wa_list_output  LIKE LINE OF it_list_output.


ld_evaluation_begin = 20210129

"populate fields of struture and append to itab
append wa_employee_numbers to it_employee_numbers.

ld_evaluation_end = 20210129

"populate fields of struture and append to itab
append wa_simulated_infotypes to it_simulated_infotypes.

SELECT single VARIANT
FROM VARI
INTO ld_selection_variant.


"populate fields of struture and append to itab
append wa_simulated_data to it_simulated_data.
ld_log = 'some text here'.

"populate fields of struture and append to itab
append wa_buffer to it_buffer.

"populate fields of struture and append to itab
append wa_buffer_directory to it_buffer_directory.

"populate fields of struture and append to itab
append wa_ppsoper to it_ppsoper.

"populate fields of struture and append to itab
append wa_list_output to it_list_output.

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