SAP TB_TR_OTC_DATA_SERVE_SWAP Function Module for Data Formatting - OTC Interest Rate - NPV + Limit - Swap
TB_TR_OTC_DATA_SERVE_SWAP is a standard tb tr otc data serve swap SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Data Formatting - OTC Interest Rate - NPV + Limit - Swap 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 tb tr otc data serve swap FM, simply by entering the name TB_TR_OTC_DATA_SERVE_SWAP into the relevant SAP transaction such as SE37 or SE38.
Function Group: FTR_OTC_LIMIT
Program Name: SAPLFTR_OTC_LIMIT
Main Program: SAPLFTR_OTC_LIMIT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TB_TR_OTC_DATA_SERVE_SWAP 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 'TB_TR_OTC_DATA_SERVE_SWAP'"Data Formatting - OTC Interest Rate - NPV + Limit - Swap.
EXPORTING
IM_DEAL = "Transaction
* IM_ACTIVITY = "Activity
* IM_DATE = "Date and Time, Current (Application Server) Date
IM_TAB_FLOWS = "Flows
IM_TAB_CONDITIONS = "Conditions
* IM_TAB_AVG = "Assign one flow to many adjustments for average
* IM_FLAG_ACONDITION = "Flag, ob VTBAFINKO-SALTKOND und -RKOND getauscht wurden
IMPORTING
EX_DEAL = "Transaction
EX_TAB_FLOWS = "Flows
EX_TAB_FORMULA = "Formulas
EX_NOMINAL_IN = "Nominal zum Stichtag - eingehend
EX_NOMINAL_OUT = "Nominal zum Stichtag - ausgehend
EX_NOMINAL = "Nominal at Key Date
CHANGING
* CT_BAPIERR = "Table Types for Error Handling
EXCEPTIONS
DATA_ERROR = 1
IMPORTING Parameters details for TB_TR_OTC_DATA_SERVE_SWAP
IM_DEAL - Transaction
Data type: TRDE_STR_FHAOptional: No
Call by Reference: Yes
IM_ACTIVITY - Activity
Data type: TRDE_STR_FHAZUOptional: Yes
Call by Reference: Yes
IM_DATE - Date and Time, Current (Application Server) Date
Data type: SY-DATUMOptional: Yes
Call by Reference: Yes
IM_TAB_FLOWS - Flows
Data type: TRDE_TAB_FHAPOOptional: No
Call by Reference: Yes
IM_TAB_CONDITIONS - Conditions
Data type: TRDE_TAB_FINKOOptional: No
Call by Reference: Yes
IM_TAB_AVG - Assign one flow to many adjustments for average
Data type: FTR_AVG_ASGNYOptional: Yes
Call by Reference: Yes
IM_FLAG_ACONDITION - Flag, ob VTBAFINKO-SALTKOND und -RKOND getauscht wurden
Data type: COptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for TB_TR_OTC_DATA_SERVE_SWAP
EX_DEAL - Transaction
Data type: TRDE_STR_VTB_S_GESOptional: No
Call by Reference: Yes
EX_TAB_FLOWS - Flows
Data type: TRDE_TAB_VTB_S_BEWOptional: No
Call by Reference: Yes
EX_TAB_FORMULA - Formulas
Data type: TRDE_TAB_FORMULA_COLLECTOptional: No
Call by Reference: Yes
EX_NOMINAL_IN - Nominal zum Stichtag - eingehend
Data type: TRDE_STR_NOMOptional: No
Call by Reference: Yes
EX_NOMINAL_OUT - Nominal zum Stichtag - ausgehend
Data type: TRDE_STR_NOMOptional: No
Call by Reference: Yes
EX_NOMINAL - Nominal at Key Date
Data type: TRDE_STR_NOMOptional: No
Call by Reference: Yes
CHANGING Parameters details for TB_TR_OTC_DATA_SERVE_SWAP
CT_BAPIERR - Table Types for Error Handling
Data type: BAPIERR_TOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
DATA_ERROR - Deal data inconsistent or incomplete
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for TB_TR_OTC_DATA_SERVE_SWAP 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_ex_deal | TYPE TRDE_STR_VTB_S_GES, " | |||
| lv_im_deal | TYPE TRDE_STR_FHA, " | |||
| lv_ct_bapierr | TYPE BAPIERR_T, " | |||
| lv_data_error | TYPE BAPIERR_T, " | |||
| lv_im_activity | TYPE TRDE_STR_FHAZU, " | |||
| lv_ex_tab_flows | TYPE TRDE_TAB_VTB_S_BEW, " | |||
| lv_im_date | TYPE SY-DATUM, " | |||
| lv_ex_tab_formula | TYPE TRDE_TAB_FORMULA_COLLECT, " | |||
| lv_im_tab_flows | TYPE TRDE_TAB_FHAPO, " | |||
| lv_ex_nominal_in | TYPE TRDE_STR_NOM, " | |||
| lv_ex_nominal_out | TYPE TRDE_STR_NOM, " | |||
| lv_im_tab_conditions | TYPE TRDE_TAB_FINKO, " | |||
| lv_ex_nominal | TYPE TRDE_STR_NOM, " | |||
| lv_im_tab_avg | TYPE FTR_AVG_ASGNY, " | |||
| lv_im_flag_acondition | TYPE C. " |
|   CALL FUNCTION 'TB_TR_OTC_DATA_SERVE_SWAP' "Data Formatting - OTC Interest Rate - NPV + Limit - Swap |
| EXPORTING | ||
| IM_DEAL | = lv_im_deal | |
| IM_ACTIVITY | = lv_im_activity | |
| IM_DATE | = lv_im_date | |
| IM_TAB_FLOWS | = lv_im_tab_flows | |
| IM_TAB_CONDITIONS | = lv_im_tab_conditions | |
| IM_TAB_AVG | = lv_im_tab_avg | |
| IM_FLAG_ACONDITION | = lv_im_flag_acondition | |
| IMPORTING | ||
| EX_DEAL | = lv_ex_deal | |
| EX_TAB_FLOWS | = lv_ex_tab_flows | |
| EX_TAB_FORMULA | = lv_ex_tab_formula | |
| EX_NOMINAL_IN | = lv_ex_nominal_in | |
| EX_NOMINAL_OUT | = lv_ex_nominal_out | |
| EX_NOMINAL | = lv_ex_nominal | |
| CHANGING | ||
| CT_BAPIERR | = lv_ct_bapierr | |
| EXCEPTIONS | ||
| DATA_ERROR = 1 | ||
| . " TB_TR_OTC_DATA_SERVE_SWAP | ||
ABAP code using 7.40 inline data declarations to call FM TB_TR_OTC_DATA_SERVE_SWAP
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 DATUM FROM SY INTO @DATA(ld_im_date). | ||||
Search for further information about these or an SAP related objects