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

Function FVD_REV_BEFORE_POST 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_REV_BEFORE_POST'"Posting Preparations for Reversal.
EXPORTING
X_VDBEKI_REV = "Table Type for Table VDBEKI
I_VDBEKI = "Table Type for Table VDBEKI
I_VDBEPI = "Table Type for Table VDBEPI
I_VDARL = "Table Type for Table VDARL
IMPORTING
E_BKTXT = "Document Header Text
E_PRIMANOTA = "Source Document
E_SUPERPRIMANOTA = "Super prima nota for grouping in autom.deb.pos.
X_SIMULATION = "
E_PROTOCOL = "
IMPORTING Parameters details for FVD_REV_BEFORE_POST
X_VDBEKI_REV - Table Type for Table VDBEKI
Data type: TRTY_VDBEKIOptional: No
Call by Reference: Yes
I_VDBEKI - Table Type for Table VDBEKI
Data type: TRTY_VDBEKIOptional: No
Call by Reference: Yes
I_VDBEPI - Table Type for Table VDBEPI
Data type: TRTY_VDBEPIOptional: No
Call by Reference: Yes
I_VDARL - Table Type for Table VDARL
Data type: TRTY_VDARLOptional: No
Call by Reference: Yes
EXPORTING Parameters details for FVD_REV_BEFORE_POST
E_BKTXT - Document Header Text
Data type: BKPF-BKTXTOptional: No
Call by Reference: Yes
E_PRIMANOTA - Source Document
Data type: VDBEKI-RPNNROptional: No
Call by Reference: Yes
E_SUPERPRIMANOTA - Super prima nota for grouping in autom.deb.pos.
Data type: VDBEKI-RPNSUPOptional: No
Call by Reference: Yes
X_SIMULATION -
Data type: BSSPARA-SIMKZOptional: No
Call by Reference: Yes
E_PROTOCOL -
Data type: COptional: No
Call by Reference: Yes
Copy and paste ABAP code example for FVD_REV_BEFORE_POST 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_e_bktxt | TYPE BKPF-BKTXT, " | |||
| lv_x_vdbeki_rev | TYPE TRTY_VDBEKI, " | |||
| lv_i_vdbeki | TYPE TRTY_VDBEKI, " | |||
| lv_e_primanota | TYPE VDBEKI-RPNNR, " | |||
| lv_i_vdbepi | TYPE TRTY_VDBEPI, " | |||
| lv_e_superprimanota | TYPE VDBEKI-RPNSUP, " | |||
| lv_i_vdarl | TYPE TRTY_VDARL, " | |||
| lv_x_simulation | TYPE BSSPARA-SIMKZ, " | |||
| lv_e_protocol | TYPE C. " |
|   CALL FUNCTION 'FVD_REV_BEFORE_POST' "Posting Preparations for Reversal |
| EXPORTING | ||
| X_VDBEKI_REV | = lv_x_vdbeki_rev | |
| I_VDBEKI | = lv_i_vdbeki | |
| I_VDBEPI | = lv_i_vdbepi | |
| I_VDARL | = lv_i_vdarl | |
| IMPORTING | ||
| E_BKTXT | = lv_e_bktxt | |
| E_PRIMANOTA | = lv_e_primanota | |
| E_SUPERPRIMANOTA | = lv_e_superprimanota | |
| X_SIMULATION | = lv_x_simulation | |
| E_PROTOCOL | = lv_e_protocol | |
| . " FVD_REV_BEFORE_POST | ||
ABAP code using 7.40 inline data declarations to call FM FVD_REV_BEFORE_POST
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 BKTXT FROM BKPF INTO @DATA(ld_e_bktxt). | ||||
| "SELECT single RPNNR FROM VDBEKI INTO @DATA(ld_e_primanota). | ||||
| "SELECT single RPNSUP FROM VDBEKI INTO @DATA(ld_e_superprimanota). | ||||
| "SELECT single SIMKZ FROM BSSPARA INTO @DATA(ld_x_simulation). | ||||
Search for further information about these or an SAP related objects