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

BAPI for Invoice

Former Member
0 Likes
1,046

Hi ,

I want to Execute transaction MIRO for company code and purchase order no and purchase order line item and amount.

Is there any BAPI , which I can use for this purpose.

Be assure for reward.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
880

Use BAPI_INCOMINGINVOICE_CREATE.

For the BAPI below is the structure mapping.

<b>BAPI Structurename Field Value Value Description</b>

<b>Headerdata</b>

DOC_DATE 02/08/2005

INVOICE_IND X Post Invoice

PSTNG_DATE 02/08/2005

COMP_CODE 5010 Hospira Inc.

CURRENCY/ CURRENCY_ISO USD United States Dollar

GROSS_AMOUNT 100.0000

DOC_TYPE RE PO Invoice

REF_DOC_NO 1 Billing document no

EXCH_RATE 1.00000

CALC_TAX_IND X

HEADER_TXT header text

<b>Item Data</b>

INVOICE_DOC_ITEM 000001 Invoice Document no

PO_NUMBER 4500125768 PO No

PO_ITEM 1 PO item no

ITEM_AMOUNT 100.0000

QUANTITY 10.000

PO_UNIT EA Each

REF_DOC 5000000007 Goods Receipt No

REF_DOC_YEAR 2005 GR year

REF_DOC_IT 0001 Goods Receipt item no

TAX_CODE I0 AP, not relevant to tax

ITEM_TEXT Text

6 REPLIES 6
Read only

Former Member
0 Likes
880

Try

BAPI_INCOMINGINVOICE_CREATE

Max

Read only

Former Member
0 Likes
880

BAPI_INCOMINGINVOICE_CREATE

Read only

Former Member
0 Likes
881

Use BAPI_INCOMINGINVOICE_CREATE.

For the BAPI below is the structure mapping.

<b>BAPI Structurename Field Value Value Description</b>

<b>Headerdata</b>

DOC_DATE 02/08/2005

INVOICE_IND X Post Invoice

PSTNG_DATE 02/08/2005

COMP_CODE 5010 Hospira Inc.

CURRENCY/ CURRENCY_ISO USD United States Dollar

GROSS_AMOUNT 100.0000

DOC_TYPE RE PO Invoice

REF_DOC_NO 1 Billing document no

EXCH_RATE 1.00000

CALC_TAX_IND X

HEADER_TXT header text

<b>Item Data</b>

INVOICE_DOC_ITEM 000001 Invoice Document no

PO_NUMBER 4500125768 PO No

PO_ITEM 1 PO item no

ITEM_AMOUNT 100.0000

QUANTITY 10.000

PO_UNIT EA Each

REF_DOC 5000000007 Goods Receipt No

REF_DOC_YEAR 2005 GR year

REF_DOC_IT 0001 Goods Receipt item no

TAX_CODE I0 AP, not relevant to tax

ITEM_TEXT Text

Read only

0 Likes
880

Hi Savitha ,

Thanks.

I have one more doubt .

Can't I create an invoice without a Good recipt?

I tried to do that by it gives error that ref_doc is missing?

I just want to create an invoice against a purchase order only.

Can u help me in this regard.

Thanks in advance

Read only

0 Likes
880

For standard purchase order(Po's start with 45****) it wont allow you to create without Goods Receipt. Yes u create an invoice without a Good receipt for only intercompany purchase orders.(for my case Po's start with 65******* eg:6500000095.

it_itemdata-invoice_doc_item = v_itemno.

it_itemdata-po_number = x_ekko-ebeln.

it_itemdata-po_item = it_int2-aupos.

it_itemdata-tax_code = c_mwskz2.

it_itemdata-item_amount = it_int2-wrbtr.

it_itemdata-quantity = it_int2-menge.

it_itemdata-po_unit = it_int2-meins.

it_itemdata-po_pr_uom = it_int2-meins.

Read only

0 Likes
880

Thanks savitha for the information.

Ya you are right .It doesnot allow me to create an invoice for purchase order starting with 45* but it allows for others w/0 good receipt.