ABAP Function Module rv_invoice_document_read to Read SAP Invoice Data Details
SAP applicatione developers or ABAP developers use rv_invoice_document_read to read SAP invoice details including billing header data, billing item data, partner data and price conditions data.
Generally rv_invoice_document_read can be used for printing SAP invoice data since this ABAP function module brings all required data for printing a specific invoice.
In order to read SAP billing document, first we need the billing document number:
lv_vbrk-vbeln is the document number.
We pass the target document number to the RV_INVOICE_DOCUMENT_READ ABAP function module using import parameter vbrk_i.
KOMV table is Pricing Communications-Condition Record table.
VBPAVB is reference structure for XVBPA/YVBPA. Includes sales document partner and sales document partner dynamic part.
VBRKVB is reference structure for XVBRK/YVBRP. Includes billing document header data and billing header dynamic part.
VBRPVB is reference structure for XVBRP/YVBRP. Includes billing document item data and billing item dynamic part.
Here is a sample ABAP program which can be used for selecting invoice data from SAP tables using ABAP function module rv_invoice_document_read.
ABAP developers can loop in return tables and create a SAPScript or SAP Smartforms application or a list page to display SAP invoice data or SAP billing document data that is read using rv_invoice_document_read.