SAP Function Modules

TV_GET_YC_FROM_BUFFER SAP Function module - Zinskurve(n) aus Marktdatenpuffer holen







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

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


Pattern for FM TV_GET_YC_FROM_BUFFER - TV GET YC FROM BUFFER





CALL FUNCTION 'TV_GET_YC_FROM_BUFFER' "Zinskurve(n) aus Marktdatenpuffer holen
* EXPORTING
*   konddatum = SY-DATUM        " jbd11-dkond   Datum, zu dem Kurve benötigt wird
*   szenario = SPACE            " vtvszko-szenari  Szenario, aus dem Kurve kommen soll
*   i_mseg =                    " jbrmseg       Marktdatenparameter
  TABLES
    e_vtvszzins =               " vtvszzins     Rückgabestruktur
    s_yieldctype =              " vtv_sopyc     Angeforderte Zinskurvenarten und ihre Währungen
  EXCEPTIONS
    DEFAULT_YIELDCURVE_MISSING = 1  "
    DIVISION_BY_ZERO = 2        "
    KONDDAT_LT_OLDDAT = 3       "
    NOT_F_JBD14 = 4             "               Kurvenbeschreibung fehlt
    NOT_F_SZENARIO = 5          "               Szenario nicht gefunden
    NO_CURVE_DATA = 6           "               keine Kurvendaten
    NO_INITIALIZATION = 7       "               Puffer nicht initialisiert
    OLDCURVE_EMPTY = 8          "
    REFERENZZINS_MISSING = 9    "
    .  "  TV_GET_YC_FROM_BUFFER

ABAP code example for Function Module TV_GET_YC_FROM_BUFFER





The ABAP code below is a full code listing to execute function module TV_GET_YC_FROM_BUFFER 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:
it_e_vtvszzins  TYPE STANDARD TABLE OF VTVSZZINS,"TABLES PARAM
wa_e_vtvszzins  LIKE LINE OF it_e_vtvszzins ,
it_s_yieldctype  TYPE STANDARD TABLE OF VTV_SOPYC,"TABLES PARAM
wa_s_yieldctype  LIKE LINE OF it_s_yieldctype .


SELECT single DKOND
FROM JBD11
INTO @DATA(ld_konddatum).


SELECT single SZENARI
FROM VTVSZKO
INTO @DATA(ld_szenario).

DATA(ld_i_mseg) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_vtvszzins to it_e_vtvszzins.

"populate fields of struture and append to itab
append wa_s_yieldctype to it_s_yieldctype. . CALL FUNCTION 'TV_GET_YC_FROM_BUFFER' * EXPORTING * konddatum = ld_konddatum * szenario = ld_szenario * i_mseg = ld_i_mseg TABLES e_vtvszzins = it_e_vtvszzins s_yieldctype = it_s_yieldctype EXCEPTIONS DEFAULT_YIELDCURVE_MISSING = 1 DIVISION_BY_ZERO = 2 KONDDAT_LT_OLDDAT = 3 NOT_F_JBD14 = 4 NOT_F_SZENARIO = 5 NO_CURVE_DATA = 6 NO_INITIALIZATION = 7 OLDCURVE_EMPTY = 8 REFERENZZINS_MISSING = 9 . " TV_GET_YC_FROM_BUFFER
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 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_konddatum  TYPE JBD11-DKOND ,
it_e_vtvszzins  TYPE STANDARD TABLE OF VTVSZZINS ,
wa_e_vtvszzins  LIKE LINE OF it_e_vtvszzins,
ld_szenario  TYPE VTVSZKO-SZENARI ,
it_s_yieldctype  TYPE STANDARD TABLE OF VTV_SOPYC ,
wa_s_yieldctype  LIKE LINE OF it_s_yieldctype,
ld_i_mseg  TYPE JBRMSEG .


SELECT single DKOND
FROM JBD11
INTO ld_konddatum.


"populate fields of struture and append to itab
append wa_e_vtvszzins to it_e_vtvszzins.

SELECT single SZENARI
FROM VTVSZKO
INTO ld_szenario.


"populate fields of struture and append to itab
append wa_s_yieldctype to it_s_yieldctype.
ld_i_mseg = 'Check type of data required'.

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