SAP HR_SEN_CALCULATE_PROCESS_STEP Function Module for Employment Period Calculation for Calculation Process Step









HR_SEN_CALCULATE_PROCESS_STEP is a standard hr sen calculate process step SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Employment Period Calculation for Calculation Process Step processing and below is the pattern details for this FM, 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 hr sen calculate process step FM, simply by entering the name HR_SEN_CALCULATE_PROCESS_STEP into the relevant SAP transaction such as SE37 or SE38.

Function Group: HRSEN00EVALUATION
Program Name: SAPLHRSEN00EVALUATION
Main Program: SAPLHRSEN00EVALUATION
Appliation area: P
Release date: 24-May-2000
Mode(Normal, Remote etc): Normal Function Module
Update:



Function HR_SEN_CALCULATE_PROCESS_STEP 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 'HR_SEN_CALCULATE_PROCESS_STEP'"Employment Period Calculation for Calculation Process Step
EXPORTING
ID_MOLGA = "Country Grouping
* ID_BEGDA = "Evaluation Start
* ID_ENDDA = "Evaluation end
* IS_DURATION = "Duration
* IS_TSPST_CONTROL = "Evaluation Sample Control
* ID_PROTO = "Log for Employment Period Calculation
ID_PROCE = "Calculation Process
* ID_PSTEP = "Process step
ID_PERNR = "Personnel Number
* ID_SEL_DATE = SY-DATUM "Selection Date
* ID_AUTHO = "Authorization Check
ID_CRULE = "Conversion Rule for Calculations
* IT_PSTEP_TSPST = "Override Valuation Model for Each Process Step
* ID_CALTY = "Calculation Type

IMPORTING
ED_DATE = "Key Date Result
ES_DURATION = "Duration Result
ET_WEIGHT_PERIOD = "Weighted Periods
ET_WEIGHT_PEAK = "Weighted Decimal Peak
ED_RDATE = "Start /End of First / Last Relevant Employment Period
ES_RDURATION = "Exception: Max. Duration in Years, Months, and Days

EXCEPTIONS
WRONG_IMPORT_PARAMETER = 1 WRONG_CALCULATION_TYPE = 2 NO_RESULT_FOR_CALTY = 3 ERROR_OF_OTHER_FUNCTIONS = 4
.



IMPORTING Parameters details for HR_SEN_CALCULATE_PROCESS_STEP

ID_MOLGA - Country Grouping

Data type: T525P-MOLGA
Optional: No
Call by Reference: Yes

ID_BEGDA - Evaluation Start

Data type: BEGDA
Optional: Yes
Call by Reference: Yes

ID_ENDDA - Evaluation end

Data type: ENDDA
Optional: Yes
Call by Reference: Yes

IS_DURATION - Duration

Data type: PSEN_DURATION
Optional: Yes
Call by Reference: Yes

IS_TSPST_CONTROL - Evaluation Sample Control

Data type: PSEN_TSPST_CONTROL
Optional: Yes
Call by Reference: Yes

ID_PROTO - Log for Employment Period Calculation

Data type: PSEN_PROTO
Optional: Yes
Call by Reference: Yes

ID_PROCE - Calculation Process

Data type: T525P-PROCE
Optional: No
Call by Reference: Yes

ID_PSTEP - Process step

Data type: T525R-PSTEP
Optional: Yes
Call by Reference: Yes

ID_PERNR - Personnel Number

Data type: PERNR-PERNR
Optional: No
Call by Reference: Yes

ID_SEL_DATE - Selection Date

Data type: BEGDA
Default: SY-DATUM
Optional: Yes
Call by Reference: Yes

ID_AUTHO - Authorization Check

Data type: T525P-AUTHO
Optional: Yes
Call by Reference: Yes

ID_CRULE - Conversion Rule for Calculations

Data type: T525P-CRULE
Optional: No
Call by Reference: Yes

IT_PSTEP_TSPST - Override Valuation Model for Each Process Step

Data type: HRSEN00_PSTEP_TSPST
Optional: Yes
Call by Reference: Yes

ID_CALTY - Calculation Type

Data type: PSEN_CALTY
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for HR_SEN_CALCULATE_PROCESS_STEP

ED_DATE - Key Date Result

Data type: ENDDA
Optional: No
Call by Reference: Yes

ES_DURATION - Duration Result

Data type: PSEN_DURATION_DEC
Optional: No
Call by Reference: Yes

ET_WEIGHT_PERIOD - Weighted Periods

Data type: HRSEN00_WEIGHT_PERIOD
Optional: No
Call by Reference: Yes

ET_WEIGHT_PEAK - Weighted Decimal Peak

Data type: HRSEN00_WEIGHT_PEAK_DEC
Optional: No
Call by Reference: Yes

ED_RDATE - Start /End of First / Last Relevant Employment Period

Data type: D
Optional: No
Call by Reference: Yes

ES_RDURATION - Exception: Max. Duration in Years, Months, and Days

Data type: PSEN_DURATION_DEC
Optional: No
Call by Reference: Yes

EXCEPTIONS details

WRONG_IMPORT_PARAMETER - Incorrect Import Parameter

Data type:
Optional: No
Call by Reference: Yes

WRONG_CALCULATION_TYPE - Incorrect Calculation Type Parameter

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_RESULT_FOR_CALTY - No Result for Selected Calculation Type

Data type:
Optional: No
Call by Reference: Yes

ERROR_OF_OTHER_FUNCTIONS - Errors in Other Function Modules

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for HR_SEN_CALCULATE_PROCESS_STEP 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_ed_date  TYPE ENDDA, "   
lv_id_molga  TYPE T525P-MOLGA, "   
lv_wrong_import_parameter  TYPE T525P, "   
lv_id_begda  TYPE BEGDA, "   
lv_id_endda  TYPE ENDDA, "   
lv_is_duration  TYPE PSEN_DURATION, "   
lv_is_tspst_control  TYPE PSEN_TSPST_CONTROL, "   
lv_id_proto  TYPE PSEN_PROTO, "   
lv_id_proce  TYPE T525P-PROCE, "   
lv_es_duration  TYPE PSEN_DURATION_DEC, "   
lv_wrong_calculation_type  TYPE PSEN_DURATION_DEC, "   
lv_id_pstep  TYPE T525R-PSTEP, "   
lv_et_weight_period  TYPE HRSEN00_WEIGHT_PERIOD, "   
lv_no_result_for_calty  TYPE HRSEN00_WEIGHT_PERIOD, "   
lv_id_pernr  TYPE PERNR-PERNR, "   
lv_et_weight_peak  TYPE HRSEN00_WEIGHT_PEAK_DEC, "   
lv_error_of_other_functions  TYPE HRSEN00_WEIGHT_PEAK_DEC, "   
lv_ed_rdate  TYPE D, "   
lv_id_sel_date  TYPE BEGDA, "   SY-DATUM
lv_id_autho  TYPE T525P-AUTHO, "   
lv_es_rduration  TYPE PSEN_DURATION_DEC, "   
lv_id_crule  TYPE T525P-CRULE, "   
lv_it_pstep_tspst  TYPE HRSEN00_PSTEP_TSPST, "   
lv_id_calty  TYPE PSEN_CALTY. "   

  CALL FUNCTION 'HR_SEN_CALCULATE_PROCESS_STEP'  "Employment Period Calculation for Calculation Process Step
    EXPORTING
         ID_MOLGA = lv_id_molga
         ID_BEGDA = lv_id_begda
         ID_ENDDA = lv_id_endda
         IS_DURATION = lv_is_duration
         IS_TSPST_CONTROL = lv_is_tspst_control
         ID_PROTO = lv_id_proto
         ID_PROCE = lv_id_proce
         ID_PSTEP = lv_id_pstep
         ID_PERNR = lv_id_pernr
         ID_SEL_DATE = lv_id_sel_date
         ID_AUTHO = lv_id_autho
         ID_CRULE = lv_id_crule
         IT_PSTEP_TSPST = lv_it_pstep_tspst
         ID_CALTY = lv_id_calty
    IMPORTING
         ED_DATE = lv_ed_date
         ES_DURATION = lv_es_duration
         ET_WEIGHT_PERIOD = lv_et_weight_period
         ET_WEIGHT_PEAK = lv_et_weight_peak
         ED_RDATE = lv_ed_rdate
         ES_RDURATION = lv_es_rduration
    EXCEPTIONS
        WRONG_IMPORT_PARAMETER = 1
        WRONG_CALCULATION_TYPE = 2
        NO_RESULT_FOR_CALTY = 3
        ERROR_OF_OTHER_FUNCTIONS = 4
. " HR_SEN_CALCULATE_PROCESS_STEP




ABAP code using 7.40 inline data declarations to call FM HR_SEN_CALCULATE_PROCESS_STEP

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 MOLGA FROM T525P INTO @DATA(ld_id_molga).
 
 
 
 
 
 
 
"SELECT single PROCE FROM T525P INTO @DATA(ld_id_proce).
 
 
 
"SELECT single PSTEP FROM T525R INTO @DATA(ld_id_pstep).
 
 
 
"SELECT single PERNR FROM PERNR INTO @DATA(ld_id_pernr).
 
 
 
 
DATA(ld_id_sel_date) = SY-DATUM.
 
"SELECT single AUTHO FROM T525P INTO @DATA(ld_id_autho).
 
 
"SELECT single CRULE FROM T525P INTO @DATA(ld_id_crule).
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!