SAP Function Modules

THMHR_HR_REVERSE_DEDESIGNATION SAP Function module - Reverse Dedesignation (Settlement) of Hedging Relationship







THMHR_HR_REVERSE_DEDESIGNATION is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name THMHR_HR_REVERSE_DEDESIGNATION into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: THMHR_ADMIN
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM THMHR_HR_REVERSE_DEDESIGNATION - THMHR HR REVERSE DEDESIGNATION





CALL FUNCTION 'THMHR_HR_REVERSE_DEDESIGNATION' "Reverse Dedesignation (Settlement) of Hedging Relationship
  EXPORTING
    dedes_hr =                  " thmhrt_hr     FTR: Table for Transferring HRs to Transact. Mgmt
*   im_flg_testrun =            " tpm_testrun   Test Run
*   im_hr_date =                " thm_hr_date   Start Date of Current Version of Hedging Relationship
  IMPORTING
    rev_hr =                    " thmhrt_hr     New version of the hedging relationship after reversal
  EXCEPTIONS
    INCORRECT_STATUS = 1        "               HR is not in status dissolved
    INCORRECT_VERSION = 2       "               Version passed is not the current version
    LATER_VALUATION_EXISTS = 3  "               the derivative was valued after the dissolve
    INVALID_HR = 4              "               Invalid hedging relationship
    ERROR_READING_RFHA = 5      "               Derivative data could not be read
    REVERSAL_ERROR = 6          "               Error during reversal
    LATER_HR_DATE = 7           "               The hedging relationship has a later inception date
    RFHA_OVERALLOCATED = 8      "               Derivative over-allocated on inception date
    RFHA_REALLOCATED = 9        "               the derivative was allocated to another HR after the dissolve
    .  "  THMHR_HR_REVERSE_DEDESIGNATION

ABAP code example for Function Module THMHR_HR_REVERSE_DEDESIGNATION





The ABAP code below is a full code listing to execute function module THMHR_HR_REVERSE_DEDESIGNATION including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_rev_hr  TYPE THMHRT_HR .

DATA(ld_dedes_hr) = 'Check type of data required'.
DATA(ld_im_flg_testrun) = 'Check type of data required'.
DATA(ld_im_hr_date) = 'Check type of data required'. . CALL FUNCTION 'THMHR_HR_REVERSE_DEDESIGNATION' EXPORTING dedes_hr = ld_dedes_hr * im_flg_testrun = ld_im_flg_testrun * im_hr_date = ld_im_hr_date IMPORTING rev_hr = ld_rev_hr EXCEPTIONS INCORRECT_STATUS = 1 INCORRECT_VERSION = 2 LATER_VALUATION_EXISTS = 3 INVALID_HR = 4 ERROR_READING_RFHA = 5 REVERSAL_ERROR = 6 LATER_HR_DATE = 7 RFHA_OVERALLOCATED = 8 RFHA_REALLOCATED = 9 . " THMHR_HR_REVERSE_DEDESIGNATION
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_rev_hr  TYPE THMHRT_HR ,
ld_dedes_hr  TYPE THMHRT_HR ,
ld_im_flg_testrun  TYPE TPM_TESTRUN ,
ld_im_hr_date  TYPE THM_HR_DATE .

ld_dedes_hr = 'Check type of data required'.
ld_im_flg_testrun = 'Check type of data required'.
ld_im_hr_date = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name THMHR_HR_REVERSE_DEDESIGNATION or its description.