SAP RM_MM_GENERAL_INTEREST_CF_PV Function Module for Net Present Value Module for Cash Flows
RM_MM_GENERAL_INTEREST_CF_PV is a standard rm mm general interest cf pv SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Net Present Value Module for Cash Flows 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 rm mm general interest cf pv FM, simply by entering the name RM_MM_GENERAL_INTEREST_CF_PV into the relevant SAP transaction such as SE37 or SE38.
Function Group: RMMM
Program Name: SAPLRMMM
Main Program: SAPLRMMM
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RM_MM_GENERAL_INTEREST_CF_PV 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 'RM_MM_GENERAL_INTEREST_CF_PV'"Net Present Value Module for Cash Flows.
EXPORTING
I_AKT_DATUM = "Current Date
I_FGCF = "Formula Reference/Cash Flow
I_BEST = "Business Structure Types BEST, BEWEG, OPTI
I_SZVERLAUF = "Scenario Progression
* IT_ZBAF = "Precalculated Discount Factors
I_AUSW_DATUM = "Evaluation Date
* I_KOND_DATUM = "Condition Date
I_CF_CURR = "Currency of Cash Flow
I_CF_CURVE = "Bid Valuation Curve Type for Mark-to-Market
* IS_CONTEXT = "
* I_SZENAME = ' ' "Scenario
I_SHIFT_REGEL = "Shift rule
I_MSEG = "Market Segment (Yield Curves, Volas etc) for Valuation
IMPORTING
E_PREVA = "
E_INCOMING_PV = "
E_OUTGOING_PV = "
E_INCOMING_DURATION = "Duration Incoming Side
E_OUTGOING_DURATION = "Duration Outgoing Side
E_CFPV_TAB = "Compound Elemet Type Result Cash Flow
EXCEPTIONS
NO_YIELD_CURVE_FOUND = 1 MARKET_DATA_RATES = 2 NO_PRESENT_VALUE_CALCULATED = 3
IMPORTING Parameters details for RM_MM_GENERAL_INTEREST_CF_PV
I_AKT_DATUM - Current Date
Data type: DOptional: No
Call by Reference: Yes
I_FGCF - Formula Reference/Cash Flow
Data type: TV0_BEWEG_TABOptional: No
Call by Reference: Yes
I_BEST - Business Structure Types BEST, BEWEG, OPTI
Data type: TV0_BEST_TYPOptional: No
Call by Reference: Yes
I_SZVERLAUF - Scenario Progression
Data type: VTVSZVERL-SZVERLAUFOptional: No
Call by Reference: Yes
IT_ZBAF - Precalculated Discount Factors
Data type: TVSPR_T_DISCOUNTOptional: Yes
Call by Reference: Yes
I_AUSW_DATUM - Evaluation Date
Data type: DOptional: No
Call by Reference: Yes
I_KOND_DATUM - Condition Date
Data type: DOptional: Yes
Call by Reference: Yes
I_CF_CURR - Currency of Cash Flow
Data type: VTVFGCF-SCWHROptional: No
Call by Reference: Yes
I_CF_CURVE - Bid Valuation Curve Type for Mark-to-Market
Data type: VTVFGSSEG-BCURVEOptional: No
Call by Reference: Yes
IS_CONTEXT -
Data type: TVSPR_S_CONTEXTOptional: Yes
Call by Reference: Yes
I_SZENAME - Scenario
Data type: VTVSZKO-SZENARIDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_SHIFT_REGEL - Shift rule
Data type: JBRREGOptional: No
Call by Reference: Yes
I_MSEG - Market Segment (Yield Curves, Volas etc) for Valuation
Data type: TV0_MSEG_TYPOptional: No
Call by Reference: Yes
EXPORTING Parameters details for RM_MM_GENERAL_INTEREST_CF_PV
E_PREVA -
Data type: FOptional: No
Call by Reference: Yes
E_INCOMING_PV -
Data type: FOptional: No
Call by Reference: Yes
E_OUTGOING_PV -
Data type: FOptional: No
Call by Reference: Yes
E_INCOMING_DURATION - Duration Incoming Side
Data type: FOptional: No
Call by Reference: Yes
E_OUTGOING_DURATION - Duration Outgoing Side
Data type: FOptional: No
Call by Reference: Yes
E_CFPV_TAB - Compound Elemet Type Result Cash Flow
Data type: TVM0_RESULT_TABOptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_YIELD_CURVE_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MARKET_DATA_RATES -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_PRESENT_VALUE_CALCULATED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RM_MM_GENERAL_INTEREST_CF_PV 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_e_preva | TYPE F, " | |||
| lv_i_akt_datum | TYPE D, " | |||
| lv_no_yield_curve_found | TYPE D, " | |||
| lv_i_fgcf | TYPE TV0_BEWEG_TAB, " | |||
| lv_i_best | TYPE TV0_BEST_TYP, " | |||
| lv_i_szverlauf | TYPE VTVSZVERL-SZVERLAUF, " | |||
| lv_it_zbaf | TYPE TVSPR_T_DISCOUNT, " | |||
| lv_i_ausw_datum | TYPE D, " | |||
| lv_e_incoming_pv | TYPE F, " | |||
| lv_market_data_rates | TYPE F, " | |||
| lv_i_kond_datum | TYPE D, " | |||
| lv_e_outgoing_pv | TYPE F, " | |||
| lv_no_present_value_calculated | TYPE F, " | |||
| lv_i_cf_curr | TYPE VTVFGCF-SCWHR, " | |||
| lv_e_incoming_duration | TYPE F, " | |||
| lv_i_cf_curve | TYPE VTVFGSSEG-BCURVE, " | |||
| lv_e_outgoing_duration | TYPE F, " | |||
| lv_e_cfpv_tab | TYPE TVM0_RESULT_TAB, " | |||
| lv_is_context | TYPE TVSPR_S_CONTEXT, " | |||
| lv_i_szename | TYPE VTVSZKO-SZENARI, " SPACE | |||
| lv_i_shift_regel | TYPE JBRREG, " | |||
| lv_i_mseg | TYPE TV0_MSEG_TYP. " |
|   CALL FUNCTION 'RM_MM_GENERAL_INTEREST_CF_PV' "Net Present Value Module for Cash Flows |
| EXPORTING | ||
| I_AKT_DATUM | = lv_i_akt_datum | |
| I_FGCF | = lv_i_fgcf | |
| I_BEST | = lv_i_best | |
| I_SZVERLAUF | = lv_i_szverlauf | |
| IT_ZBAF | = lv_it_zbaf | |
| I_AUSW_DATUM | = lv_i_ausw_datum | |
| I_KOND_DATUM | = lv_i_kond_datum | |
| I_CF_CURR | = lv_i_cf_curr | |
| I_CF_CURVE | = lv_i_cf_curve | |
| IS_CONTEXT | = lv_is_context | |
| I_SZENAME | = lv_i_szename | |
| I_SHIFT_REGEL | = lv_i_shift_regel | |
| I_MSEG | = lv_i_mseg | |
| IMPORTING | ||
| E_PREVA | = lv_e_preva | |
| E_INCOMING_PV | = lv_e_incoming_pv | |
| E_OUTGOING_PV | = lv_e_outgoing_pv | |
| E_INCOMING_DURATION | = lv_e_incoming_duration | |
| E_OUTGOING_DURATION | = lv_e_outgoing_duration | |
| E_CFPV_TAB | = lv_e_cfpv_tab | |
| EXCEPTIONS | ||
| NO_YIELD_CURVE_FOUND = 1 | ||
| MARKET_DATA_RATES = 2 | ||
| NO_PRESENT_VALUE_CALCULATED = 3 | ||
| . " RM_MM_GENERAL_INTEREST_CF_PV | ||
ABAP code using 7.40 inline data declarations to call FM RM_MM_GENERAL_INTEREST_CF_PV
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 SZVERLAUF FROM VTVSZVERL INTO @DATA(ld_i_szverlauf). | ||||
| "SELECT single SCWHR FROM VTVFGCF INTO @DATA(ld_i_cf_curr). | ||||
| "SELECT single BCURVE FROM VTVFGSSEG INTO @DATA(ld_i_cf_curve). | ||||
| "SELECT single SZENARI FROM VTVSZKO INTO @DATA(ld_i_szename). | ||||
| DATA(ld_i_szename) | = ' '. | |||
Search for further information about these or an SAP related objects