SAP THMHR_BATCH_HEDGE_EXPIRE_DATE Function Module for Find Hedge Expiration Date









THMHR_BATCH_HEDGE_EXPIRE_DATE is a standard thmhr batch hedge expire date SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Find Hedge Expiration Date 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 batch hedge expire date FM, simply by entering the name THMHR_BATCH_HEDGE_EXPIRE_DATE into the relevant SAP transaction such as SE37 or SE38.

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



Function THMHR_BATCH_HEDGE_EXPIRE_DATE 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_BATCH_HEDGE_EXPIRE_DATE'"Find Hedge Expiration Date
EXPORTING
I_BUKRS = "Company code
* I_TAB_TRANS_IR = "Table Type for THMEXT_TRANS_IR
* I_TAB_TRANS_CO = "Commodity-Transaktionen
* I_TAB_HEDGE = "Table Type for THMT_HEDGE_ITEM
* I_STR_PLANNER = "Hedge Management: Hedge Plan
I_PLANNER = "Hedge Management: Hedge Planner ID
I_HEDGE = "Hedge Item Identification Number
I_VAL_AREA = "Valuation Area
* I_FLG_NO_DB_READ = "Checkbox
* I_TAB_EXPOS = "Table Type for THMEXT_EXPOS
* I_TAB_TRANS = "Table Type for THMEXT_TRANS
* I_TAB_EXP_HDG = "Table Type for THAEXT_EXP_HDG
* I_TAB_TRANS_FX = "Table Type for THMEXT_TRANS_FX

IMPORTING
E_DATE = "Hedge Management: date the exposure is related to

EXCEPTIONS
NO_HEDGE_FOUND = 1
.



IMPORTING Parameters details for THMHR_BATCH_HEDGE_EXPIRE_DATE

I_BUKRS - Company code

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

I_TAB_TRANS_IR - Table Type for THMEXT_TRANS_IR

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

I_TAB_TRANS_CO - Commodity-Transaktionen

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

I_TAB_HEDGE - Table Type for THMT_HEDGE_ITEM

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

I_STR_PLANNER - Hedge Management: Hedge Plan

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

I_PLANNER - Hedge Management: Hedge Planner ID

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

I_HEDGE - Hedge Item Identification Number

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

I_VAL_AREA - Valuation Area

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

I_FLG_NO_DB_READ - Checkbox

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

I_TAB_EXPOS - Table Type for THMEXT_EXPOS

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

I_TAB_TRANS - Table Type for THMEXT_TRANS

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

I_TAB_EXP_HDG - Table Type for THAEXT_EXP_HDG

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

I_TAB_TRANS_FX - Table Type for THMEXT_TRANS_FX

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

EXPORTING Parameters details for THMHR_BATCH_HEDGE_EXPIRE_DATE

E_DATE - Hedge Management: date the exposure is related to

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

EXCEPTIONS details

NO_HEDGE_FOUND - No hedge found

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for THMHR_BATCH_HEDGE_EXPIRE_DATE 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_e_date  TYPE THM_EXPDATE, "   
lv_i_bukrs  TYPE BUKRS, "   
lv_no_hedge_found  TYPE BUKRS, "   
lv_i_tab_trans_ir  TYPE THAEXY_TRANS_IR, "   
lv_i_tab_trans_co  TYPE THAEXY_TRANS_CO, "   
lv_i_tab_hedge  TYPE THAY_HEDGE_ITEM, "   
lv_i_str_planner  TYPE THMEXT_PLANNER, "   
lv_i_planner  TYPE THM_PLANNERID, "   
lv_i_hedge  TYPE THM_HEDGE_ID, "   
lv_i_val_area  TYPE TPM_VAL_AREA, "   
lv_i_flg_no_db_read  TYPE XFELD, "   
lv_i_tab_expos  TYPE THAEXY_EXPOS, "   
lv_i_tab_trans  TYPE THAEXY_TRANS, "   
lv_i_tab_exp_hdg  TYPE THAEXY_EXP_HDG, "   
lv_i_tab_trans_fx  TYPE THAEXY_TRANS_FX. "   

  CALL FUNCTION 'THMHR_BATCH_HEDGE_EXPIRE_DATE'  "Find Hedge Expiration Date
    EXPORTING
         I_BUKRS = lv_i_bukrs
         I_TAB_TRANS_IR = lv_i_tab_trans_ir
         I_TAB_TRANS_CO = lv_i_tab_trans_co
         I_TAB_HEDGE = lv_i_tab_hedge
         I_STR_PLANNER = lv_i_str_planner
         I_PLANNER = lv_i_planner
         I_HEDGE = lv_i_hedge
         I_VAL_AREA = lv_i_val_area
         I_FLG_NO_DB_READ = lv_i_flg_no_db_read
         I_TAB_EXPOS = lv_i_tab_expos
         I_TAB_TRANS = lv_i_tab_trans
         I_TAB_EXP_HDG = lv_i_tab_exp_hdg
         I_TAB_TRANS_FX = lv_i_tab_trans_fx
    IMPORTING
         E_DATE = lv_e_date
    EXCEPTIONS
        NO_HEDGE_FOUND = 1
. " THMHR_BATCH_HEDGE_EXPIRE_DATE




ABAP code using 7.40 inline data declarations to call FM THMHR_BATCH_HEDGE_EXPIRE_DATE

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!