SAP RV_INVOICE_CREATE Function Module for NOTRANSL: Fakturen erzeugen
RV_INVOICE_CREATE is a standard rv invoice 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 NOTRANSL: Fakturen erzeugen 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 rv invoice create FM, simply by entering the name RV_INVOICE_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: V60A
Program Name: SAPLV60A
Main Program: SAPLV60A
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RV_INVOICE_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 'RV_INVOICE_CREATE'"NOTRANSL: Fakturen erzeugen.
EXPORTING
* DELIVERY_DATE = 0 "Delivery date number
* ID_UTASY = ' ' "
* ID_UTSWL = ' ' "
* ID_UTSNL = ' ' "
* ID_NO_ENQUEUE = ' ' "
* ID_NEW_CANCELLATION = ' ' "
* I_BLART = ' ' "Document Type for Automatic Payment
* ID_EXT_CANCELLATION = ' ' "
* I_STGRD = "Reason for Reversal
* INVOICE_DATE = 0 "Billing document date number
* INVOICE_TYPE = ' ' "Billing document type number
* PRICING_DATE = 0 "Price date number
VBSK_I = "SD collective processing header import
* WITH_POSTING = ' ' "Create billing document immediately
* SELECT_DATE = 0 "
* I_NO_VBLOG = ' ' "
* I_ANALYZE_MODE = ' ' "
IMPORTING
VBSK_E = "SD collective processing header export
OD_BAD_DATA = "
DET_REBATE = "
TABLES
XKOMFK = "Billing Communications Table
* XKOMFKKO = "
XKOMV = "Pricing: Communications Condition Record
XTHEAD = "SAPscript: text header
XVBFS = "Error Log for Collective Processing
XVBPA = "Sales Document: Partner
XVBRK = "Billing: Header Data
XVBRP = "Billing: Item Data
XVBSS = "Collective Processing: Sales Documents
* XKOMFKGN = "
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLV60A_001 Billing User Exit. Processing KIDNO (Payment Reference Number)
EXIT_SAPLV60A_002 Customer Function: Process Communication Table for the Bill. Document
IMPORTING Parameters details for RV_INVOICE_CREATE
DELIVERY_DATE - Delivery date number
Data type: VBRP-FBUDAOptional: Yes
Call by Reference: No ( called with pass by value option)
ID_UTASY -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
ID_UTSWL -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
ID_UTSNL -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
ID_NO_ENQUEUE -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
ID_NEW_CANCELLATION -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_BLART - Document Type for Automatic Payment
Data type: TVFK-BLARTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ID_EXT_CANCELLATION -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_STGRD - Reason for Reversal
Data type: STGRDOptional: Yes
Call by Reference: No ( called with pass by value option)
INVOICE_DATE - Billing document date number
Data type: VBRK-FKDATOptional: Yes
Call by Reference: No ( called with pass by value option)
INVOICE_TYPE - Billing document type number
Data type: VBRK-FKARTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
PRICING_DATE - Price date number
Data type: VBRP-PRSDTOptional: Yes
Call by Reference: No ( called with pass by value option)
VBSK_I - SD collective processing header import
Data type: VBSKOptional: No
Call by Reference: No ( called with pass by value option)
WITH_POSTING - Create billing document immediately
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SELECT_DATE -
Data type: VBRK-FKDATOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NO_VBLOG -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ANALYZE_MODE -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RV_INVOICE_CREATE
VBSK_E - SD collective processing header export
Data type: VBSKOptional: No
Call by Reference: No ( called with pass by value option)
OD_BAD_DATA -
Data type: RVSEL-XFELDOptional: No
Call by Reference: No ( called with pass by value option)
DET_REBATE -
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RV_INVOICE_CREATE
XKOMFK - Billing Communications Table
Data type: KOMFKOptional: No
Call by Reference: No ( called with pass by value option)
XKOMFKKO -
Data type: KOMVOptional: Yes
Call by Reference: No ( called with pass by value option)
XKOMV - Pricing: Communications Condition Record
Data type: KOMVOptional: No
Call by Reference: No ( called with pass by value option)
XTHEAD - SAPscript: text header
Data type: THEADVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBFS - Error Log for Collective Processing
Data type: VBFSOptional: No
Call by Reference: No ( called with pass by value option)
XVBPA - Sales Document: Partner
Data type: VBPAVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBRK - Billing: Header Data
Data type: VBRKVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBRP - Billing: Item Data
Data type: VBRPVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBSS - Collective Processing: Sales Documents
Data type: VBSSOptional: No
Call by Reference: No ( called with pass by value option)
XKOMFKGN -
Data type: KOMFKGNOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RV_INVOICE_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_vbsk_e | TYPE VBSK, " | |||
| lt_xkomfk | TYPE STANDARD TABLE OF KOMFK, " | |||
| lv_delivery_date | TYPE VBRP-FBUDA, " 0 | |||
| lv_id_utasy | TYPE VBRP, " ' ' | |||
| lt_xkomfkko | TYPE STANDARD TABLE OF KOMV, " | |||
| lv_id_utswl | TYPE KOMV, " ' ' | |||
| lv_id_utsnl | TYPE KOMV, " ' ' | |||
| lv_id_no_enqueue | TYPE KOMV, " ' ' | |||
| lv_id_new_cancellation | TYPE KOMV, " SPACE | |||
| lv_i_blart | TYPE TVFK-BLART, " SPACE | |||
| lv_id_ext_cancellation | TYPE TVFK, " SPACE | |||
| lv_i_stgrd | TYPE STGRD, " | |||
| lt_xkomv | TYPE STANDARD TABLE OF KOMV, " | |||
| lv_od_bad_data | TYPE RVSEL-XFELD, " | |||
| lv_invoice_date | TYPE VBRK-FKDAT, " 0 | |||
| lt_xthead | TYPE STANDARD TABLE OF THEADVB, " | |||
| lv_det_rebate | TYPE C, " | |||
| lv_invoice_type | TYPE VBRK-FKART, " ' ' | |||
| lt_xvbfs | TYPE STANDARD TABLE OF VBFS, " | |||
| lv_pricing_date | TYPE VBRP-PRSDT, " 0 | |||
| lt_xvbpa | TYPE STANDARD TABLE OF VBPAVB, " | |||
| lv_vbsk_i | TYPE VBSK, " | |||
| lt_xvbrk | TYPE STANDARD TABLE OF VBRKVB, " | |||
| lv_with_posting | TYPE VBRKVB, " ' ' | |||
| lt_xvbrp | TYPE STANDARD TABLE OF VBRPVB, " | |||
| lv_select_date | TYPE VBRK-FKDAT, " 0 | |||
| lt_xvbss | TYPE STANDARD TABLE OF VBSS, " | |||
| lv_i_no_vblog | TYPE VBSS, " ' ' | |||
| lt_xkomfkgn | TYPE STANDARD TABLE OF KOMFKGN, " | |||
| lv_i_analyze_mode | TYPE KOMFKGN. " ' ' |
|   CALL FUNCTION 'RV_INVOICE_CREATE' "NOTRANSL: Fakturen erzeugen |
| EXPORTING | ||
| DELIVERY_DATE | = lv_delivery_date | |
| ID_UTASY | = lv_id_utasy | |
| ID_UTSWL | = lv_id_utswl | |
| ID_UTSNL | = lv_id_utsnl | |
| ID_NO_ENQUEUE | = lv_id_no_enqueue | |
| ID_NEW_CANCELLATION | = lv_id_new_cancellation | |
| I_BLART | = lv_i_blart | |
| ID_EXT_CANCELLATION | = lv_id_ext_cancellation | |
| I_STGRD | = lv_i_stgrd | |
| INVOICE_DATE | = lv_invoice_date | |
| INVOICE_TYPE | = lv_invoice_type | |
| PRICING_DATE | = lv_pricing_date | |
| VBSK_I | = lv_vbsk_i | |
| WITH_POSTING | = lv_with_posting | |
| SELECT_DATE | = lv_select_date | |
| I_NO_VBLOG | = lv_i_no_vblog | |
| I_ANALYZE_MODE | = lv_i_analyze_mode | |
| IMPORTING | ||
| VBSK_E | = lv_vbsk_e | |
| OD_BAD_DATA | = lv_od_bad_data | |
| DET_REBATE | = lv_det_rebate | |
| TABLES | ||
| XKOMFK | = lt_xkomfk | |
| XKOMFKKO | = lt_xkomfkko | |
| XKOMV | = lt_xkomv | |
| XTHEAD | = lt_xthead | |
| XVBFS | = lt_xvbfs | |
| XVBPA | = lt_xvbpa | |
| XVBRK | = lt_xvbrk | |
| XVBRP | = lt_xvbrp | |
| XVBSS | = lt_xvbss | |
| XKOMFKGN | = lt_xkomfkgn | |
| . " RV_INVOICE_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM RV_INVOICE_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 FBUDA FROM VBRP INTO @DATA(ld_delivery_date). | ||||
| DATA(ld_id_utasy) | = ' '. | |||
| DATA(ld_id_utswl) | = ' '. | |||
| DATA(ld_id_utsnl) | = ' '. | |||
| DATA(ld_id_no_enqueue) | = ' '. | |||
| DATA(ld_id_new_cancellation) | = ' '. | |||
| "SELECT single BLART FROM TVFK INTO @DATA(ld_i_blart). | ||||
| DATA(ld_i_blart) | = ' '. | |||
| DATA(ld_id_ext_cancellation) | = ' '. | |||
| "SELECT single XFELD FROM RVSEL INTO @DATA(ld_od_bad_data). | ||||
| "SELECT single FKDAT FROM VBRK INTO @DATA(ld_invoice_date). | ||||
| "SELECT single FKART FROM VBRK INTO @DATA(ld_invoice_type). | ||||
| DATA(ld_invoice_type) | = ' '. | |||
| "SELECT single PRSDT FROM VBRP INTO @DATA(ld_pricing_date). | ||||
| DATA(ld_with_posting) | = ' '. | |||
| "SELECT single FKDAT FROM VBRK INTO @DATA(ld_select_date). | ||||
| DATA(ld_i_no_vblog) | = ' '. | |||
| DATA(ld_i_analyze_mode) | = ' '. | |||
Search for further information about these or an SAP related objects