SAP FVD_OVERPAY_CREATE Function Module for Create an overpayment
FVD_OVERPAY_CREATE is a standard fvd overpay create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create an overpayment 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 overpay create FM, simply by entering the name FVD_OVERPAY_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: TRDZ_H
Program Name: SAPLTRDZ_H
Main Program: SAPLTRDZ_H
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FVD_OVERPAY_CREATE 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_OVERPAY_CREATE'"Create an overpayment.
EXPORTING
I_COMPANY_CODE = "Company Code
* I_UPDATE_RUN = ' ' "Parameter 'Update run'
* I_HEADER_TEXT = "Document Header Text
* I_FLG_RAISE_ERROR = 'X' "'X' -> raise error if not successful
* I_FLG_COMMIT = 'X' "'X' -> COMMIT WORK
* I_LOG_HANDLE = "Application Log: Log Handle
I_OFFSETTING_ACCOUNT = "G/L Account Number
I_LOAN_CONTRACT = "Contract Number
I_FT_OVERPAY = "Flow Type
I_AMOUNT = "Amount in position currency
I_CURRENCY = "Position Currency (Currency of Position Amount)
* I_AMOUNT_LC = "Amount in local currency
I_POSTING_DATE = "Posting Date in the Document
* I_VALUE_DATE = "Value date of overpayment
* I_ASSIGNMENT = "Assignment Number
IMPORTING
ET_BKPF = "Table Type for Table BKPF
ET_BSEG = "Table Type for BSEG
ET_VDBEKI = "Table Type for Table VDBEKI
ET_VDBEPI = "Table Type for Table VDBEPI
ET_RETURN = "Table with BAPI Return Information
E_FLG_SUCCESS = "
ET_ERRORS = "
CHANGING
C_FLG_ERROR = "
EXCEPTIONS
ERROR = 1
IMPORTING Parameters details for FVD_OVERPAY_CREATE
I_COMPANY_CODE - Company Code
Data type: VDARL-BUKRSOptional: No
Call by Reference: Yes
I_UPDATE_RUN - Parameter 'Update run'
Data type: TB_UPDATE_RUNDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_HEADER_TEXT - Document Header Text
Data type: BKPF-BKTXTOptional: Yes
Call by Reference: Yes
I_FLG_RAISE_ERROR - 'X' -> raise error if not successful
Data type: XFELDDefault: 'X'
Optional: Yes
Call by Reference: Yes
I_FLG_COMMIT - 'X' -> COMMIT WORK
Data type: XFELDDefault: 'X'
Optional: Yes
Call by Reference: Yes
I_LOG_HANDLE - Application Log: Log Handle
Data type: BALLOGHNDLOptional: Yes
Call by Reference: Yes
I_OFFSETTING_ACCOUNT - G/L Account Number
Data type: SKB1-SAKNROptional: No
Call by Reference: Yes
I_LOAN_CONTRACT - Contract Number
Data type: VDARL-RANLOptional: No
Call by Reference: Yes
I_FT_OVERPAY - Flow Type
Data type: TZB0A-SBEWARTOptional: No
Call by Reference: Yes
I_AMOUNT - Amount in position currency
Data type: VDBEPP-BBWHROptional: No
Call by Reference: Yes
I_CURRENCY - Position Currency (Currency of Position Amount)
Data type: VDBEPP-SBWHROptional: No
Call by Reference: Yes
I_AMOUNT_LC - Amount in local currency
Data type: VDBEPP-BHWHROptional: Yes
Call by Reference: Yes
I_POSTING_DATE - Posting Date in the Document
Data type: VDBEKI-DBUDATOptional: No
Call by Reference: Yes
I_VALUE_DATE - Value date of overpayment
Data type: VDBEPP-DDISPOOptional: Yes
Call by Reference: Yes
I_ASSIGNMENT - Assignment Number
Data type: VDBEPP-ZUONROptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for FVD_OVERPAY_CREATE
ET_BKPF - Table Type for Table BKPF
Data type: TRTY_BKPFOptional: No
Call by Reference: Yes
ET_BSEG - Table Type for BSEG
Data type: TRTY_BSEGOptional: No
Call by Reference: Yes
ET_VDBEKI - Table Type for Table VDBEKI
Data type: TRTY_VDBEKIOptional: No
Call by Reference: Yes
ET_VDBEPI - Table Type for Table VDBEPI
Data type: TRTY_VDBEPIOptional: No
Call by Reference: Yes
ET_RETURN - Table with BAPI Return Information
Data type: BAPIRETTABOptional: No
Call by Reference: Yes
E_FLG_SUCCESS -
Data type: XFELDOptional: No
Call by Reference: Yes
ET_ERRORS -
Data type: TRTY_TRLOMESGOptional: No
Call by Reference: Yes
CHANGING Parameters details for FVD_OVERPAY_CREATE
C_FLG_ERROR -
Data type:Optional: No
Call by Reference: Yes
EXCEPTIONS details
ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FVD_OVERPAY_CREATE 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_error | TYPE STRING, " | |||
| lv_et_bkpf | TYPE TRTY_BKPF, " | |||
| lv_c_flg_error | TYPE TRTY_BKPF, " | |||
| lv_i_company_code | TYPE VDARL-BUKRS, " | |||
| lv_i_update_run | TYPE TB_UPDATE_RUN, " SPACE | |||
| lv_i_header_text | TYPE BKPF-BKTXT, " | |||
| lv_i_flg_raise_error | TYPE XFELD, " 'X' | |||
| lv_i_flg_commit | TYPE XFELD, " 'X' | |||
| lv_i_log_handle | TYPE BALLOGHNDL, " | |||
| lv_i_offsetting_account | TYPE SKB1-SAKNR, " | |||
| lv_et_bseg | TYPE TRTY_BSEG, " | |||
| lv_i_loan_contract | TYPE VDARL-RANL, " | |||
| lv_et_vdbeki | TYPE TRTY_VDBEKI, " | |||
| lv_i_ft_overpay | TYPE TZB0A-SBEWART, " | |||
| lv_i_amount | TYPE VDBEPP-BBWHR, " | |||
| lv_et_vdbepi | TYPE TRTY_VDBEPI, " | |||
| lv_et_return | TYPE BAPIRETTAB, " | |||
| lv_i_currency | TYPE VDBEPP-SBWHR, " | |||
| lv_i_amount_lc | TYPE VDBEPP-BHWHR, " | |||
| lv_e_flg_success | TYPE XFELD, " | |||
| lv_et_errors | TYPE TRTY_TRLOMESG, " | |||
| lv_i_posting_date | TYPE VDBEKI-DBUDAT, " | |||
| lv_i_value_date | TYPE VDBEPP-DDISPO, " | |||
| lv_i_assignment | TYPE VDBEPP-ZUONR. " |
|   CALL FUNCTION 'FVD_OVERPAY_CREATE' "Create an overpayment |
| EXPORTING | ||
| I_COMPANY_CODE | = lv_i_company_code | |
| I_UPDATE_RUN | = lv_i_update_run | |
| I_HEADER_TEXT | = lv_i_header_text | |
| I_FLG_RAISE_ERROR | = lv_i_flg_raise_error | |
| I_FLG_COMMIT | = lv_i_flg_commit | |
| I_LOG_HANDLE | = lv_i_log_handle | |
| I_OFFSETTING_ACCOUNT | = lv_i_offsetting_account | |
| I_LOAN_CONTRACT | = lv_i_loan_contract | |
| I_FT_OVERPAY | = lv_i_ft_overpay | |
| I_AMOUNT | = lv_i_amount | |
| I_CURRENCY | = lv_i_currency | |
| I_AMOUNT_LC | = lv_i_amount_lc | |
| I_POSTING_DATE | = lv_i_posting_date | |
| I_VALUE_DATE | = lv_i_value_date | |
| I_ASSIGNMENT | = lv_i_assignment | |
| IMPORTING | ||
| ET_BKPF | = lv_et_bkpf | |
| ET_BSEG | = lv_et_bseg | |
| ET_VDBEKI | = lv_et_vdbeki | |
| ET_VDBEPI | = lv_et_vdbepi | |
| ET_RETURN | = lv_et_return | |
| E_FLG_SUCCESS | = lv_e_flg_success | |
| ET_ERRORS | = lv_et_errors | |
| CHANGING | ||
| C_FLG_ERROR | = lv_c_flg_error | |
| EXCEPTIONS | ||
| ERROR = 1 | ||
| . " FVD_OVERPAY_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM FVD_OVERPAY_CREATE
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 BUKRS FROM VDARL INTO @DATA(ld_i_company_code). | ||||
| DATA(ld_i_update_run) | = ' '. | |||
| "SELECT single BKTXT FROM BKPF INTO @DATA(ld_i_header_text). | ||||
| DATA(ld_i_flg_raise_error) | = 'X'. | |||
| DATA(ld_i_flg_commit) | = 'X'. | |||
| "SELECT single SAKNR FROM SKB1 INTO @DATA(ld_i_offsetting_account). | ||||
| "SELECT single RANL FROM VDARL INTO @DATA(ld_i_loan_contract). | ||||
| "SELECT single SBEWART FROM TZB0A INTO @DATA(ld_i_ft_overpay). | ||||
| "SELECT single BBWHR FROM VDBEPP INTO @DATA(ld_i_amount). | ||||
| "SELECT single SBWHR FROM VDBEPP INTO @DATA(ld_i_currency). | ||||
| "SELECT single BHWHR FROM VDBEPP INTO @DATA(ld_i_amount_lc). | ||||
| "SELECT single DBUDAT FROM VDBEKI INTO @DATA(ld_i_posting_date). | ||||
| "SELECT single DDISPO FROM VDBEPP INTO @DATA(ld_i_value_date). | ||||
| "SELECT single ZUONR FROM VDBEPP INTO @DATA(ld_i_assignment). | ||||
Search for further information about these or an SAP related objects