SAP FWEV_SAC_VALUE_CALCULATE Function Module for Calculate SAC NPV and Eff. Int. Rate for Pos. (Also for All Sec. Accts)
FWEV_SAC_VALUE_CALCULATE is a standard fwev sac value calculate SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Calculate SAC NPV and Eff. Int. Rate for Pos. (Also for All Sec. Accts) 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 fwev sac value calculate FM, simply by entering the name FWEV_SAC_VALUE_CALCULATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FWEV
Program Name: SAPLFWEV
Main Program:
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FWEV_SAC_VALUE_CALCULATE 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 'FWEV_SAC_VALUE_CALCULATE'"Calculate SAC NPV and Eff. Int. Rate for Pos. (Also for All Sec. Accts).
EXPORTING
I_SET_DATE = "Stichtag der Barwertermittlung
I_TAB_FLOWS = "Flows
I_BUKRS = "Company Code
I_RANL = "ID Number
* I_EFFECTIVE_RATE = "
* I_DERIVE_SZBMETH_FROM_COND = "'X': Zinsberechnungsmethode wird aus Konditionen gezogen
* I_FLG_NO_INTERESTS = ' ' "Zinsen nicht berücksichtigen
IMPORTING
E_SAC_VALUE = "SAC Present Value
E_EFFECTIVE_RATE = "Effective Interest Rate
EXCEPTIONS
SET_DATE_NOT_QUALIFIED = 1 BUKRS_NOT_QUALIFIED = 2 RANL_NOT_QUALIFIED = 3
IMPORTING Parameters details for FWEV_SAC_VALUE_CALCULATE
I_SET_DATE - Stichtag der Barwertermittlung
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
I_TAB_FLOWS - Flows
Data type: TRPM_IT_VZZBEPPOptional: No
Call by Reference: No ( called with pass by value option)
I_BUKRS - Company Code
Data type: TZBZ-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_RANL - ID Number
Data type: VWPANLA-RANLOptional: No
Call by Reference: No ( called with pass by value option)
I_EFFECTIVE_RATE -
Data type: VWBEPP-PEFFZINSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_DERIVE_SZBMETH_FROM_COND - 'X': Zinsberechnungsmethode wird aus Konditionen gezogen
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_NO_INTERESTS - Zinsen nicht berücksichtigen
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FWEV_SAC_VALUE_CALCULATE
E_SAC_VALUE - SAC Present Value
Data type: VWBEPP-BBWHROptional: No
Call by Reference: No ( called with pass by value option)
E_EFFECTIVE_RATE - Effective Interest Rate
Data type: VWBEPP-PEFFZINSOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
SET_DATE_NOT_QUALIFIED - Stichtag initial
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
BUKRS_NOT_QUALIFIED - Company code has initial value
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RANL_NOT_QUALIFIED - ID number has initial value
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FWEV_SAC_VALUE_CALCULATE 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_i_set_date | TYPE SY-DATUM, " | |||
| lv_e_sac_value | TYPE VWBEPP-BBWHR, " | |||
| lv_set_date_not_qualified | TYPE VWBEPP, " | |||
| lv_i_tab_flows | TYPE TRPM_IT_VZZBEPP, " | |||
| lv_e_effective_rate | TYPE VWBEPP-PEFFZINS, " | |||
| lv_bukrs_not_qualified | TYPE VWBEPP, " | |||
| lv_i_bukrs | TYPE TZBZ-BUKRS, " | |||
| lv_ranl_not_qualified | TYPE TZBZ, " | |||
| lv_i_ranl | TYPE VWPANLA-RANL, " | |||
| lv_i_effective_rate | TYPE VWBEPP-PEFFZINS, " | |||
| lv_i_derive_szbmeth_from_cond | TYPE C, " | |||
| lv_i_flg_no_interests | TYPE C. " SPACE |
|   CALL FUNCTION 'FWEV_SAC_VALUE_CALCULATE' "Calculate SAC NPV and Eff. Int. Rate for Pos. (Also for All Sec. Accts) |
| EXPORTING | ||
| I_SET_DATE | = lv_i_set_date | |
| I_TAB_FLOWS | = lv_i_tab_flows | |
| I_BUKRS | = lv_i_bukrs | |
| I_RANL | = lv_i_ranl | |
| I_EFFECTIVE_RATE | = lv_i_effective_rate | |
| I_DERIVE_SZBMETH_FROM_COND | = lv_i_derive_szbmeth_from_cond | |
| I_FLG_NO_INTERESTS | = lv_i_flg_no_interests | |
| IMPORTING | ||
| E_SAC_VALUE | = lv_e_sac_value | |
| E_EFFECTIVE_RATE | = lv_e_effective_rate | |
| EXCEPTIONS | ||
| SET_DATE_NOT_QUALIFIED = 1 | ||
| BUKRS_NOT_QUALIFIED = 2 | ||
| RANL_NOT_QUALIFIED = 3 | ||
| . " FWEV_SAC_VALUE_CALCULATE | ||
ABAP code using 7.40 inline data declarations to call FM FWEV_SAC_VALUE_CALCULATE
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_i_set_date). | ||||
| "SELECT single BBWHR FROM VWBEPP INTO @DATA(ld_e_sac_value). | ||||
| "SELECT single PEFFZINS FROM VWBEPP INTO @DATA(ld_e_effective_rate). | ||||
| "SELECT single BUKRS FROM TZBZ INTO @DATA(ld_i_bukrs). | ||||
| "SELECT single RANL FROM VWPANLA INTO @DATA(ld_i_ranl). | ||||
| "SELECT single PEFFZINS FROM VWBEPP INTO @DATA(ld_i_effective_rate). | ||||
| DATA(ld_i_flg_no_interests) | = ' '. | |||
Search for further information about these or an SAP related objects