SAP Function Modules

FTR_FX_DEAL_MAINTAIN_FROM_DATA SAP Function module - FTR: Create/Change a Foreign Exchange Transaction via Interface







FTR_FX_DEAL_MAINTAIN_FROM_DATA 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 FTR_FX_DEAL_MAINTAIN_FROM_DATA into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM FTR_FX_DEAL_MAINTAIN_FROM_DATA - FTR FX DEAL MAINTAIN FROM DATA





CALL FUNCTION 'FTR_FX_DEAL_MAINTAIN_FROM_DATA' "FTR: Create/Change a Foreign Exchange Transaction via Interface
  EXPORTING
    i_fx_deal =                 " vtbfxifdc
    i_modus =                   " tact-actvt
  IMPORTING
    e_companycode =             " vtbfha-bukrs
    e_dealnumber =              " vtbfha-rfha
    e_fx_deal =                 " vtbfxifdc
* TABLES
*   return =                    " bapiret2      Return Parameter
* CHANGING
*   deal_ok =                   " sysubrc
  EXCEPTIONS
    DATA_INCOMPLETE = 1         "
    WRONG_COMPANYCODE = 2       "
    WRONG_PRODUCTTYPE = 3       "
    WRONG_TRANSACTIONTYPE = 4   "
    WRONG_FLOWTYPE = 5          "
    WRONG_CURRPAIR = 6          "
    WRONG_RATE_AMOUNTS = 7      "
    DEAL_NOT_FOUND = 8          "
    NO_WORKINGDAY = 9           "
    DEAL_LOCKED = 10            "
    NO_AUTHORITY = 11           "
    .  "  FTR_FX_DEAL_MAINTAIN_FROM_DATA

ABAP code example for Function Module FTR_FX_DEAL_MAINTAIN_FROM_DATA





The ABAP code below is a full code listing to execute function module FTR_FX_DEAL_MAINTAIN_FROM_DATA 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_e_companycode  TYPE VTBFHA-BUKRS ,
ld_e_dealnumber  TYPE VTBFHA-RFHA ,
ld_e_fx_deal  TYPE VTBFXIFDC ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return .

DATA(ld_deal_ok) = 'some text here'.
DATA(ld_i_fx_deal) = 'some text here'.

SELECT single ACTVT
FROM TACT
INTO @DATA(ld_i_modus).


"populate fields of struture and append to itab
append wa_return to it_return. . CALL FUNCTION 'FTR_FX_DEAL_MAINTAIN_FROM_DATA' EXPORTING i_fx_deal = ld_i_fx_deal i_modus = ld_i_modus IMPORTING e_companycode = ld_e_companycode e_dealnumber = ld_e_dealnumber e_fx_deal = ld_e_fx_deal * TABLES * return = it_return * CHANGING * deal_ok = ld_deal_ok EXCEPTIONS DATA_INCOMPLETE = 1 WRONG_COMPANYCODE = 2 WRONG_PRODUCTTYPE = 3 WRONG_TRANSACTIONTYPE = 4 WRONG_FLOWTYPE = 5 WRONG_CURRPAIR = 6 WRONG_RATE_AMOUNTS = 7 DEAL_NOT_FOUND = 8 NO_WORKINGDAY = 9 DEAL_LOCKED = 10 NO_AUTHORITY = 11 . " FTR_FX_DEAL_MAINTAIN_FROM_DATA
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 ELSEIF SY-SUBRC EQ 10. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 11. "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_deal_ok  TYPE SYSUBRC ,
ld_e_companycode  TYPE VTBFHA-BUKRS ,
ld_i_fx_deal  TYPE VTBFXIFDC ,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return,
ld_e_dealnumber  TYPE VTBFHA-RFHA ,
ld_i_modus  TYPE TACT-ACTVT ,
ld_e_fx_deal  TYPE VTBFXIFDC .

ld_deal_ok = 'some text here'.
ld_i_fx_deal = 'some text here'.

"populate fields of struture and append to itab
append wa_return to it_return.

SELECT single ACTVT
FROM TACT
INTO ld_i_modus.

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 FTR_FX_DEAL_MAINTAIN_FROM_DATA or its description.