SAP THMHR_HR_DISSOLVE_REVERSE Function Module for Reverse Dissolution of an HR
THMHR_HR_DISSOLVE_REVERSE is a standard thmhr hr dissolve reverse SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Reverse Dissolution of an HR 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 hr dissolve reverse FM, simply by entering the name THMHR_HR_DISSOLVE_REVERSE into the relevant SAP transaction such as SE37 or SE38.
Function Group: THMHR_ADMIN
Program Name: SAPLTHMHR_ADMIN
Main Program: SAPLTHMHR_ADMIN
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function THMHR_HR_DISSOLVE_REVERSE 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_HR_DISSOLVE_REVERSE'"Reverse Dissolution of an HR.
EXPORTING
DISS_HR = "Dissolved HR
REV_REASON = "CFM Reason for Reversal
IM_RNG_RECLASS_ORIGIN = "
* IM_PROTOCOL_HANDLER = "Protocol Manager
* IM_FI_REVERSAL_DATE = "Different FI Reversal Date
* IM_FI_REVERSAL_PERIOD = "Alternative FI Reversal Period
IMPORTING
REV_HR = "New version of HR after reverse
REV_HR_STRAT = "Table Type for THMHRT_HR_STRAT
REV_HEDGE_ITEM = "Table Type for THMT_HEDGE_ITEM
EXCEPTIONS
INCORRECT_STATUS = 1 INCORRECT_VERSION = 2 LATER_VALUATION_EXISTS = 3 RFHA_REALLOCATED = 4 INVALID_HR = 5 ERROR_READING_RFHA = 6 RFHA_OVERALLOCATED = 7 REVERSAL_ERROR = 8 RECLASS_ERROR = 9
IMPORTING Parameters details for THMHR_HR_DISSOLVE_REVERSE
DISS_HR - Dissolved HR
Data type: THMHRT_HROptional: No
Call by Reference: Yes
REV_REASON - CFM Reason for Reversal
Data type: SSTOGRDOptional: No
Call by Reference: Yes
IM_RNG_RECLASS_ORIGIN -
Data type: TRGR_TRIL_RECLASS_ORIGINOptional: No
Call by Reference: Yes
IM_PROTOCOL_HANDLER - Protocol Manager
Data type: CL_PROTOCOL_HANDLER_TRPOptional: Yes
Call by Reference: Yes
IM_FI_REVERSAL_DATE - Different FI Reversal Date
Data type: TPM_FI_REVERSAL_DATEOptional: Yes
Call by Reference: Yes
IM_FI_REVERSAL_PERIOD - Alternative FI Reversal Period
Data type: TPM_FI_REVERSAL_PERIODOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for THMHR_HR_DISSOLVE_REVERSE
REV_HR - New version of HR after reverse
Data type: VTS_TAB_HRTOptional: No
Call by Reference: Yes
REV_HR_STRAT - Table Type for THMHRT_HR_STRAT
Data type: THAHRY_HR_STRATOptional: No
Call by Reference: Yes
REV_HEDGE_ITEM - Table Type for THMT_HEDGE_ITEM
Data type: THAY_HEDGE_ITEMOptional: No
Call by Reference: Yes
EXCEPTIONS details
INCORRECT_STATUS - HR is not in status dissolved
Data type:Optional: No
Call by Reference: Yes
INCORRECT_VERSION - Version passed is not the current version
Data type:Optional: No
Call by Reference: Yes
LATER_VALUATION_EXISTS - the derivative was valued after the dissolve
Data type:Optional: No
Call by Reference: Yes
RFHA_REALLOCATED - the derivative was allocated to another HR after the dissolve
Data type:Optional: No
Call by Reference: Yes
INVALID_HR - Invalid hedging relationship
Data type:Optional: No
Call by Reference: Yes
ERROR_READING_RFHA - Derivative data could not be read
Data type:Optional: No
Call by Reference: Yes
RFHA_OVERALLOCATED - Derivative over-allocated on inception date
Data type:Optional: No
Call by Reference: Yes
REVERSAL_ERROR - Error during reversal
Data type:Optional: No
Call by Reference: Yes
RECLASS_ERROR - Error reversing the reclassification flows
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for THMHR_HR_DISSOLVE_REVERSE 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_rev_hr | TYPE VTS_TAB_HRT, " | |||
| lv_diss_hr | TYPE THMHRT_HR, " | |||
| lv_incorrect_status | TYPE THMHRT_HR, " | |||
| lv_rev_reason | TYPE SSTOGRD, " | |||
| lv_rev_hr_strat | TYPE THAHRY_HR_STRAT, " | |||
| lv_incorrect_version | TYPE THAHRY_HR_STRAT, " | |||
| lv_rev_hedge_item | TYPE THAY_HEDGE_ITEM, " | |||
| lv_im_rng_reclass_origin | TYPE TRGR_TRIL_RECLASS_ORIGIN, " | |||
| lv_later_valuation_exists | TYPE TRGR_TRIL_RECLASS_ORIGIN, " | |||
| lv_rfha_reallocated | TYPE TRGR_TRIL_RECLASS_ORIGIN, " | |||
| lv_im_protocol_handler | TYPE CL_PROTOCOL_HANDLER_TRP, " | |||
| lv_invalid_hr | TYPE CL_PROTOCOL_HANDLER_TRP, " | |||
| lv_im_fi_reversal_date | TYPE TPM_FI_REVERSAL_DATE, " | |||
| lv_error_reading_rfha | TYPE TPM_FI_REVERSAL_DATE, " | |||
| lv_im_fi_reversal_period | TYPE TPM_FI_REVERSAL_PERIOD, " | |||
| lv_rfha_overallocated | TYPE TPM_FI_REVERSAL_PERIOD, " | |||
| lv_reversal_error | TYPE TPM_FI_REVERSAL_PERIOD, " | |||
| lv_reclass_error | TYPE TPM_FI_REVERSAL_PERIOD. " |
|   CALL FUNCTION 'THMHR_HR_DISSOLVE_REVERSE' "Reverse Dissolution of an HR |
| EXPORTING | ||
| DISS_HR | = lv_diss_hr | |
| REV_REASON | = lv_rev_reason | |
| IM_RNG_RECLASS_ORIGIN | = lv_im_rng_reclass_origin | |
| IM_PROTOCOL_HANDLER | = lv_im_protocol_handler | |
| IM_FI_REVERSAL_DATE | = lv_im_fi_reversal_date | |
| IM_FI_REVERSAL_PERIOD | = lv_im_fi_reversal_period | |
| IMPORTING | ||
| REV_HR | = lv_rev_hr | |
| REV_HR_STRAT | = lv_rev_hr_strat | |
| REV_HEDGE_ITEM | = lv_rev_hedge_item | |
| EXCEPTIONS | ||
| INCORRECT_STATUS = 1 | ||
| INCORRECT_VERSION = 2 | ||
| LATER_VALUATION_EXISTS = 3 | ||
| RFHA_REALLOCATED = 4 | ||
| INVALID_HR = 5 | ||
| ERROR_READING_RFHA = 6 | ||
| RFHA_OVERALLOCATED = 7 | ||
| REVERSAL_ERROR = 8 | ||
| RECLASS_ERROR = 9 | ||
| . " THMHR_HR_DISSOLVE_REVERSE | ||
ABAP code using 7.40 inline data declarations to call FM THMHR_HR_DISSOLVE_REVERSE
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