SAP FVD_API_EXP_GET_CAPITALS Function Module for API: Get Loan Data for Capital of a Contract
FVD_API_EXP_GET_CAPITALS is a standard fvd api exp get capitals SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for API: Get Loan Data for Capital of a Contract 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 fvd api exp get capitals FM, simply by entering the name FVD_API_EXP_GET_CAPITALS into the relevant SAP transaction such as SE37 or SE38.
Function Group: FVD_API_EXP_GET
Program Name: SAPLFVD_API_EXP_GET
Main Program: SAPLFVD_API_EXP_GET
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FVD_API_EXP_GET_CAPITALS 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 'FVD_API_EXP_GET_CAPITALS'"API: Get Loan Data for Capital of a Contract.
EXPORTING
I_BUKRS = "Company Code
I_RANL = "Contract Number
I_CALCULATION_DATE = "Key Date of Capital Calculation
* I_CALCULATE_RECEIV_BALANCE = ' ' "Kennzeichen, ob der Forderungssaldo berechnet werden soll
* I_ONLY_POSTED_FLOW_RELEVANT = ' ' "Nur gebuchte Bewegungen für Kapitalienermittlung berücksichtigen
* I_USE_POSTING_DATE = ' ' "
IMPORTING
E_STR_CAPITALS = "Capital Amounts and Accounting Key Figures
EXCEPTIONS
COMPANY_CODE_NOT_FOUND = 1 CONTRACT_NOT_FOUND = 2 CALCULATION_ERROR = 3
IMPORTING Parameters details for FVD_API_EXP_GET_CAPITALS
I_BUKRS - Company Code
Data type: BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_RANL - Contract Number
Data type: RANLOptional: No
Call by Reference: No ( called with pass by value option)
I_CALCULATION_DATE - Key Date of Capital Calculation
Data type: DOptional: No
Call by Reference: No ( called with pass by value option)
I_CALCULATE_RECEIV_BALANCE - Kennzeichen, ob der Forderungssaldo berechnet werden soll
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ONLY_POSTED_FLOW_RELEVANT - Nur gebuchte Bewegungen für Kapitalienermittlung berücksichtigen
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_USE_POSTING_DATE -
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FVD_API_EXP_GET_CAPITALS
E_STR_CAPITALS - Capital Amounts and Accounting Key Figures
Data type: FVDEXP_CAPITALSOptional: No
Call by Reference: Yes
EXCEPTIONS details
COMPANY_CODE_NOT_FOUND - Company Code was not Found
Data type:Optional: No
Call by Reference: Yes
CONTRACT_NOT_FOUND - Contract not found
Data type:Optional: No
Call by Reference: Yes
CALCULATION_ERROR - Fehler bei der Kapitalienberechnung
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FVD_API_EXP_GET_CAPITALS 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_bukrs | TYPE BUKRS, " | |||
| lv_e_str_capitals | TYPE FVDEXP_CAPITALS, " | |||
| lv_company_code_not_found | TYPE FVDEXP_CAPITALS, " | |||
| lv_i_ranl | TYPE RANL, " | |||
| lv_contract_not_found | TYPE RANL, " | |||
| lv_calculation_error | TYPE RANL, " | |||
| lv_i_calculation_date | TYPE D, " | |||
| lv_i_calculate_receiv_balance | TYPE XFELD, " SPACE | |||
| lv_i_only_posted_flow_relevant | TYPE XFELD, " SPACE | |||
| lv_i_use_posting_date | TYPE XFELD. " SPACE |
|   CALL FUNCTION 'FVD_API_EXP_GET_CAPITALS' "API: Get Loan Data for Capital of a Contract |
| EXPORTING | ||
| I_BUKRS | = lv_i_bukrs | |
| I_RANL | = lv_i_ranl | |
| I_CALCULATION_DATE | = lv_i_calculation_date | |
| I_CALCULATE_RECEIV_BALANCE | = lv_i_calculate_receiv_balance | |
| I_ONLY_POSTED_FLOW_RELEVANT | = lv_i_only_posted_flow_relevant | |
| I_USE_POSTING_DATE | = lv_i_use_posting_date | |
| IMPORTING | ||
| E_STR_CAPITALS | = lv_e_str_capitals | |
| EXCEPTIONS | ||
| COMPANY_CODE_NOT_FOUND = 1 | ||
| CONTRACT_NOT_FOUND = 2 | ||
| CALCULATION_ERROR = 3 | ||
| . " FVD_API_EXP_GET_CAPITALS | ||
ABAP code using 7.40 inline data declarations to call FM FVD_API_EXP_GET_CAPITALS
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.| DATA(ld_i_calculate_receiv_balance) | = ' '. | |||
| DATA(ld_i_only_posted_flow_relevant) | = ' '. | |||
| DATA(ld_i_use_posting_date) | = ' '. | |||
Search for further information about these or an SAP related objects