SAP THMEX_LOAD_PLAN_FROM_DB_MULTI Function Module for Read Data for Several Hedge Plans in One Company Code
THMEX_LOAD_PLAN_FROM_DB_MULTI is a standard thmex load plan from db multi SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Data for Several Hedge Plans in One Company Code 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 thmex load plan from db multi FM, simply by entering the name THMEX_LOAD_PLAN_FROM_DB_MULTI into the relevant SAP transaction such as SE37 or SE38.
Function Group: THMEX_HM_VIA_RO
Program Name: SAPLTHMEX_HM_VIA_RO
Main Program: SAPLTHMEX_HM_VIA_RO
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function THMEX_LOAD_PLAN_FROM_DB_MULTI 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 'THMEX_LOAD_PLAN_FROM_DB_MULTI'"Read Data for Several Hedge Plans in One Company Code.
EXPORTING
IM_BUKRS = "Range Table for Company Code
IM_RNG_PLANNERID = "Ranges Structure for the Hedge Plan
IMPORTING
EX_TAB_PLANNER = "Table Type for THMEXT_PLANNER
EX_TAB_EXP_HDG = "Table Type for THAEXT_EXP_HDG
EX_TAB_HEDGE = "Table Type for THMT_HEDGE_ITEM
EX_TAB_HEDGEREL = "FTR: Table for Transferring HRs to Transact. Mgmt
EX_TAB_HR_OBS = "FTR: Table for Transferring HRs to Transact. Mgmt
EX_TAB_HR_STRAT = "Table Type for THMHRT_HR_STRAT
EX_TAB_HR_VAL = "Table Type for THMHRT_HR_VAL
EX_TAB_MESSAGES = "Application Log: Table with Messages
EX_TAB_TRANS = "Table Type for THMEXT_TRANS
EX_TAB_TRANS_FX = "Table Type for THMEXT_TRANS_FX
EX_TAB_TRANS_FX_OBS = "Table Type for THMEXT_TRANS_FX
EX_TAB_TRANS_IR = "Table Type for THMEXT_TRANS_IR
EX_TAB_TRANS_IR_OBS = "Table Type for THMEXT_TRANS_IR
EX_TAB_EXPOS = "Table Type for THMEXT_EXPOS
EX_TAB_EXPOS_FX = "Table Type for THMEXT_EXPOS_FX
EX_TAB_EXPOS_IR = "Table Type for THMEXT_EXPOS_IR
EXCEPTIONS
INTERNAL_ERROR = 1
IMPORTING Parameters details for THMEX_LOAD_PLAN_FROM_DB_MULTI
IM_BUKRS - Range Table for Company Code
Data type: BUKRSOptional: No
Call by Reference: Yes
IM_RNG_PLANNERID - Ranges Structure for the Hedge Plan
Data type: THAR_PLANNERIDOptional: No
Call by Reference: Yes
EXPORTING Parameters details for THMEX_LOAD_PLAN_FROM_DB_MULTI
EX_TAB_PLANNER - Table Type for THMEXT_PLANNER
Data type: THAH_PLANNEROptional: No
Call by Reference: Yes
EX_TAB_EXP_HDG - Table Type for THAEXT_EXP_HDG
Data type: THAEXY_EXP_HDGOptional: No
Call by Reference: Yes
EX_TAB_HEDGE - Table Type for THMT_HEDGE_ITEM
Data type: THAY_HEDGE_ITEMOptional: No
Call by Reference: Yes
EX_TAB_HEDGEREL - FTR: Table for Transferring HRs to Transact. Mgmt
Data type: VTS_TAB_HRTOptional: No
Call by Reference: Yes
EX_TAB_HR_OBS - FTR: Table for Transferring HRs to Transact. Mgmt
Data type: VTS_TAB_HRTOptional: No
Call by Reference: Yes
EX_TAB_HR_STRAT - Table Type for THMHRT_HR_STRAT
Data type: THAHRY_HR_STRATOptional: No
Call by Reference: Yes
EX_TAB_HR_VAL - Table Type for THMHRT_HR_VAL
Data type: THAHRY_HR_VALOptional: No
Call by Reference: Yes
EX_TAB_MESSAGES - Application Log: Table with Messages
Data type: BAL_T_MSGOptional: No
Call by Reference: Yes
EX_TAB_TRANS - Table Type for THMEXT_TRANS
Data type: THAEXY_TRANSOptional: No
Call by Reference: Yes
EX_TAB_TRANS_FX - Table Type for THMEXT_TRANS_FX
Data type: THAEXY_TRANS_FXOptional: No
Call by Reference: Yes
EX_TAB_TRANS_FX_OBS - Table Type for THMEXT_TRANS_FX
Data type: THAEXY_TRANS_FXOptional: No
Call by Reference: Yes
EX_TAB_TRANS_IR - Table Type for THMEXT_TRANS_IR
Data type: THAEXY_TRANS_IROptional: No
Call by Reference: Yes
EX_TAB_TRANS_IR_OBS - Table Type for THMEXT_TRANS_IR
Data type: THAEXY_TRANS_IROptional: No
Call by Reference: Yes
EX_TAB_EXPOS - Table Type for THMEXT_EXPOS
Data type: THAEXY_EXPOSOptional: No
Call by Reference: Yes
EX_TAB_EXPOS_FX - Table Type for THMEXT_EXPOS_FX
Data type: THAEXY_EXPOS_FXOptional: No
Call by Reference: Yes
EX_TAB_EXPOS_IR - Table Type for THMEXT_EXPOS_IR
Data type: THAEXY_EXPOS_IROptional: No
Call by Reference: Yes
EXCEPTIONS details
INTERNAL_ERROR - Internal Error
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for THMEX_LOAD_PLAN_FROM_DB_MULTI 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_im_bukrs | TYPE BUKRS, " | |||
| lv_ex_tab_planner | TYPE THAH_PLANNER, " | |||
| lv_internal_error | TYPE THAH_PLANNER, " | |||
| lv_ex_tab_exp_hdg | TYPE THAEXY_EXP_HDG, " | |||
| lv_ex_tab_hedge | TYPE THAY_HEDGE_ITEM, " | |||
| lv_ex_tab_hedgerel | TYPE VTS_TAB_HRT, " | |||
| lv_ex_tab_hr_obs | TYPE VTS_TAB_HRT, " | |||
| lv_ex_tab_hr_strat | TYPE THAHRY_HR_STRAT, " | |||
| lv_ex_tab_hr_val | TYPE THAHRY_HR_VAL, " | |||
| lv_ex_tab_messages | TYPE BAL_T_MSG, " | |||
| lv_ex_tab_trans | TYPE THAEXY_TRANS, " | |||
| lv_im_rng_plannerid | TYPE THAR_PLANNERID, " | |||
| lv_ex_tab_trans_fx | TYPE THAEXY_TRANS_FX, " | |||
| lv_ex_tab_trans_fx_obs | TYPE THAEXY_TRANS_FX, " | |||
| lv_ex_tab_trans_ir | TYPE THAEXY_TRANS_IR, " | |||
| lv_ex_tab_trans_ir_obs | TYPE THAEXY_TRANS_IR, " | |||
| lv_ex_tab_expos | TYPE THAEXY_EXPOS, " | |||
| lv_ex_tab_expos_fx | TYPE THAEXY_EXPOS_FX, " | |||
| lv_ex_tab_expos_ir | TYPE THAEXY_EXPOS_IR. " |
|   CALL FUNCTION 'THMEX_LOAD_PLAN_FROM_DB_MULTI' "Read Data for Several Hedge Plans in One Company Code |
| EXPORTING | ||
| IM_BUKRS | = lv_im_bukrs | |
| IM_RNG_PLANNERID | = lv_im_rng_plannerid | |
| IMPORTING | ||
| EX_TAB_PLANNER | = lv_ex_tab_planner | |
| EX_TAB_EXP_HDG | = lv_ex_tab_exp_hdg | |
| EX_TAB_HEDGE | = lv_ex_tab_hedge | |
| EX_TAB_HEDGEREL | = lv_ex_tab_hedgerel | |
| EX_TAB_HR_OBS | = lv_ex_tab_hr_obs | |
| EX_TAB_HR_STRAT | = lv_ex_tab_hr_strat | |
| EX_TAB_HR_VAL | = lv_ex_tab_hr_val | |
| EX_TAB_MESSAGES | = lv_ex_tab_messages | |
| EX_TAB_TRANS | = lv_ex_tab_trans | |
| EX_TAB_TRANS_FX | = lv_ex_tab_trans_fx | |
| EX_TAB_TRANS_FX_OBS | = lv_ex_tab_trans_fx_obs | |
| EX_TAB_TRANS_IR | = lv_ex_tab_trans_ir | |
| EX_TAB_TRANS_IR_OBS | = lv_ex_tab_trans_ir_obs | |
| EX_TAB_EXPOS | = lv_ex_tab_expos | |
| EX_TAB_EXPOS_FX | = lv_ex_tab_expos_fx | |
| EX_TAB_EXPOS_IR | = lv_ex_tab_expos_ir | |
| EXCEPTIONS | ||
| INTERNAL_ERROR = 1 | ||
| . " THMEX_LOAD_PLAN_FROM_DB_MULTI | ||
ABAP code using 7.40 inline data declarations to call FM THMEX_LOAD_PLAN_FROM_DB_MULTI
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