SAP FX_OPTION_BARWERT Function Module for Barwert einer Devisenoption zu einem gegebenen Zeitpunkt









FX_OPTION_BARWERT is a standard fx option barwert SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Barwert einer Devisenoption zu einem gegebenen Zeitpunkt 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 fx option barwert FM, simply by entering the name FX_OPTION_BARWERT into the relevant SAP transaction such as SE37 or SE38.

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



Function FX_OPTION_BARWERT 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 'FX_OPTION_BARWERT'"Barwert einer Devisenoption zu einem gegebenen Zeitpunkt
EXPORTING
* AUSW_DATUM = SY-DATUM "Datum, zu dem der Barwert (Prämie) gerechnet wir
KAUF_VERK = "Underlying Kauf/Verkauf -> Put/Call
OPT_DAT = "Optionsdaten
SPOT = "Währungsdaten
* STEPS = 30 "Nur für Binomiale Berechnung: Wieviele Steps
VOLA = "Volatilität in Prozent
ZERO_DOMRATE = "Inlandszins als Zerosatz
ZERO_FORRATE = "Auslandszins als Zerosatz
* I_MSEG = "

IMPORTING
OPT_BARWERT = "Barwert / Prämie für AUSW_DATUM
OPT_DELTA = "Deltaergebnis

EXCEPTIONS
NEG_BARRIER = 1 ZERO_NEG_STRIKE = 10 ZERO_NEG_VOLA = 11 NO_CALC = 12 NEG_DAYS = 2 NEG_DOMRATE = 3 NEG_FORRATE = 4 NO_IO = 5 NO_PC = 6 NO_UD = 7 ZERO_NEG_SPOT = 8 ZERO_NEG_STEPS = 9
.



IMPORTING Parameters details for FX_OPTION_BARWERT

AUSW_DATUM - Datum, zu dem der Barwert (Prämie) gerechnet wir

Data type: SY-DATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

KAUF_VERK - Underlying Kauf/Verkauf -> Put/Call

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

OPT_DAT - Optionsdaten

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

SPOT - Währungsdaten

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

STEPS - Nur für Binomiale Berechnung: Wieviele Steps

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

VOLA - Volatilität in Prozent

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

ZERO_DOMRATE - Inlandszins als Zerosatz

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

ZERO_FORRATE - Auslandszins als Zerosatz

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

I_MSEG -

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

EXPORTING Parameters details for FX_OPTION_BARWERT

OPT_BARWERT - Barwert / Prämie für AUSW_DATUM

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

OPT_DELTA - Deltaergebnis

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

EXCEPTIONS details

NEG_BARRIER - Barrier negativ

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

ZERO_NEG_STRIKE - Strike <=0

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

ZERO_NEG_VOLA - Vola <= 0

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

NO_CALC -

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

NEG_DAYS - Anzahl Tage negativ

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

NEG_DOMRATE - Inlandszins negativ

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

NEG_FORRATE - Auslandszins negativ

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

NO_IO - Keine Kennung für In/Out

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

NO_PC - Keine Kennung für Put/Call

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

NO_UD - Keine Kennung für Up/Down

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

ZERO_NEG_SPOT - Spot <= 0

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

ZERO_NEG_STEPS - Bei amerikanischen Iter.-schritte <=0

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

Copy and paste ABAP code example for FX_OPTION_BARWERT 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_ausw_datum  TYPE SY-DATUM, "   SY-DATUM
lv_neg_barrier  TYPE SY, "   
lv_opt_barwert  TYPE SY, "   
lv_zero_neg_strike  TYPE SY, "   
lv_zero_neg_vola  TYPE SY, "   
lv_no_calc  TYPE SY, "   
lv_neg_days  TYPE SY, "   
lv_kauf_verk  TYPE JBRBEST-SFGTYP, "   
lv_opt_delta  TYPE JBRBEST, "   
lv_opt_dat  TYPE JBROPTI, "   
lv_neg_domrate  TYPE JBROPTI, "   
lv_spot  TYPE JBROPTI, "   
lv_neg_forrate  TYPE JBROPTI, "   
lv_no_io  TYPE JBROPTI, "   
lv_steps  TYPE JBROPTI, "   30
lv_vola  TYPE JBROPTI, "   
lv_no_pc  TYPE JBROPTI, "   
lv_no_ud  TYPE JBROPTI, "   
lv_zero_domrate  TYPE JBROPTI, "   
lv_zero_forrate  TYPE JBROPTI, "   
lv_zero_neg_spot  TYPE JBROPTI, "   
lv_i_mseg  TYPE JBRMSEG, "   
lv_zero_neg_steps  TYPE JBRMSEG. "   

  CALL FUNCTION 'FX_OPTION_BARWERT'  "Barwert einer Devisenoption zu einem gegebenen Zeitpunkt
    EXPORTING
         AUSW_DATUM = lv_ausw_datum
         KAUF_VERK = lv_kauf_verk
         OPT_DAT = lv_opt_dat
         SPOT = lv_spot
         STEPS = lv_steps
         VOLA = lv_vola
         ZERO_DOMRATE = lv_zero_domrate
         ZERO_FORRATE = lv_zero_forrate
         I_MSEG = lv_i_mseg
    IMPORTING
         OPT_BARWERT = lv_opt_barwert
         OPT_DELTA = lv_opt_delta
    EXCEPTIONS
        NEG_BARRIER = 1
        ZERO_NEG_STRIKE = 10
        ZERO_NEG_VOLA = 11
        NO_CALC = 12
        NEG_DAYS = 2
        NEG_DOMRATE = 3
        NEG_FORRATE = 4
        NO_IO = 5
        NO_PC = 6
        NO_UD = 7
        ZERO_NEG_SPOT = 8
        ZERO_NEG_STEPS = 9
. " FX_OPTION_BARWERT




ABAP code using 7.40 inline data declarations to call FM FX_OPTION_BARWERT

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.

"SELECT single DATUM FROM SY INTO @DATA(ld_ausw_datum).
DATA(ld_ausw_datum) = SY-DATUM.
 
 
 
 
 
 
 
"SELECT single SFGTYP FROM JBRBEST INTO @DATA(ld_kauf_verk).
 
 
 
 
 
 
 
DATA(ld_steps) = 30.
 
 
 
 
 
 
 
 
 


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!