Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

MIRO - BAPI_INCOMINGINVOICE_CREATE

Former Member
0 Likes
9,661

Hi All,

By using this bapi "BAPI_INCOMINGINVOICE_CREATE", how to do automatic account assignments?

Thanks & Regards,

Swarna

3 REPLIES 3
Read only

venkata_ramisetti
Active Contributor
0 Likes
2,551

Hi Swarna,

Check the funcion module documentation for BAPI_INCOMINGINVOICE_CREATE in SE37.

It contains some example code also.

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 need to enter in table AccountingData to change, add, and post account assignments for an invoice. If you want to change or add account assignments, there must be a non-valuated goods receipt or no goods receipt in the system. Goods-receipt-based invoice verification is specified.

Purchase order: 300 pc of material A @ $1.00/pc

Goods receipt: 300 pc of material A

This purchase order is subject to account assignment. You receive an invoice for it, referencing the PO number 4500006846, PO item 10, goods receipt document 50008849, 2000, item 1. The invoice is for a quantity of 100 pieces of material A, with a gross invoice amount of USD 116.00, including 16% VAT. You want to change the planned account assignment for the second account assignment item and add an unplanned account assignment. Enter the following data:

HeaderData table

INVOICE_IND (Post invoice/credit memo): X

DOC_DATE (Document date): 08.05.2000

PSTNG_DATE (Posting date): 08.08.2000

COMP_CODE (Company code): 1000

CURRENCY (Currency key): USD

GROSS_AMOUNT (Gross amount): 17.40

CALC_TAX_IND (Calculate tax automatically): X

PMNTTRMS (Terms of payment key): 0001

ItemData table

INVOICE_DOC_ITEM (Invoice document item): 00001

PO_NUMBER (Purchase order number): 4500006846

PO_ITEM (Purchase order item): 00010

REF_DOC (Goods receipt document): 500008849

REF_DOC_YEAR (Fiscal year of current period): 2000

REF_DOC_ITEM (Goods receipt document item): 1

TAX_CODE (Tax code): VN

ITEM_AMOUNT (Item amount): 100

QUANTITY (Quantity): 100

PO_UNIT (Unit of measure): PC

AccountingData table

Line 1: Change second account assignment item

INVOICE_DOC_ITEM (Invoice document item): 0001

SERIAL_NO (Account assignment serial number): 02

TAX_CODE (Tax code): VN

ITEM_AMOUNT (Amount in document currency): 10.00

QUANTITY (Quantity): 10

PO_UNIT (Order unit): PC

GL_ACCOUNT (G/L account number): 890000

COSTCENTER (Cost center): 1200

Line 2: Add unplanned account assignment

INVOICE_DOC_ITEM (Invoice document item): 0001

XUNPL (Unplanned account assignment in Invoice Verification): X

TAX_CODE (Tax code): VN

ITEM_AMOUNT (Amount in document currency): 5.00

QUANTITY (Quantity): 5

PO_UNIT (Order unit): PC

GL_ACCOUNT (G/L account number): 890000

COSTCENTER (Cost center): 1200

More information is available in the parameter documentation for the tables HeaderData, ItemData, and AccountingData and in the SAP Library under Logistics Invoice Verification.

Thanks

Ramakrishna

Read only

0 Likes
2,551

Hi Ramakrishna ,

Is there any way where we can getthe GL account numebr automatically.

Here goes my example.

I have a PO where 1st line item Po qty is 1000. In which 200 is assigned to an account and 300 is assigned to another account and 500 is assigned to another account. Qty allready delivered is 350. Now my GR is 550. I would like to an Invoice using the bapi.

Is there any way that account assigments happen automaticall.

Regards,

Swarna

Read only

Former Member