rv_invoice_document_read demo
时间: 2023-11-19 21:04:34 浏览: 103
rv_invoice_document_read is a function module used in SAP to read invoice documents. It takes input parameters such as invoice document number and company code and returns a set of output parameters such as invoice header data, item data, tax data, and payment data.
Here is a sample code demonstrating the use of rv_invoice_document_read function module:
```
DATA: ls_invoice_header TYPE bapi_incinv_create_header,
lt_invoice_items TYPE TABLE OF bapi_incinv_create_item,
lt_invoice_taxes TYPE TABLE OF bapi_incinv_create_tax,
lt_invoice_payments TYPE TABLE OF bapi_incinv_create_payment.
CALL FUNCTION 'RV_INVOICE_DOCUMENT_READ'
EXPORTING
companycode = '1000'
invoiceno = '123456'
IMPORTING
invoiceheader = ls_invoice_header
TABLES
invoiceitem = lt_invoice_items
invoicetax = lt_invoice_taxes
invoicepayment = lt_invoice_payments.
```
In this example, we are reading the invoice document with number '123456' and company code '1000'. The function module retrieves the invoice header data into the structure ls_invoice_header, the item data into the table lt_invoice_items, the tax data into the table lt_invoice_taxes and the payment data into the table lt_invoice_payments. This data can then be further processed as per the requirements of the business scenario.
阅读全文