SAP Function Modules

EFFEKTIVZINS_DARLEHEN SAP Function module - Determine Effective Interest Rate Using Transfer Structure VZZKOPO







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

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


Pattern for FM EFFEKTIVZINS_DARLEHEN - EFFEKTIVZINS DARLEHEN





CALL FUNCTION 'EFFEKTIVZINS_DARLEHEN' "Determine Effective Interest Rate Using Transfer Structure VZZKOPO
  EXPORTING
    ivdarl =                    " vdarl         Structure VDARL
    ivzzkoko =                  " vzzkoko       Struktur VZZKOKO
*   i_flg_calc_effz = 'X'       " c             'X' = Berechnung des Effektivzinses
*   i_flg_cash_flow = ' '       "               'X' = Rückgabe des Finanzstromes in IVZZBEPP
*   i_flg_effz = ' '            "               ' ' beide  / '1' Methode 1 / '2' Methode 2
*   i_flg_effz_vgl = 'X'        "               'X' Vergleichseffektivzins berechnen
*   i_flg_lfz = ' '             "               'X' = Laufzeitende wird ermittelt
*   i_flg_popup = ' '           "               'X' Popup mit Abfrage, neuen Wert übernehmen
*   i_bvzwr =                   " rloam-bvzwr
  IMPORTING
    delfz =                     " vzzkoko-delfz  End of Term
    effzins =                   " vzzkoko-peffzins  Internal Rate of Return
    effzins2 =                  " vzzkoko-pmaneffz  Effektivzins 2 (nur wenn VZZKOKO-SEFFM2 gefüllt)
    effzinsvgl =                " vzzkoko-pvgleffz  Vergleichseffektivzins (A-Satz zum DGUEL_KK)
  TABLES
    ivzzbepp =                  " vzzbepp
    ivzzkopo =                  " vzzkopo
  EXCEPTIONS
    KEIN_EFFEKTIVZINS = 1       "
    .  "  EFFEKTIVZINS_DARLEHEN

ABAP code example for Function Module EFFEKTIVZINS_DARLEHEN





The ABAP code below is a full code listing to execute function module EFFEKTIVZINS_DARLEHEN 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_delfz  TYPE VZZKOKO-DELFZ ,
ld_effzins  TYPE VZZKOKO-PEFFZINS ,
ld_effzins2  TYPE VZZKOKO-PMANEFFZ ,
ld_effzinsvgl  TYPE VZZKOKO-PVGLEFFZ ,
it_ivzzbepp  TYPE STANDARD TABLE OF VZZBEPP,"TABLES PARAM
wa_ivzzbepp  LIKE LINE OF it_ivzzbepp ,
it_ivzzkopo  TYPE STANDARD TABLE OF VZZKOPO,"TABLES PARAM
wa_ivzzkopo  LIKE LINE OF it_ivzzkopo .

DATA(ld_ivdarl) = 'Check type of data required'.
DATA(ld_ivzzkoko) = 'Check type of data required'.
DATA(ld_i_flg_calc_effz) = 'Check type of data required'.
DATA(ld_i_flg_cash_flow) = 'some text here'.
DATA(ld_i_flg_effz) = 'some text here'.
DATA(ld_i_flg_effz_vgl) = 'some text here'.
DATA(ld_i_flg_lfz) = 'some text here'.
DATA(ld_i_flg_popup) = 'some text here'.

DATA(ld_i_bvzwr) = 20.50

"populate fields of struture and append to itab
append wa_ivzzbepp to it_ivzzbepp.

"populate fields of struture and append to itab
append wa_ivzzkopo to it_ivzzkopo. . CALL FUNCTION 'EFFEKTIVZINS_DARLEHEN' EXPORTING ivdarl = ld_ivdarl ivzzkoko = ld_ivzzkoko * i_flg_calc_effz = ld_i_flg_calc_effz * i_flg_cash_flow = ld_i_flg_cash_flow * i_flg_effz = ld_i_flg_effz * i_flg_effz_vgl = ld_i_flg_effz_vgl * i_flg_lfz = ld_i_flg_lfz * i_flg_popup = ld_i_flg_popup * i_bvzwr = ld_i_bvzwr IMPORTING delfz = ld_delfz effzins = ld_effzins effzins2 = ld_effzins2 effzinsvgl = ld_effzinsvgl TABLES ivzzbepp = it_ivzzbepp ivzzkopo = it_ivzzkopo EXCEPTIONS KEIN_EFFEKTIVZINS = 1 . " EFFEKTIVZINS_DARLEHEN
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_delfz  TYPE VZZKOKO-DELFZ ,
ld_ivdarl  TYPE VDARL ,
it_ivzzbepp  TYPE STANDARD TABLE OF VZZBEPP ,
wa_ivzzbepp  LIKE LINE OF it_ivzzbepp,
ld_effzins  TYPE VZZKOKO-PEFFZINS ,
ld_ivzzkoko  TYPE VZZKOKO ,
it_ivzzkopo  TYPE STANDARD TABLE OF VZZKOPO ,
wa_ivzzkopo  LIKE LINE OF it_ivzzkopo,
ld_effzins2  TYPE VZZKOKO-PMANEFFZ ,
ld_i_flg_calc_effz  TYPE C ,
ld_effzinsvgl  TYPE VZZKOKO-PVGLEFFZ ,
ld_i_flg_cash_flow  TYPE STRING ,
ld_i_flg_effz  TYPE STRING ,
ld_i_flg_effz_vgl  TYPE STRING ,
ld_i_flg_lfz  TYPE STRING ,
ld_i_flg_popup  TYPE STRING ,
ld_i_bvzwr  TYPE RLOAM-BVZWR .

ld_ivdarl = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ivzzbepp to it_ivzzbepp.
ld_ivzzkoko = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ivzzkopo to it_ivzzkopo.
ld_i_flg_calc_effz = 'Check type of data required'.
ld_i_flg_cash_flow = 'some text here'.
ld_i_flg_effz = 'some text here'.
ld_i_flg_effz_vgl = 'some text here'.
ld_i_flg_lfz = 'some text here'.
ld_i_flg_popup = 'some text here'.

ld_i_bvzwr = 20.50

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