SAP TV_MARKET_DATA_RATES2 Function Module for Interface zum Marktdatenpuffer für Zinsen: Kurven u. Einzelsätze
TV_MARKET_DATA_RATES2 is a standard tv market data rates2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Interface zum Marktdatenpuffer für Zinsen: Kurven u. Einzelsätze 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 market data rates2 FM, simply by entering the name TV_MARKET_DATA_RATES2 into the relevant SAP transaction such as SE37 or SE38.
Function Group: TVPU
Program Name: SAPLTVPU
Main Program: SAPLTVPU
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TV_MARKET_DATA_RATES2 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_MARKET_DATA_RATES2'"Interface zum Marktdatenpuffer für Zinsen: Kurven u. Einzelsätze.
EXPORTING
* AKT_DATUM = SY-DATUM "aktuelles Datum z.B. heute
* KONDDATUM = SY-DATUM "Konditionsdatum d. Zinsen
* HORIZONT = '00000000' "Horizont der Bewertung
* MATURITY = '00000000' "Fälligkeit von Instrumenten
* SZENAME = ' ' "Szenarioname, gültig am Horizont
* ZERO_PAR = ' ' "' '=Zero-u. Parsätze berechnen; sonst nur Zeroro
* SHIFT_REGEL = "Shiftregel für Marktdaten
* I_MSEG = "Marktdatenparameter
TABLES
E_FORWARD_RATES = "Zinskurve des Szenarios
I_YIELDCTYPE = "Tab. der Währungen u. Zinskurvenart für Berech.
EXCEPTIONS
DEFAULT_YIELDCURVE_MISSING = 1 SHIFT_ERROR = 10 DIVISION_BY_ZERO = 2 KONDDAT_LT_OLDDAT = 3 NOT_F_JBD14 = 4 NOT_F_SZENARIO = 5 NO_DATA_FOUND = 6 NO_INITIALIZATION = 7 REFERENZZINS_MISSING = 8 NO_CURVE_DATA = 9
IMPORTING Parameters details for TV_MARKET_DATA_RATES2
AKT_DATUM - aktuelles Datum z.B. heute
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
KONDDATUM - Konditionsdatum d. Zinsen
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
HORIZONT - Horizont der Bewertung
Data type: SY-DATUMDefault: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
MATURITY - Fälligkeit von Instrumenten
Data type: SY-DATUMDefault: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SZENAME - Szenarioname, gültig am Horizont
Data type: VTVSZZINS-SZENARIDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ZERO_PAR - ' '=Zero-u. Parsätze berechnen; sonst nur Zeroro
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SHIFT_REGEL - Shiftregel für Marktdaten
Data type: JBRREGOptional: Yes
Call by Reference: No ( called with pass by value option)
I_MSEG - Marktdatenparameter
Data type: JBRMSEGOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for TV_MARKET_DATA_RATES2
E_FORWARD_RATES - Zinskurve des Szenarios
Data type: VTVSZZINSOptional: No
Call by Reference: No ( called with pass by value option)
I_YIELDCTYPE - Tab. der Währungen u. Zinskurvenart für Berech.
Data type: VTV_SOPYCOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
DEFAULT_YIELDCURVE_MISSING - Defaultzinskurve fehlt
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SHIFT_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DIVISION_BY_ZERO - Division durch 0 ist aufgetreten
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
KONDDAT_LT_OLDDAT - Aktuelles Datum < akt. Datum des Marktd. Puffers
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_F_JBD14 - Kurvenart der Währung nicht definiert
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_F_SZENARIO - Szenario nicht gefunden
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_DATA_FOUND - keine Geschäftsdaten gefunden
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_INITIALIZATION - Marktdatenpuffer nicht initialisiert
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
REFERENZZINS_MISSING - Referenzzins nicht gepflegt
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_CURVE_DATA - Interpolationsdaten fehlen
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TV_MARKET_DATA_RATES2 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_akt_datum | TYPE SY-DATUM, " SY-DATUM | |||
| lt_e_forward_rates | TYPE STANDARD TABLE OF VTVSZZINS, " | |||
| lv_default_yieldcurve_missing | TYPE VTVSZZINS, " | |||
| lv_shift_error | TYPE VTVSZZINS, " | |||
| lv_konddatum | TYPE SY-DATUM, " SY-DATUM | |||
| lt_i_yieldctype | TYPE STANDARD TABLE OF VTV_SOPYC, " | |||
| lv_division_by_zero | TYPE VTV_SOPYC, " | |||
| lv_horizont | TYPE SY-DATUM, " '00000000' | |||
| lv_konddat_lt_olddat | TYPE SY, " | |||
| lv_maturity | TYPE SY-DATUM, " '00000000' | |||
| lv_not_f_jbd14 | TYPE SY, " | |||
| lv_szename | TYPE VTVSZZINS-SZENARI, " SPACE | |||
| lv_not_f_szenario | TYPE VTVSZZINS, " | |||
| lv_zero_par | TYPE C, " SPACE | |||
| lv_no_data_found | TYPE C, " | |||
| lv_shift_regel | TYPE JBRREG, " | |||
| lv_no_initialization | TYPE JBRREG, " | |||
| lv_i_mseg | TYPE JBRMSEG, " | |||
| lv_referenzzins_missing | TYPE JBRMSEG, " | |||
| lv_no_curve_data | TYPE JBRMSEG. " |
|   CALL FUNCTION 'TV_MARKET_DATA_RATES2' "Interface zum Marktdatenpuffer für Zinsen: Kurven u. Einzelsätze |
| EXPORTING | ||
| AKT_DATUM | = lv_akt_datum | |
| KONDDATUM | = lv_konddatum | |
| HORIZONT | = lv_horizont | |
| MATURITY | = lv_maturity | |
| SZENAME | = lv_szename | |
| ZERO_PAR | = lv_zero_par | |
| SHIFT_REGEL | = lv_shift_regel | |
| I_MSEG | = lv_i_mseg | |
| TABLES | ||
| E_FORWARD_RATES | = lt_e_forward_rates | |
| I_YIELDCTYPE | = lt_i_yieldctype | |
| EXCEPTIONS | ||
| DEFAULT_YIELDCURVE_MISSING = 1 | ||
| SHIFT_ERROR = 10 | ||
| DIVISION_BY_ZERO = 2 | ||
| KONDDAT_LT_OLDDAT = 3 | ||
| NOT_F_JBD14 = 4 | ||
| NOT_F_SZENARIO = 5 | ||
| NO_DATA_FOUND = 6 | ||
| NO_INITIALIZATION = 7 | ||
| REFERENZZINS_MISSING = 8 | ||
| NO_CURVE_DATA = 9 | ||
| . " TV_MARKET_DATA_RATES2 | ||
ABAP code using 7.40 inline data declarations to call FM TV_MARKET_DATA_RATES2
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_akt_datum). | ||||
| DATA(ld_akt_datum) | = SY-DATUM. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_konddatum). | ||||
| DATA(ld_konddatum) | = SY-DATUM. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_horizont). | ||||
| DATA(ld_horizont) | = '00000000'. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_maturity). | ||||
| DATA(ld_maturity) | = '00000000'. | |||
| "SELECT single SZENARI FROM VTVSZZINS INTO @DATA(ld_szename). | ||||
| DATA(ld_szename) | = ' '. | |||
| DATA(ld_zero_par) | = ' '. | |||
Search for further information about these or an SAP related objects