SAP Function Modules

KL_BK_CALC_NOM_OPTIONS_WITH_UL SAP Function module - Nominal Amount for OTC and Tradable Options







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

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


Pattern for FM KL_BK_CALC_NOM_OPTIONS_WITH_UL - KL BK CALC NOM OPTIONS WITH UL





CALL FUNCTION 'KL_BK_CALC_NOM_OPTIONS_WITH_UL' "Nominal Amount for OTC and Tradable Options
  EXPORTING
*   i_datum = SY-DATUM          " sy-datum
    i_currency =                " tcurc-waers   Limit Currency
    i_sfgdt =                   " tvs_sfgdt_typ  Single Transaction as SFGDT
    i_cp_issuer_flag =          " n
*   i_protocol_level = 1        "
  IMPORTING
    e_amount =                  " klbknz-bbk1whr  Nominal Amount
  TABLES
    c_error_itab =              " bapierr
  EXCEPTIONS
    INVALID_DATA = 1            "
    NO_CALC = 2                 "
    .  "  KL_BK_CALC_NOM_OPTIONS_WITH_UL

ABAP code example for Function Module KL_BK_CALC_NOM_OPTIONS_WITH_UL





The ABAP code below is a full code listing to execute function module KL_BK_CALC_NOM_OPTIONS_WITH_UL 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_amount  TYPE KLBKNZ-BBK1WHR ,
it_c_error_itab  TYPE STANDARD TABLE OF BAPIERR,"TABLES PARAM
wa_c_error_itab  LIKE LINE OF it_c_error_itab .

DATA(ld_i_datum) = '20210129'.

SELECT single WAERS
FROM TCURC
INTO @DATA(ld_i_currency).

DATA(ld_i_sfgdt) = '20210129'.
DATA(ld_i_cp_issuer_flag) = '20210129'.
DATA(ld_i_protocol_level) = 'some text here'.

"populate fields of struture and append to itab
append wa_c_error_itab to it_c_error_itab. . CALL FUNCTION 'KL_BK_CALC_NOM_OPTIONS_WITH_UL' EXPORTING * i_datum = ld_i_datum i_currency = ld_i_currency i_sfgdt = ld_i_sfgdt i_cp_issuer_flag = ld_i_cp_issuer_flag * i_protocol_level = ld_i_protocol_level IMPORTING e_amount = ld_e_amount TABLES c_error_itab = it_c_error_itab EXCEPTIONS INVALID_DATA = 1 NO_CALC = 2 . " KL_BK_CALC_NOM_OPTIONS_WITH_UL
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 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_e_amount  TYPE KLBKNZ-BBK1WHR ,
ld_i_datum  TYPE SY-DATUM ,
it_c_error_itab  TYPE STANDARD TABLE OF BAPIERR ,
wa_c_error_itab  LIKE LINE OF it_c_error_itab,
ld_i_currency  TYPE TCURC-WAERS ,
ld_i_sfgdt  TYPE TVS_SFGDT_TYP ,
ld_i_cp_issuer_flag  TYPE N ,
ld_i_protocol_level  TYPE STRING .

ld_i_datum = '20210129'.

"populate fields of struture and append to itab
append wa_c_error_itab to it_c_error_itab.

SELECT single WAERS
FROM TCURC
INTO ld_i_currency.

ld_i_sfgdt = '20210129'.
ld_i_cp_issuer_flag = '20210129'.
ld_i_protocol_level = 'some text here'.

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