CreateFromData
You can use this method to create and post invoices. When passing on the header data, you use the field INVOIC_IND todetermine whether the system posts a credit memo or an invoice. If the field is blank, the system posts a credit memo. If you enter an X, the system posts an invoice.
If you want to enter an incoming invoice for a returns order, you should leave the INVOICE_IND field blank. As in the online transaction, the system updates the purchase orderhistory and stock valuation data in Materials Management. The system creates accounting documents in Accounting.
Using this method, you can: Enter and post invoices with multiple account assignmentChange the account assignment of invoices, add account assignments, and post the invoicesEnter invoices for blanket purchase ordersEnter and post invoices for purchase orders containing planned delivery costs
Enter and post invoices containing unplanned delivery costsEnter and post subsequent debits/creditsUse document types with external number assignmentEnter and post invoices with withholding taxEnter and post invoice with more than one vendor line and different payment methods and terms of payment
Enter and post invoices for returns ordersEnter and post invoices for transportation service providersEnter and post invoices for external service purchase ordersPost to G/L accountsPost to material accountsRestrictions
You cannot: Post one-time vendor dataThe following fields in Financial Accounting are not passed on: POR subscriber numberBank detailsPayment referenceHouse bank IDNota FiscalNotesThe following authorization object is checked using activity 01:
M_RECH_WRK Authorization to create invoices in certain plantsTransfer You use the structure HeaderData to transfer the invoice header data. Tables ItemData and AccountingData contain the invoice item data. The table TaxData
contains the tax information for the invoice. Tables ItemData and AccountingData contain the item data and the incoming invoice. The table TaxData contains the tax information on the incoming invoice.
The table GlAccountData contains data on posting to a G/L account and the table MaterialData contains data on posting to a material account. Using table WithTaxData you can transfer withholding tax information.
Using table VendorItemSplitData you can distribute the grossamount to several vendor line items with different methods of payment and terms of payment. Return The invoice document number and the fiscal year are returned as key fields for the invoice.
Return messages Messages are returned in the parameter return. The parameterdocumentation shows the return codes and their meanings. Further InformationThe method can only carry out your function if no error messages were
generated in the "Return" table. This is the case if the header data and all the items were processed successfully. Transaction control is not implemented. The calling program thereforehas to execute the 'Commit Work' itself after this method has been
successfully invoked (i.e. if no errors were reported in the Return parameter). Example: Incoming InvoiceThis example shows the header data that you need to enter in table Headerdata and the item data that you need to enter in table Itemdata to post an invoice.
Purchase order: 10 pieces of material A at 10 USD/piece Goods receipt: 10 pieces of material A You receive an invoice against this purchase order, with reference topurchase order number 4500007491, order item 10, for a quantity of 10pieces of material A and an amount of 116 USD including 16% sales tax. Enter the following data:
Table HeaderData INVOICE_IND (Post invoice/credit memo): XDOC_DATE (Document date): 05.20.2000PSTNG_DATE (Posting date): 05.23.2000COMP_CODE (Company code): 1000GROSS_AMOUNT (Gross amount): 116.00
CURRENCY (Currency key): USDCALC_TAX_IND (Calculate tax): XTable ItemData INVOICE_DOC_ITEM (Invoice document item): 00001PO_NUMBER (Purchase order number): 4500007491PO_ITEM (Purchase order item): 00010
TAX_CODE (Tax code): VNITEM_AMOUNT (Item amount): 100QUANTITY (Quantity): 10PO_UNIT (Unit of measure): PCFor more information, see the parameter documentation for tables HeaderData and Itemdata. Example: Incoming Invoice in Foreign Currency, Goods-Receipt-Based
Invoice Verification and Tax InformationThis example specifies the header data that you need to enter in table Headerdata, the item data that you need to enter in table Itemdata and the tax information that you need to enter in table
TaxData to post an invoice in a foreign currency. Purchase order: 10 pieces of material A at 10 USD/piece First goods receipt: 4 pieces of material A Second goods receipt: 6 pieces of material A You receive an invoice against this purchase order, with reference to
purchase order number 4500007505, order item 10, goods receipt document50010095, 2000, item 1. The invoice is for a quantity of 4 pieces ofmaterial A, a gross amount of 46.60 USD and 16% sales tax (6.60 USD). Enter the following data: Table HeaderData
INVOICE_IND (Post invoice/credit memo): XDOC_DATE (Document date): 05.20.2000PSTNG_DATE (Posting date): 05.23.2000COMP_CODE (Company code): 1000CURRENCY (Currency key): USDGROSS_AMOUNT (Gross amount): 46.60
Table ItemData INVOICE_DOC_ITEM (Invoice document item): 00001PO_NUMBER (Purchase order number): 4500007505PO_ITEM (Purchase order item): 00010REF_DOC (Goods receipt document): 50010095REF_DOC_YEAR (Fiscal year of current period): 2000
REF_DOC_ITEM (Goods receipt document item): 1TAX_CODE (Tax code): VNITEM_AMOUNT (Item amount): 40.00QUANTITY (Quantity): 4PO_UNIT (Unit of measure): PCTable TaxData TAX_CODE (Sales tax code): VN
TAX_AMOUNT (Tax amount in document currency): USD 6.60For more information, see the parameter documentation for tables HeaderData, ItemData, and TaxData. Example: Incoming invoice for blanket purchase order
This invoice shows which header data you need to enter in table HeaderData, which item data you need to enter in table ItemData, and which account assignment data you need to enter in tableAccountingData in order to post an incoming invoice for a blanket purchase order.
You receive an invoice for the blanket PO 4500015172, PO item 10 for anamount 110 USD incl. sales tax at 10%. You want to distribute theinvoice amount to the cost centers 1200 and 1500. Enter, for example, the following data: Table HeaderData
INVOICE_IND (Post invoice/credit memo): XDOC_DATE (Document date): 02.19.2001PSTING_DATE (Posting date): 02.21.2001COMP_CODE (Company code): 1000GROSS_AMOUNT (Gross amount): 110CURRENCY (Currency): USDCALC_TAX_IND (Calculate tax): X
Table ItemData INVOICE_DOC_ITEM (Item in the invoice document): 00001PO_NUMBER (PO number): 4500015172PO_ITEM (PO item): 00010TAX_CODE (Tax code): V1ITEM_AMOUNT (Item amount): 100Table AccountingData
1st line: Change account assignment data INVOICE_DOC_ITEM (Document item in invoice document): 0001SERIAL_NO (Serial number for the acc. assignment): 01TAX_CODE (Tax code): V1ITEM_AMOUNT (Amount in document currency): 30
GL_ACCOUNT (G/L account number): 890000COSTCENTER (Cost center): 12002nd line: Add unplanned account assignment INVOICE_DOC_ITEM (Document item in invoice document): 0001XUNPL (Unplanned acct. assignment from IV): X
TAX_CODE (Tax code): V1ITEM_AMOUNT (Amount in document currency): 70GL_ACCOUNT (G/L account number): 890000COSTCENTER (Cost center): 1500In the case of a blanket purchase order, the following fields forquantities and units of measurement must not be filled in the tables ItemData and AccountingData:
Quantity (QUANTITY)PO_UNIT (PO unit of measure)PO_UNIT_ISO (PO unit of measure in ISO code)PO_PR_QNT (Quantity in PO price unit of measure)PO_PR_UOM (PO price unit of measure)PO_PR_UOM_ISO (PO price unit of measure in ISO code)
For more information, see the parameter documentation for tables HeaderData, ItemData, and AccountingData,or in the SAP Library under Logistics Invoice Verification. Example: Change account assignments and add unplanned assignments
This example shows the header data that you need to enter in table Headerdata, the item data that you need to enter in table Itemdata, and the account assignment information that you needto enter in table AccountingData to change, add, and post
account assignments for an invoice. If you want to change or addaccount assignments, there must be a non-valuated goods receipt or nogoods receipt in the system. Goods-receipt-based invoice verification is specified. Purchase order: 300 pieces of material A at 1 USD/piece Goods receipt: 300 pieces of material A
This purchase order is subject to account assignment. You receive aninvoice for it, refering to purchase order number 4500006846, orderitem 10, goods receipt document 50008849, 2000, item 1. The invoice isfor a quantity of 100 pieces of material A, with a gross invoice amount
of USD 116.00, including 16% sales tax. You want to change the plannedaccount assignment for the second account assignment item and add an unplanned account assignment. Enter the following data: Table HeaderData INVOICE_IND (Post invoice/credit memo): X
DOC_DATE (Document date): 08.05.2000PSTNG_DATE (Posting date): 08.08.2000COMP_CODE (Company code): 1000CURRENCY (Currency key): USDGROSS_AMOUNT (Gross amount): 17.40CALC_TAX_IND (Calculate tax automatically): X
PMNTTRMS (Terms of payment key): 0001Table ItemData INVOICE_DOC_ITEM (Invoice document item): 00001PO_NUMBER (Purchase order number): 4500006846PO_ITEM (Purchase order item): 00010REF_DOC (Goods receipt document): 500008849
REF_DOC_YEAR (Fiscal year of current period): 2000REF_DOC_ITEM (Goods receipt document item): 1TAX_CODE (Tax code): VNITEM_AMOUNT (Item amount): 100QUANTITY (Quantity): 100PO_UNIT (Unit of measure): PCTable AccountingData
Row 1: Change second account assignment item INVOICE_DOC_ITEM (Invoice document item): 0001SERIAL_NO (Account assignment serial number): 02TAX_CODE (Tax code): VNITEM_AMOUNT (Amount in document currency): 10.00
QUANTITY (Quantity): 10PO_UNIT (Order unit): PCGL_ACCOUNT (G/L account number): 890000COSTCENTER (Cost center): 1200Row 2: Add unplanned account assignment INVOICE_DOC_ITEM (Invoice document item): 0001
XUNPL (Unplanned account assignment in Invoice Verification): XTAX_CODE (Tax code): VNITEM_AMOUNT (Amount in document currency): 5.00QUANTITY (Quantity): 5PO_UNIT (Order unit): PCGL_ACCOUNT (G/L account number): 890000
COSTCENTER (Cost center): 1200For more information, see the parameter documentation for tables HeaderData, ItemData, and TaxData, or Logistics Invoice Verification in the SAP Library. Example: Invoice with Planned Delivery Costs
This examples shows the header data that you need to enter in table HeaderData, the item data that you need to enter in table ItemData, and the tax information that you need to enter in tableTaxData to post an invoice containing planned delivery costs.
Purchase order: 100 pieces of material A at 1 USD/piece Goods receipt: 100 pieces of material A You receive an invoice for this purchase order refering to purchaseorder number 4500006986, order item 10, for a quantity of 100 pieces ofmaterial A and 136 USD, including 16% sales tax and 20 USD planned delivery costs. Enter the following data:
Table HeaderData INVOICE_IND (Post invoice/credit memo): XDOC_DATE (Document date): 08.10.2000PSTNG_DATE (Posting date): 08.12.2000COMP_CODE (Company code): 1000CURRENCY (Currency key): USD
GROSS_AMOUNT (Gross amount): 136,00Table ItemData Row 1: Posting the purchase order item INVOICE_DOC_ITEM (Invoice document item): 00001PO_NUMBER (Purchase order number): 4500006986PO_ITEM (Order item): 00010
TAX_CODE (Sales tax code): VNITEM_AMOUNT (Item amount): 100.00QUANTITY (Quantity): 100PO_UNIT (Unit of measure): PCRow 2: Posting the planned delivery costs INVOICE_DOC_ITEM (Invoice document item): 00002PO_NUMBER (Order number): 4500006986
PO_ITEM (Order item): 00010ITEM_AMOUNT (Item amount): 20.00QUANTITY (Quantity): 100PO_UNIT (Unit of measure): PCCOND_TYPE (Condition type): FRB1Table TaxData TAX_CODE (Sales tax code): VN
TAX_AMOUNT (Tax amount in document currency): 16.00For more information, see the parameter documentation for tables HeaderData, ItemData, and TaxData. Example: Incoming invoice with withholding tax.This example shows you what header data you can enter in table
HeaderData, and what item data and withholding tax information you canenter in table TaxData in order to park an incoming invoice with withholding tax. Purchase order: 10 pieces of material A at $10 Goods receipt: 10 pieces of material A You receive an invoice for this delivery with reference to purchase
order number 4500007505, PO item 10, GR document 50010095 2000, Item 1.The invoice is for a quantity of 10 pieces and a gross amount of 100USD. You have to pay 10% withholding tax for the gross amount. Enter the following data: Table HeaderData
INVOICE_IND (Invoice/Credit memo): XDOC_DATE (Document date): 05.20.2000PSTNG_DATE (Posting date): 05.23.2000COMP_CODE (Company code): WT01CURRENCY (Currency key): USDGROSS_AMOUNT (Gross amount): 100 USD
Table ItemData INVOICE_DOC_ITEM (Item from invoice document): 00001PO_NUMBER (PO number): 4500007505PO_ITEM (PO item): 00010REF_DOC (GR document): 50010095REF_DOC_YEAR (Fiscal year of the current period): 2000
REF_DOC_ITEM (Item in a GR document): 1TAX_CODE (Tax code): V0ITEM_AMOUNT (Item amount): $100QUANTITY (Quantity): 10PO_UNIT (Unit of measure): PCTable WithTaxData SPLIT_KEY (Grouping key for withholding tax split): 0001
WI_TAX_TYPE (Code for withholding tax type): R1WI_TAX_CODE (Withholding tax code): 01WI_TAX_BASE (Withholding tax base amount): 100WI_TAX_AMT (Withholding tax amount in doc. currency): 10.00For more information, see the parameter documentation for tables HeaderData, ItemData, and WithTaxData.
Example: Incoming invoice with amount split.This example shows you what header data you need to enter in tableHeaderData, what item data you enter in table ItemData, and whatinformation you can enter in table VendorSplitData in order to create an invoice with an amount split.
Purchase order: 10 pieces of material A at 10 USD Goods receipt: 10 pieces of material A You receive an invoice for this purchase order with reference to POnumber 4500007505, PO item 10, GR document 50010095, item 1. Theinvoice is for a quantity of 10 pieces and a gross amount of 100 USD.
You want to distribute the gross amount to two vendor lines. 40% of thegross amount should be paid immediately by check, and 60% of the grossamount should be paid within 14 days, taking into account a 3% cash discount. Enter the following data: Table HeaderData
INVOICE_IND (Invoice/Credit memo): XDOC_DATE (Document date): 05.20.2000PSTNG_DATE (Posting date): 05.23.2000COMP_CODE (Company code): 0001CURRENCY (Currency key): USDGROSS_AMOUNT (Gross amount): 100.00
Table ItemData INVOICE_DOC_ITEM (Item from the invoice document): 00001PO_NUMBER (PO number): 4500007505PO_ITEM (PO item): 00010REF_DOC (GR document): 50010095REF_DOC_YEAR (Fiscal year for the current period): 2000
REF_DOC_ITEM (Item from a GR document): 1TAX_CODE (Tax code): V0ITEM_AMOUNT (Item amount): 100QUANTITY (Quantity): 10.00PO_UNIT (Unit of measure): PCTable VendorItemSplitData 1st vendor line
SPLIT_KEY (Grouping key for split in the vendor line): 0001SPLIT_AMOUNT (Gross invoice partial amount in doc. currency): 40.00PYMT_METH (Payment method): STAX_CODE (Tax code): V0PMNTTRMS (Payment terms key): 0001
2nd vendor line SPLIT_KEY (Grouping key for split in the vendor line): 0002SPLIT_AMOUNT (Gross invoice partial amount in doc. currency): 60.00PYMT_METH (Payment method): UTAX_CODE (Tax code): V0PMNTTRMS (Payment terms key): 0003
For more information, see the parameter documentation for tables HeaderData, ItemData, and VendorItemSplitData. You recieve an invoice with reference to the order number 4500006846,order item 10. The invoice is for a 100 pieces of material A, with a
gross amount of 150.80 USD, including 16% value-added tax. The invoiceincludes a G/L account posting of 10 USD to account 400000 in companycode 1 and a material account posting of material MAT01 for 20 USD. Enter the following data: Table HeaderData
INVOICE_IND (post invoice/credit memo): XDOC_DATE (Document date): 05.08.2000PSTNG_DATE (Posting date): 08.08.2000COMP_CODE (Company code): 1000CURRENCY (Currency): USDGROSS_AMOUNT (Gross amount): 150,80
CALC_TAX_IND (Calculate tax): XPMNTTRMS (Terms of payment): 0001Table ItemDataINVOICE_DOC_ITEM (Invoice document item): 00001PO_NUMBER (Purchase order number): 4500006846PO_ITEM (PO item): 00010
TAX_CODE (tax code): VNITEM_AMOUNT (Amount in document currency): 100QUANTITY: 100PO_UNIT (Unit of measure): STTable GlAccountData INVOICE_DOC_ITEM (Document item in invoice document): 00001
GL_ACCOUNT (G/L account): 400000ITEM_AMOUNT (Amount in document currency): 10,00DB_CR_IND (Debit/credit indicator): SCOMP_CODE (Company code): 0001TAX_CODE (Tax code): VNCOSTCENTER (Cost center): 1Table MaterialData
INVOICE_DOC_ITEM (Document item in invoice document): 0001MATERIAL (MATERIAL): MAT01PLANT (Valuation area): 0001DB_CR_INP (Debit/credit indicator): SITEM_AMOUNT (Amount in document currency): 10,00QUANTITY (Quantity): 1
PO_UNIT (PO unit of measure): STYou can find further information in the parameter documentation for tables HeaderData, ItemData, GlAccountData and MaterialData or in the SAP Library under Logistics - Invoice Verification
Example: Invoice for a purchase order for external services and service-based invoice verification.This example shows you which header data to enter in table HeaderData, which item data to enter in table ItemData, and which account assignment data to enter in table AccountingData
in order to enter and post an incoming invoice. You receive an invoice with refeerence to the PO number 4500000191, POitem 10. Two services A and B are invoiced, each with a quantity of aservice unit. Service A has a gross amount of 580 USD incl. 16% tax. Service B has 812 USD incl. 16% tax. Service A has an account
assignment of 50% to both cost centers 1000 and 2000. Service B also has an account assignment to cost centers 1000 and 3000. Enter the following data: Table HeaderData INVOICE_IND (Post invoice/credit memo): X
DOC_TYPE (Document type): REDOC_DATE (Document date): 01.10.2002PSTNG_DATE (Posting date): 01.10.2002COMP_CODE (Company code): 0001CURRENCY (Currency key): USDGROSS_AMOUNT (Gross amount): 1392.00CALC_TAX_IND (Calculate tax automatically): X
PMNTTRMS (Payment terms key): 0002Table ItemData Service A: INVOICE_DOC_ITEM (Item in invoice document): 000001PO_NUMBER (PO number): 4500000191PO_ITEM (PO item): 00010TAX_CODE (Tax code): V1
ITEM_AMOUNT (Item amount): 500.00QUANTITY (Quantity): 1PO_UNIT (Unit of measure): LESHEET_NO (Service entry sheet number): 1000000022SHEET_ITEM (Line number) : 10Service B: INVOICE_DOC_ITEM (Item in invoice document): 000002
PO_NUMBER (PO number): 4500000191PO_ITEM (PO item): 00010TAX_CODE (Tax code): V1ITEM_AMOUNT (Item amount): 700.00QUANTITY (Quantity): 1PO_UNIT (Unit of measure): LESHEET_NO (Service entry sheet number): 1000000022
SHEET_ITEM (Line number) : 20Table AccountingData First account assignment for service A: INVOICE_DOC_ITEM (Document item in invoice document): 000001SERIAL_NO (Sequential number of the account assignment): 01
TAX_CODE (Tax code): V1ITEM_AMOUNT (Amount in document currency): 250.00QUANTITY (Quantity): 0.5PO_UNIT (PO unit of measure): LEGL_ACCOUNT (G/L account number): 400000COSTCENTER (Cost center): 1000
Second account assignment for service A: INVOICE_DOC_ITEM (Document item in invoice document): 000001SERIAL_NO (Sequential number of the account assignment): 02TAX_CODE (Tax code): V1ITEM_AMOUNT (Amount in document currency): 250.00
QUANTITY (Quantity): 0.5PO_UNIT (PO unit of measure): LEGL_ACCOUNT (G/L account number): 400000COSTCENTER (Cost center): 2000First account assignment for service B: INVOICE_DOC_ITEM (Document item in invoice document): 000002
SERIAL_NO (Sequential number of the account assignment): 01TAX_CODE (Tax code): V1ITEM_AMOUNT (Amount in document currency): 350.00QUANTITY (Quantity): 0.5PO_UNIT (PO unit of measure): LEGL_ACCOUNT (G/L account number): 400000
COSTCENTER (Cost center): 1000Second account assignment for service B: INVOICE_DOC_ITEM (Document item in invoice document): 000002SERIAL_NO (Sequential number of the account assignment): 03TAX_CODE (Tax code): V1
ITEM_AMOUNT (Amount in document currency): 350.00QUANTITY (Quantity): 0.5PO_UNIT (PO unit of measure): LEGL_ACCOUNT (G/L account number): 400000COSTCENTER (Cost center): 3000For more information, see the parameter documentation for the tables HeaderData, ItemData, and AccountingData
, or see the SAP Library under Logistics Invoice Verification.
|