SAP LAC_VALUE_CALCULATE Function Module for Calculate LAC Amortization for Key Date
LAC_VALUE_CALCULATE is a standard lac 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 LAC Amortization for Key Date 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 lac value calculate FM, simply by entering the name LAC_VALUE_CALCULATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FWAC
Program Name: SAPLFWAC
Main Program:
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function LAC_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 'LAC_VALUE_CALCULATE'"Calculate LAC Amortization for Key Date.
EXPORTING
I_DATE = "Amortization Key Date
I_TAB_ALL_FLOWS = "Alle Bewegungen der Depotgruppe
I_ACCRUAL_FLOW_TYPE = "Bewegungstyp der Abgrenzungsbewegungen
* I_REPAYMENT_RATE = 100 "Repayment rate
I_REPAYMENT_DATE = "Payoff Date
I_DAY_METHOD = "Interest calculation method
I_POSITION = "zu amortisierendes Nominal
IMPORTING
E_LAC_AMOUNT = "Amortisierung zum Stichtag
IMPORTING Parameters details for LAC_VALUE_CALCULATE
I_DATE - Amortization Key Date
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
I_TAB_ALL_FLOWS - Alle Bewegungen der Depotgruppe
Data type: TRPM_IT_VZZBEPPOptional: No
Call by Reference: No ( called with pass by value option)
I_ACCRUAL_FLOW_TYPE - Bewegungstyp der Abgrenzungsbewegungen
Data type: VZZBEPP-SBEWZITIOptional: No
Call by Reference: No ( called with pass by value option)
I_REPAYMENT_RATE - Repayment rate
Data type: VZZKOPO-PKONDDefault: 100
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_REPAYMENT_DATE - Payoff Date
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
I_DAY_METHOD - Interest calculation method
Data type: VZZKOKO-SZBMETHOptional: No
Call by Reference: No ( called with pass by value option)
I_POSITION - zu amortisierendes Nominal
Data type: VZZBEPP-BBWHROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for LAC_VALUE_CALCULATE
E_LAC_AMOUNT - Amortisierung zum Stichtag
Data type: VZZBEPP-BBWHROptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for LAC_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_date | TYPE SY-DATUM, " | |||
| lv_e_lac_amount | TYPE VZZBEPP-BBWHR, " | |||
| lv_i_tab_all_flows | TYPE TRPM_IT_VZZBEPP, " | |||
| lv_i_accrual_flow_type | TYPE VZZBEPP-SBEWZITI, " | |||
| lv_i_repayment_rate | TYPE VZZKOPO-PKOND, " 100 | |||
| lv_i_repayment_date | TYPE SY-DATUM, " | |||
| lv_i_day_method | TYPE VZZKOKO-SZBMETH, " | |||
| lv_i_position | TYPE VZZBEPP-BBWHR. " |
|   CALL FUNCTION 'LAC_VALUE_CALCULATE' "Calculate LAC Amortization for Key Date |
| EXPORTING | ||
| I_DATE | = lv_i_date | |
| I_TAB_ALL_FLOWS | = lv_i_tab_all_flows | |
| I_ACCRUAL_FLOW_TYPE | = lv_i_accrual_flow_type | |
| I_REPAYMENT_RATE | = lv_i_repayment_rate | |
| I_REPAYMENT_DATE | = lv_i_repayment_date | |
| I_DAY_METHOD | = lv_i_day_method | |
| I_POSITION | = lv_i_position | |
| IMPORTING | ||
| E_LAC_AMOUNT | = lv_e_lac_amount | |
| . " LAC_VALUE_CALCULATE | ||
ABAP code using 7.40 inline data declarations to call FM LAC_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_date). | ||||
| "SELECT single BBWHR FROM VZZBEPP INTO @DATA(ld_e_lac_amount). | ||||
| "SELECT single SBEWZITI FROM VZZBEPP INTO @DATA(ld_i_accrual_flow_type). | ||||
| "SELECT single PKOND FROM VZZKOPO INTO @DATA(ld_i_repayment_rate). | ||||
| DATA(ld_i_repayment_rate) | = 100. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_i_repayment_date). | ||||
| "SELECT single SZBMETH FROM VZZKOKO INTO @DATA(ld_i_day_method). | ||||
| "SELECT single BBWHR FROM VZZBEPP INTO @DATA(ld_i_position). | ||||
Search for further information about these or an SAP related objects