SAP THMHR_BASIC_VALUES_CALCULATE Function Module for Effectiveness Calculation of Hedging Relationship









THMHR_BASIC_VALUES_CALCULATE is a standard thmhr basic values calculate SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Effectiveness Calculation of Hedging Relationship 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 thmhr basic values calculate FM, simply by entering the name THMHR_BASIC_VALUES_CALCULATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: THMHR_ASSESSMENT
Program Name: SAPLTHMHR_ASSESSMENT
Main Program: SAPLTHMHR_ASSESSMENT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function THMHR_BASIC_VALUES_CALCULATE 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 'THMHR_BASIC_VALUES_CALCULATE'"Effectiveness Calculation of Hedging Relationship
EXPORTING
IM_VALUATION_DATE = "Date of valuation (period end)
IM_FACTOR_HEDGE_ITEM = "Factor for the designated part of the hedge item
IM_FLG_STARTVALUE = "Determine hedged item's value at inception date
IM_KEYF_ENGINE = "
* IM_SZENARIO = "Business Scenario
* IM_SZVERL = "Szenarienverlauf
* IM_P_DETAILED_LOG = "Detail Log of Effectiveness Test
IM_DERIVATIVE = "
IM_CALC_DATE = "Date of calculation
IM_CALC_TYPE = "Calculation category for effectiveness
IM_HEDGE_ITEM_ID = "Hedge Item Identification Number
IM_CF_CAT = "Method of ineffectiveness measurement
IM_RESULT_CURRENCY = "Result currency (if not set -> companycode currency)
* IM_FLG_LV = "Calculate value for start date
* IM_FLG_PRIOR_VAL = "There is a prior valuation
IM_FACTOR_DERIVATIVE = "Factor for the designated part of the derivative

IMPORTING
EX_VALUE_DERIVATIVE = "Delta in derivative cash flows
EX_VALUE_HEDGE_ITEM = "Delta in hedge item cash flows

CHANGING
* CH_HORIZON_DATE = "Date of calculation

EXCEPTIONS
WRONG_INPUT_DATA = 1 NO_EFFECTIVENESS_CALCULATED = 2 NOMINAL_DER_NOT_FOUND = 3 NOMINAL_HEDGE_NOT_FOUND = 4 READING_NOT_SUCCESSFUL = 5 NO_FLOWS_AFTER_HORIZON = 6
.



IMPORTING Parameters details for THMHR_BASIC_VALUES_CALCULATE

IM_VALUATION_DATE - Date of valuation (period end)

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

IM_FACTOR_HEDGE_ITEM - Factor for the designated part of the hedge item

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

IM_FLG_STARTVALUE - Determine hedged item's value at inception date

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

IM_KEYF_ENGINE -

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

IM_SZENARIO - Business Scenario

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

IM_SZVERL - Szenarienverlauf

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

IM_P_DETAILED_LOG - Detail Log of Effectiveness Test

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

IM_DERIVATIVE -

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

IM_CALC_DATE - Date of calculation

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

IM_CALC_TYPE - Calculation category for effectiveness

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

IM_HEDGE_ITEM_ID - Hedge Item Identification Number

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

IM_CF_CAT - Method of ineffectiveness measurement

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

IM_RESULT_CURRENCY - Result currency (if not set -> companycode currency)

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

IM_FLG_LV - Calculate value for start date

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

IM_FLG_PRIOR_VAL - There is a prior valuation

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

IM_FACTOR_DERIVATIVE - Factor for the designated part of the derivative

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

EXPORTING Parameters details for THMHR_BASIC_VALUES_CALCULATE

EX_VALUE_DERIVATIVE - Delta in derivative cash flows

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

EX_VALUE_HEDGE_ITEM - Delta in hedge item cash flows

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

CHANGING Parameters details for THMHR_BASIC_VALUES_CALCULATE

CH_HORIZON_DATE - Date of calculation

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

EXCEPTIONS details

WRONG_INPUT_DATA - Something's wrong with the imported data

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

NO_EFFECTIVENESS_CALCULATED - Effectiveness couldn't be calculated

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

NOMINAL_DER_NOT_FOUND - Nominal of the derivative not found

Data type:
Optional: No
Call by Reference: Yes

NOMINAL_HEDGE_NOT_FOUND - Nominal of the hedge item not found

Data type:
Optional: No
Call by Reference: Yes

READING_NOT_SUCCESSFUL - Could not read value(s) from database

Data type:
Optional: No
Call by Reference: Yes

NO_FLOWS_AFTER_HORIZON -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for THMHR_BASIC_VALUES_CALCULATE 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_ch_horizon_date  TYPE THM_CALCULATION_DATE, "   
lv_wrong_input_data  TYPE THM_CALCULATION_DATE, "   
lv_im_valuation_date  TYPE THM_CALCULATION_DATE, "   
lv_ex_value_derivative  TYPE THM_DELTA_DERIVATIVE, "   
lv_im_factor_hedge_item  TYPE F, "   
lv_im_flg_startvalue  TYPE THM_STARTVALUE_SET, "   
lv_im_keyf_engine  TYPE IF_EX_FTBB_KEYF_ENGINE, "   
lv_im_szenario  TYPE TV_SZENARI, "   
lv_im_szverl  TYPE TV_SZVERL, "   
lv_im_p_detailed_log  TYPE CL_DETAILED_LOG_THA, "   
lv_im_derivative  TYPE IF_DERIVATIVE_THA, "   
lv_im_calc_date  TYPE THM_CALCULATION_DATE, "   
lv_ex_value_hedge_item  TYPE THM_DELTA_HEDGE, "   
lv_no_effectiveness_calculated  TYPE THM_DELTA_HEDGE, "   
lv_im_calc_type  TYPE THM_CALC_TYPE, "   
lv_nominal_der_not_found  TYPE THM_CALC_TYPE, "   
lv_im_hedge_item_id  TYPE THM_HEDGE_ID, "   
lv_nominal_hedge_not_found  TYPE THM_HEDGE_ID, "   
lv_im_cf_cat  TYPE THM_CASH_FLOW_EFF_CAT, "   
lv_reading_not_successful  TYPE THM_CASH_FLOW_EFF_CAT, "   
lv_im_result_currency  TYPE WAERS, "   
lv_no_flows_after_horizon  TYPE WAERS, "   
lv_im_flg_lv  TYPE XFELD, "   
lv_im_flg_prior_val  TYPE XFELD, "   
lv_im_factor_derivative  TYPE F. "   

  CALL FUNCTION 'THMHR_BASIC_VALUES_CALCULATE'  "Effectiveness Calculation of Hedging Relationship
    EXPORTING
         IM_VALUATION_DATE = lv_im_valuation_date
         IM_FACTOR_HEDGE_ITEM = lv_im_factor_hedge_item
         IM_FLG_STARTVALUE = lv_im_flg_startvalue
         IM_KEYF_ENGINE = lv_im_keyf_engine
         IM_SZENARIO = lv_im_szenario
         IM_SZVERL = lv_im_szverl
         IM_P_DETAILED_LOG = lv_im_p_detailed_log
         IM_DERIVATIVE = lv_im_derivative
         IM_CALC_DATE = lv_im_calc_date
         IM_CALC_TYPE = lv_im_calc_type
         IM_HEDGE_ITEM_ID = lv_im_hedge_item_id
         IM_CF_CAT = lv_im_cf_cat
         IM_RESULT_CURRENCY = lv_im_result_currency
         IM_FLG_LV = lv_im_flg_lv
         IM_FLG_PRIOR_VAL = lv_im_flg_prior_val
         IM_FACTOR_DERIVATIVE = lv_im_factor_derivative
    IMPORTING
         EX_VALUE_DERIVATIVE = lv_ex_value_derivative
         EX_VALUE_HEDGE_ITEM = lv_ex_value_hedge_item
    CHANGING
         CH_HORIZON_DATE = lv_ch_horizon_date
    EXCEPTIONS
        WRONG_INPUT_DATA = 1
        NO_EFFECTIVENESS_CALCULATED = 2
        NOMINAL_DER_NOT_FOUND = 3
        NOMINAL_HEDGE_NOT_FOUND = 4
        READING_NOT_SUCCESSFUL = 5
        NO_FLOWS_AFTER_HORIZON = 6
. " THMHR_BASIC_VALUES_CALCULATE




ABAP code using 7.40 inline data declarations to call FM THMHR_BASIC_VALUES_CALCULATE

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!