SAP TV_PROT_OPTION Function Module for Schreibt Optionsdaten ins Protokoll









TV_PROT_OPTION is a standard tv prot option SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Schreibt Optionsdaten ins Protokoll 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 tv prot option FM, simply by entering the name TV_PROT_OPTION into the relevant SAP transaction such as SE37 or SE38.

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



Function TV_PROT_OPTION 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 'TV_PROT_OPTION'"Schreibt Optionsdaten ins Protokoll
EXPORTING
* LEVEL = '1' "
FOR_RATE = "Zins in Währung 1
* DOM_RATE = "Zins in Währung 2
VOLA = "Volatilität
* BARRIER_1 = "
* BARRIER_2 = "
* LINES = 1 "
DATE = "Fälligkeitsdatum
DAYS = "Laufzeit in Tagen
* STRIKE = "Strikekurs
* SPOT = "Spotkurs
* OSBSTRIKE = "Strikekurs bei Aktien
* OSBSPOT = "Spotkurs bei Aktien
* WHRG = "Währung (wird nicht ausgegeben, nur für Format)
.



IMPORTING Parameters details for TV_PROT_OPTION

LEVEL -

Data type: SPROT-LEVEL
Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)

FOR_RATE - Zins in Währung 1

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

DOM_RATE - Zins in Währung 2

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

VOLA - Volatilität

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

BARRIER_1 -

Data type: JBROPTI-B1OSKURS
Optional: Yes
Call by Reference: Yes

BARRIER_2 -

Data type: JBROPTI-B2OSKURS
Optional: Yes
Call by Reference: Yes

LINES -

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

DATE - Fälligkeitsdatum

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

DAYS - Laufzeit in Tagen

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

STRIKE - Strikekurs

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

SPOT - Spotkurs

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

OSBSTRIKE - Strikekurs bei Aktien

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

OSBSPOT - Spotkurs bei Aktien

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

WHRG - Währung (wird nicht ausgegeben, nur für Format)

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

Copy and paste ABAP code example for TV_PROT_OPTION 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_level  TYPE SPROT-LEVEL, "   '1'
lv_for_rate  TYPE JBRBEWEG-PKOND, "   
lv_dom_rate  TYPE JBRBEWEG-PKOND, "   
lv_vola  TYPE VTVSZCVO-VOLA, "   
lv_barrier_1  TYPE JBROPTI-B1OSKURS, "   
lv_barrier_2  TYPE JBROPTI-B2OSKURS, "   
lv_lines  TYPE I, "   1
lv_date  TYPE JBROPTI-DMATUR, "   
lv_days  TYPE JBRBEWEG-ABASTAGE, "   
lv_strike  TYPE JBROPTI-OSKURS, "   
lv_spot  TYPE JBROPTI-OSKURS, "   
lv_osbstrike  TYPE JBROPTI-OSBPRICE, "   
lv_osbspot  TYPE JBROPTI-OSBPRICE, "   
lv_whrg  TYPE JBRBEST-SBWHR. "   

  CALL FUNCTION 'TV_PROT_OPTION'  "Schreibt Optionsdaten ins Protokoll
    EXPORTING
         LEVEL = lv_level
         FOR_RATE = lv_for_rate
         DOM_RATE = lv_dom_rate
         VOLA = lv_vola
         BARRIER_1 = lv_barrier_1
         BARRIER_2 = lv_barrier_2
         LINES = lv_lines
         DATE = lv_date
         DAYS = lv_days
         STRIKE = lv_strike
         SPOT = lv_spot
         OSBSTRIKE = lv_osbstrike
         OSBSPOT = lv_osbspot
         WHRG = lv_whrg
. " TV_PROT_OPTION




ABAP code using 7.40 inline data declarations to call FM TV_PROT_OPTION

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 LEVEL FROM SPROT INTO @DATA(ld_level).
DATA(ld_level) = '1'.
 
"SELECT single PKOND FROM JBRBEWEG INTO @DATA(ld_for_rate).
 
"SELECT single PKOND FROM JBRBEWEG INTO @DATA(ld_dom_rate).
 
"SELECT single VOLA FROM VTVSZCVO INTO @DATA(ld_vola).
 
"SELECT single B1OSKURS FROM JBROPTI INTO @DATA(ld_barrier_1).
 
"SELECT single B2OSKURS FROM JBROPTI INTO @DATA(ld_barrier_2).
 
DATA(ld_lines) = 1.
 
"SELECT single DMATUR FROM JBROPTI INTO @DATA(ld_date).
 
"SELECT single ABASTAGE FROM JBRBEWEG INTO @DATA(ld_days).
 
"SELECT single OSKURS FROM JBROPTI INTO @DATA(ld_strike).
 
"SELECT single OSKURS FROM JBROPTI INTO @DATA(ld_spot).
 
"SELECT single OSBPRICE FROM JBROPTI INTO @DATA(ld_osbstrike).
 
"SELECT single OSBPRICE FROM JBROPTI INTO @DATA(ld_osbspot).
 
"SELECT single SBWHR FROM JBRBEST INTO @DATA(ld_whrg).
 


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!