SAP THMHR_DETER_VOL_FROM_GENERAL Function Module for Read Nominal Volume of Derivative
THMHR_DETER_VOL_FROM_GENERAL is a standard thmhr deter vol from general 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 Nominal Volume of Derivative 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 deter vol from general FM, simply by entering the name THMHR_DETER_VOL_FROM_GENERAL into the relevant SAP transaction such as SE37 or SE38.
Function Group: THMHR_DATA_SELECTION
Program Name: SAPLTHMHR_DATA_SELECTION
Main Program: SAPLTHMHR_DATA_SELECTION
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function THMHR_DETER_VOL_FROM_GENERAL 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_DETER_VOL_FROM_GENERAL'"Read Nominal Volume of Derivative.
EXPORTING
IM_STR_BEST = "Treasury general portfolio structure
IM_CURRENCY = "Currency of the designated volume of the derivative
* IM_PLUS_MINUS = "Sign of the nominal amount ('+' or '-')
IM_BUKRS = "Company Code
IM_RFHA = "Financial Transaction
IMPORTING
EX_VOLUME_DERIVATIVE = "Nominal volume of the derivative
EX_CURRENCY = "Currency of the designated volume of the derivative
EX_UNITS_DERIVATIVE = "Number of Units for Unit-Quoted Securities
EX_FLG_UNITS = "Checkbox
TABLES
TT_TAB_BEWEG = "General structure of treasury transactions
TT_TAB_BEST = "RM: Include Header Information FGET
* TT_TAB_OPTI = "Treasury general option structure
EXCEPTIONS
NOMINAL_NOT_FOUND = 1 DERIVATIVE_NOT_ALIVE = 2 INVALID_CURRENCY = 3 CONFIG_ERROR = 4 CATEGORY_NOT_ALLOWED = 5
IMPORTING Parameters details for THMHR_DETER_VOL_FROM_GENERAL
IM_STR_BEST - Treasury general portfolio structure
Data type: VZBESTOptional: No
Call by Reference: Yes
IM_CURRENCY - Currency of the designated volume of the derivative
Data type: THMHRT_HR-CURR_DERIVATIVEOptional: No
Call by Reference: Yes
IM_PLUS_MINUS - Sign of the nominal amount ('+' or '-')
Data type: THMS_CASH_FLOWS-SSIGNOptional: Yes
Call by Reference: Yes
IM_BUKRS - Company Code
Data type: BUKRSOptional: No
Call by Reference: Yes
IM_RFHA - Financial Transaction
Data type: TB_RFHAOptional: No
Call by Reference: Yes
EXPORTING Parameters details for THMHR_DETER_VOL_FROM_GENERAL
EX_VOLUME_DERIVATIVE - Nominal volume of the derivative
Data type: THMHRT_HR-VOL_DERIVATIVEOptional: No
Call by Reference: Yes
EX_CURRENCY - Currency of the designated volume of the derivative
Data type: THMHRT_HR-CURR_DERIVATIVEOptional: No
Call by Reference: Yes
EX_UNITS_DERIVATIVE - Number of Units for Unit-Quoted Securities
Data type: ASTUECKOptional: No
Call by Reference: Yes
EX_FLG_UNITS - Checkbox
Data type: XFELDOptional: No
Call by Reference: Yes
TABLES Parameters details for THMHR_DETER_VOL_FROM_GENERAL
TT_TAB_BEWEG - General structure of treasury transactions
Data type: VZBEWEGOptional: No
Call by Reference: Yes
TT_TAB_BEST - RM: Include Header Information FGET
Data type: VTVFGKO08Optional: No
Call by Reference: Yes
TT_TAB_OPTI - Treasury general option structure
Data type: VZOPTIOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NOMINAL_NOT_FOUND - Nominal amount not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DERIVATIVE_NOT_ALIVE - The derivative's not alive at the valuation date
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_CURRENCY - Neither side of the swap has this currency
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CONFIG_ERROR - Configuration Error
Data type:Optional: No
Call by Reference: Yes
CATEGORY_NOT_ALLOWED - Produktart nicht unterstützt
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for THMHR_DETER_VOL_FROM_GENERAL 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_str_best | TYPE VZBEST, " | |||
| lt_tt_tab_beweg | TYPE STANDARD TABLE OF VZBEWEG, " | |||
| lv_nominal_not_found | TYPE VZBEWEG, " | |||
| lv_ex_volume_derivative | TYPE THMHRT_HR-VOL_DERIVATIVE, " | |||
| lv_ex_currency | TYPE THMHRT_HR-CURR_DERIVATIVE, " | |||
| lv_im_currency | TYPE THMHRT_HR-CURR_DERIVATIVE, " | |||
| lt_tt_tab_best | TYPE STANDARD TABLE OF VTVFGKO08, " | |||
| lv_derivative_not_alive | TYPE VTVFGKO08, " | |||
| lt_tt_tab_opti | TYPE STANDARD TABLE OF VZOPTI, " | |||
| lv_im_plus_minus | TYPE THMS_CASH_FLOWS-SSIGN, " | |||
| lv_invalid_currency | TYPE THMS_CASH_FLOWS, " | |||
| lv_ex_units_derivative | TYPE ASTUECK, " | |||
| lv_im_bukrs | TYPE BUKRS, " | |||
| lv_config_error | TYPE BUKRS, " | |||
| lv_ex_flg_units | TYPE XFELD, " | |||
| lv_im_rfha | TYPE TB_RFHA, " | |||
| lv_category_not_allowed | TYPE TB_RFHA. " |
|   CALL FUNCTION 'THMHR_DETER_VOL_FROM_GENERAL' "Read Nominal Volume of Derivative |
| EXPORTING | ||
| IM_STR_BEST | = lv_im_str_best | |
| IM_CURRENCY | = lv_im_currency | |
| IM_PLUS_MINUS | = lv_im_plus_minus | |
| IM_BUKRS | = lv_im_bukrs | |
| IM_RFHA | = lv_im_rfha | |
| IMPORTING | ||
| EX_VOLUME_DERIVATIVE | = lv_ex_volume_derivative | |
| EX_CURRENCY | = lv_ex_currency | |
| EX_UNITS_DERIVATIVE | = lv_ex_units_derivative | |
| EX_FLG_UNITS | = lv_ex_flg_units | |
| TABLES | ||
| TT_TAB_BEWEG | = lt_tt_tab_beweg | |
| TT_TAB_BEST | = lt_tt_tab_best | |
| TT_TAB_OPTI | = lt_tt_tab_opti | |
| EXCEPTIONS | ||
| NOMINAL_NOT_FOUND = 1 | ||
| DERIVATIVE_NOT_ALIVE = 2 | ||
| INVALID_CURRENCY = 3 | ||
| CONFIG_ERROR = 4 | ||
| CATEGORY_NOT_ALLOWED = 5 | ||
| . " THMHR_DETER_VOL_FROM_GENERAL | ||
ABAP code using 7.40 inline data declarations to call FM THMHR_DETER_VOL_FROM_GENERAL
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 VOL_DERIVATIVE FROM THMHRT_HR INTO @DATA(ld_ex_volume_derivative). | ||||
| "SELECT single CURR_DERIVATIVE FROM THMHRT_HR INTO @DATA(ld_ex_currency). | ||||
| "SELECT single CURR_DERIVATIVE FROM THMHRT_HR INTO @DATA(ld_im_currency). | ||||
| "SELECT single SSIGN FROM THMS_CASH_FLOWS INTO @DATA(ld_im_plus_minus). | ||||
Search for further information about these or an SAP related objects