SAP LOAN_AMOUNT_CALCULATE Function Module for Determine Capital for a Key Date
LOAN_AMOUNT_CALCULATE is a standard loan amount 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 Determine Capital for a 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 loan amount calculate FM, simply by entering the name LOAN_AMOUNT_CALCULATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FVDE
Program Name: SAPLFVDE
Main Program: SAPLFVDE
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function LOAN_AMOUNT_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 'LOAN_AMOUNT_CALCULATE'"Determine Capital for a Key Date.
EXPORTING
* CALCULATION_DATE = ' ' "Key Date of Capital Calculation
* X_CALCULATE_BAVVWR = "Kennzeichen, ob die verfügbare Auszahlungsverpflichtung berechnet werden soll
* X_ARCHIVE_DATE_CHECK = 'X' "X = Checl Date With Reference to Archiving
* X_CONVERT_CURRENCY = ' ' "Conversion in Alternative Currency
* X_COMPLETED_LOANS = ' ' "X = Also Calculate for Loans in Stataus Completed
* CONVERSION_CURRENCY = ' ' "Target Currency for Conversion
* CONVERSION_DATE = "Key date for currency translation
* CONVERSION_RATE = "Currency Conversion Rate
* X_SINGLE_FLOW = ' ' "
* KOKO = ' ' "Current Condition Header
VDARL = "Darlehensvertragsdaten
* X_LOAD_CONDITIONS = ' ' "Indicates Whether Conditions Are To Be Read
* X_LOAD_I = ' ' "Kennzeichen, ob die gebuchten Bewegungen gelesen werden sollen
* X_LOAD_P = ' ' "Kennzeichen, ob die geplanten Bewegungen gelesen werden sollen
* X_LOAD_STORNO = ' ' "Kennzeichen, ob die stornierten Bewegungen gelesen werden sollen
* X_DBUDAT = ' ' "Indicates Whether Evaluation Is To Be Run by Posting Date
* X_CALCULATE_BRVWR = 'X' "Indicator - Calculate Available Capital
IMPORTING
RLOAM = "Summierte Übergabewerte
TABLES
I_BEPP = "Transaction Data
* I_KOPO = "Current Condition Items
EXCEPTIONS
NO_CONVERSION_CURRENCY = 1 NO_DATE_FOR_CONVERSION = 2 DATE_IN_ARCHIVED_PERIOD = 3 ERROR = 4
IMPORTING Parameters details for LOAN_AMOUNT_CALCULATE
CALCULATION_DATE - Key Date of Capital Calculation
Data type: SY-DATUMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_CALCULATE_BAVVWR - Kennzeichen, ob die verfügbare Auszahlungsverpflichtung berechnet werden soll
Data type: FLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
X_ARCHIVE_DATE_CHECK - X = Checl Date With Reference to Archiving
Data type: FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_CONVERT_CURRENCY - Conversion in Alternative Currency
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_COMPLETED_LOANS - X = Also Calculate for Loans in Stataus Completed
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CONVERSION_CURRENCY - Target Currency for Conversion
Data type: RLOAM-SWWHRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CONVERSION_DATE - Key date for currency translation
Data type: SY-DATUMOptional: Yes
Call by Reference: No ( called with pass by value option)
CONVERSION_RATE - Currency Conversion Rate
Data type: EXCHANGE-I_KURSOptional: Yes
Call by Reference: No ( called with pass by value option)
X_SINGLE_FLOW -
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
KOKO - Current Condition Header
Data type: VZZKOKODefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
VDARL - Darlehensvertragsdaten
Data type: VDARLOptional: No
Call by Reference: No ( called with pass by value option)
X_LOAD_CONDITIONS - Indicates Whether Conditions Are To Be Read
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_LOAD_I - Kennzeichen, ob die gebuchten Bewegungen gelesen werden sollen
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_LOAD_P - Kennzeichen, ob die geplanten Bewegungen gelesen werden sollen
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_LOAD_STORNO - Kennzeichen, ob die stornierten Bewegungen gelesen werden sollen
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_DBUDAT - Indicates Whether Evaluation Is To Be Run by Posting Date
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_CALCULATE_BRVWR - Indicator - Calculate Available Capital
Data type: FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for LOAN_AMOUNT_CALCULATE
RLOAM - Summierte Übergabewerte
Data type: RLOAMOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for LOAN_AMOUNT_CALCULATE
I_BEPP - Transaction Data
Data type: VZZBEPPOptional: No
Call by Reference: No ( called with pass by value option)
I_KOPO - Current Condition Items
Data type: VZZKOPOOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_CONVERSION_CURRENCY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_DATE_FOR_CONVERSION -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DATE_IN_ARCHIVED_PERIOD - Auswertung im archivierten Zeitraum
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR - Program error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for LOAN_AMOUNT_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_rloam | TYPE RLOAM, " | |||
lt_i_bepp | TYPE STANDARD TABLE OF VZZBEPP, " | |||
lv_calculation_date | TYPE SY-DATUM, " SPACE | |||
lv_no_conversion_currency | TYPE SY, " | |||
lv_x_calculate_bavvwr | TYPE FLAG, " | |||
lv_x_archive_date_check | TYPE FLAG, " 'X' | |||
lv_x_convert_currency | TYPE FLAG, " SPACE | |||
lv_x_completed_loans | TYPE FLAG, " SPACE | |||
lv_conversion_currency | TYPE RLOAM-SWWHR, " SPACE | |||
lv_conversion_date | TYPE SY-DATUM, " | |||
lv_conversion_rate | TYPE EXCHANGE-I_KURS, " | |||
lv_x_single_flow | TYPE FLAG, " SPACE | |||
lv_koko | TYPE VZZKOKO, " SPACE | |||
lt_i_kopo | TYPE STANDARD TABLE OF VZZKOPO, " | |||
lv_no_date_for_conversion | TYPE VZZKOPO, " | |||
lv_vdarl | TYPE VDARL, " | |||
lv_date_in_archived_period | TYPE VDARL, " | |||
lv_error | TYPE VDARL, " | |||
lv_x_load_conditions | TYPE FLAG, " SPACE | |||
lv_x_load_i | TYPE FLAG, " SPACE | |||
lv_x_load_p | TYPE FLAG, " SPACE | |||
lv_x_load_storno | TYPE FLAG, " SPACE | |||
lv_x_dbudat | TYPE FLAG, " SPACE | |||
lv_x_calculate_brvwr | TYPE FLAG. " 'X' |
  CALL FUNCTION 'LOAN_AMOUNT_CALCULATE' "Determine Capital for a Key Date |
EXPORTING | ||
CALCULATION_DATE | = lv_calculation_date | |
X_CALCULATE_BAVVWR | = lv_x_calculate_bavvwr | |
X_ARCHIVE_DATE_CHECK | = lv_x_archive_date_check | |
X_CONVERT_CURRENCY | = lv_x_convert_currency | |
X_COMPLETED_LOANS | = lv_x_completed_loans | |
CONVERSION_CURRENCY | = lv_conversion_currency | |
CONVERSION_DATE | = lv_conversion_date | |
CONVERSION_RATE | = lv_conversion_rate | |
X_SINGLE_FLOW | = lv_x_single_flow | |
KOKO | = lv_koko | |
VDARL | = lv_vdarl | |
X_LOAD_CONDITIONS | = lv_x_load_conditions | |
X_LOAD_I | = lv_x_load_i | |
X_LOAD_P | = lv_x_load_p | |
X_LOAD_STORNO | = lv_x_load_storno | |
X_DBUDAT | = lv_x_dbudat | |
X_CALCULATE_BRVWR | = lv_x_calculate_brvwr | |
IMPORTING | ||
RLOAM | = lv_rloam | |
TABLES | ||
I_BEPP | = lt_i_bepp | |
I_KOPO | = lt_i_kopo | |
EXCEPTIONS | ||
NO_CONVERSION_CURRENCY = 1 | ||
NO_DATE_FOR_CONVERSION = 2 | ||
DATE_IN_ARCHIVED_PERIOD = 3 | ||
ERROR = 4 | ||
. " LOAN_AMOUNT_CALCULATE |
ABAP code using 7.40 inline data declarations to call FM LOAN_AMOUNT_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_calculation_date). | ||||
DATA(ld_calculation_date) | = ' '. | |||
DATA(ld_x_archive_date_check) | = 'X'. | |||
DATA(ld_x_convert_currency) | = ' '. | |||
DATA(ld_x_completed_loans) | = ' '. | |||
"SELECT single SWWHR FROM RLOAM INTO @DATA(ld_conversion_currency). | ||||
DATA(ld_conversion_currency) | = ' '. | |||
"SELECT single DATUM FROM SY INTO @DATA(ld_conversion_date). | ||||
"SELECT single I_KURS FROM EXCHANGE INTO @DATA(ld_conversion_rate). | ||||
DATA(ld_x_single_flow) | = ' '. | |||
DATA(ld_koko) | = ' '. | |||
DATA(ld_x_load_conditions) | = ' '. | |||
DATA(ld_x_load_i) | = ' '. | |||
DATA(ld_x_load_p) | = ' '. | |||
DATA(ld_x_load_storno) | = ' '. | |||
DATA(ld_x_dbudat) | = ' '. | |||
DATA(ld_x_calculate_brvwr) | = 'X'. | |||
Search for further information about these or an SAP related objects