SAP THMEX_CHANGE_TRANSACTION_CO Function Module for E-Hedge Accounting: Change FX Transaction









THMEX_CHANGE_TRANSACTION_CO is a standard thmex change transaction co SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for E-Hedge Accounting: Change FX Transaction 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 change transaction co FM, simply by entering the name THMEX_CHANGE_TRANSACTION_CO into the relevant SAP transaction such as SE37 or SE38.

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



Function THMEX_CHANGE_TRANSACTION_CO 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_CHANGE_TRANSACTION_CO'"E-Hedge Accounting: Change FX Transaction
EXPORTING
* IM_FLG_HDG_UPDATE = TPMCO_XTRUE "General Indicator
* IM_FLG_DIALOG = TPMCO_XFALSE "Dialog allowed
IM_P_PERS_MANAGER = "Treasury Position Management: Persistence Service
* IM_P_LOG_HANDLER = "Protocol Manager
* IM_FLG_DEFERRED_RECL = "Reklassifikation nachträglich manuell
* IM_OCI_DATE = "Date of a Business Transaction in the Income Ledger
* I_FLG_ACTIVATE = TPMCO_XFALSE "General Flag

IMPORTING
EX_TAB_HEDGEREL = "FTR: Table for Transferring HRs to Transact. Mgmt
EX_TAB_HEDGE = "Table Type for THMT_HEDGE_ITEM

CHANGING
CH_STR_TRANSACTION = "E-Hedge Accounting: Transactions
CH_STR_TRANSACTION_CO = "E-Hedge Accounting: Transactions
* CH_TAB_TRANSACTION_COP = "Transactions for commodity exposures - pricing data
* CH_TAB_TRANSACTION_COP_DCS = "Transactions for commodity exposures - pricing data (DCS)
CH_STR_EXPOSURE = "E-Hedge Accounting: exposure created by transactions
CH_STR_EXPOSURE_CO = "E-Hedge Accounting: exposure created by transactions
* CH_FLG_TESTRUN = "Test Run

EXCEPTIONS
UPDATE_TRANSACTION_FAILED = 1 UPDATE_TRANSACTION_CO_FAILED = 2 CALCULATE_EXPOSURE_FAILED = 3 UPDATE_EXPOSURE_FAILED = 4 TRANSACTION_TABLE_INCONSISTENT = 5 TRANSACTION_INVALID = 6 INTERNAL_ERROR = 7 UPDATE_CANCELLED = 8 PERSISTENCY_ERROR = 9
.



IMPORTING Parameters details for THMEX_CHANGE_TRANSACTION_CO

IM_FLG_HDG_UPDATE - General Indicator

Data type: FLAG
Default: TPMCO_XTRUE
Optional: Yes
Call by Reference: Yes

IM_FLG_DIALOG - Dialog allowed

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

IM_P_PERS_MANAGER - Treasury Position Management: Persistence Service

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

IM_P_LOG_HANDLER - Protocol Manager

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

IM_FLG_DEFERRED_RECL - Reklassifikation nachträglich manuell

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

IM_OCI_DATE - Date of a Business Transaction in the Income Ledger

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

I_FLG_ACTIVATE - General Flag

Data type: FLAG
Default: TPMCO_XFALSE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for THMEX_CHANGE_TRANSACTION_CO

EX_TAB_HEDGEREL - FTR: Table for Transferring HRs to Transact. Mgmt

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

EX_TAB_HEDGE - Table Type for THMT_HEDGE_ITEM

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

CHANGING Parameters details for THMEX_CHANGE_TRANSACTION_CO

CH_STR_TRANSACTION - E-Hedge Accounting: Transactions

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

CH_STR_TRANSACTION_CO - E-Hedge Accounting: Transactions

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

CH_TAB_TRANSACTION_COP - Transactions for commodity exposures - pricing data

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

CH_TAB_TRANSACTION_COP_DCS - Transactions for commodity exposures - pricing data (DCS)

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

CH_STR_EXPOSURE - E-Hedge Accounting: exposure created by transactions

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

CH_STR_EXPOSURE_CO - E-Hedge Accounting: exposure created by transactions

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

CH_FLG_TESTRUN - Test Run

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

EXCEPTIONS details

UPDATE_TRANSACTION_FAILED - DB Insert Transaction Failed

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

UPDATE_TRANSACTION_CO_FAILED - DB Insert CO Transaction Failed

Data type:
Optional: No
Call by Reference: Yes

CALCULATE_EXPOSURE_FAILED - Calculation of exposure failed

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

UPDATE_EXPOSURE_FAILED - Update of exposure failed

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

TRANSACTION_TABLE_INCONSISTENT - Inconsistent transaction tables

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

TRANSACTION_INVALID - Transaction does not exists on the db

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

INTERNAL_ERROR - Internal Error

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

UPDATE_CANCELLED - Benutzer hat Änderung abgebrochen

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

PERSISTENCY_ERROR - Error in Persistence Service

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

Copy and paste ABAP code example for THMEX_CHANGE_TRANSACTION_CO 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_tab_hedgerel  TYPE VTS_TAB_HRT, "   
lv_im_flg_hdg_update  TYPE FLAG, "   TPMCO_XTRUE
lv_ch_str_transaction  TYPE THMEXT_TRANS, "   
lv_update_transaction_failed  TYPE THMEXT_TRANS, "   
lv_ex_tab_hedge  TYPE THAY_HEDGE_ITEM, "   
lv_im_flg_dialog  TYPE XFELD, "   TPMCO_XFALSE
lv_ch_str_transaction_co  TYPE THAEXT_TRANS_CO, "   
lv_update_transaction_co_failed  TYPE THAEXT_TRANS_CO, "   
lv_im_p_pers_manager  TYPE CL_PERSISTENCY_MANAGER_TRG, "   
lv_ch_tab_transaction_cop  TYPE THAEXY_TRANS_COP, "   
lv_calculate_exposure_failed  TYPE THAEXY_TRANS_COP, "   
lv_im_p_log_handler  TYPE CL_PROTOCOL_HANDLER_TRP, "   
lv_update_exposure_failed  TYPE CL_PROTOCOL_HANDLER_TRP, "   
lv_ch_tab_transaction_cop_dcs  TYPE THAEXY_TRANS_COP_DCS, "   
lv_ch_str_exposure  TYPE THMEXT_EXPOS, "   
lv_im_flg_deferred_recl  TYPE XFELD, "   
lv_transaction_table_inconsistent  TYPE XFELD, "   
lv_im_oci_date  TYPE TPM_TRIL_DATE, "   
lv_ch_str_exposure_co  TYPE THAEXT_EXPOS_CO, "   
lv_transaction_invalid  TYPE THAEXT_EXPOS_CO, "   
lv_ch_flg_testrun  TYPE XFELD, "   
lv_internal_error  TYPE XFELD, "   
lv_i_flg_activate  TYPE FLAG, "   TPMCO_XFALSE
lv_update_cancelled  TYPE FLAG, "   
lv_persistency_error  TYPE FLAG. "   

  CALL FUNCTION 'THMEX_CHANGE_TRANSACTION_CO'  "E-Hedge Accounting: Change FX Transaction
    EXPORTING
         IM_FLG_HDG_UPDATE = lv_im_flg_hdg_update
         IM_FLG_DIALOG = lv_im_flg_dialog
         IM_P_PERS_MANAGER = lv_im_p_pers_manager
         IM_P_LOG_HANDLER = lv_im_p_log_handler
         IM_FLG_DEFERRED_RECL = lv_im_flg_deferred_recl
         IM_OCI_DATE = lv_im_oci_date
         I_FLG_ACTIVATE = lv_i_flg_activate
    IMPORTING
         EX_TAB_HEDGEREL = lv_ex_tab_hedgerel
         EX_TAB_HEDGE = lv_ex_tab_hedge
    CHANGING
         CH_STR_TRANSACTION = lv_ch_str_transaction
         CH_STR_TRANSACTION_CO = lv_ch_str_transaction_co
         CH_TAB_TRANSACTION_COP = lv_ch_tab_transaction_cop
         CH_TAB_TRANSACTION_COP_DCS = lv_ch_tab_transaction_cop_dcs
         CH_STR_EXPOSURE = lv_ch_str_exposure
         CH_STR_EXPOSURE_CO = lv_ch_str_exposure_co
         CH_FLG_TESTRUN = lv_ch_flg_testrun
    EXCEPTIONS
        UPDATE_TRANSACTION_FAILED = 1
        UPDATE_TRANSACTION_CO_FAILED = 2
        CALCULATE_EXPOSURE_FAILED = 3
        UPDATE_EXPOSURE_FAILED = 4
        TRANSACTION_TABLE_INCONSISTENT = 5
        TRANSACTION_INVALID = 6
        INTERNAL_ERROR = 7
        UPDATE_CANCELLED = 8
        PERSISTENCY_ERROR = 9
. " THMEX_CHANGE_TRANSACTION_CO




ABAP code using 7.40 inline data declarations to call FM THMEX_CHANGE_TRANSACTION_CO

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.

 
DATA(ld_im_flg_hdg_update) = TPMCO_XTRUE.
 
 
 
 
DATA(ld_im_flg_dialog) = TPMCO_XFALSE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_i_flg_activate) = TPMCO_XFALSE.
 
 
 


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!