Application Development 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: 

BAPI_INCOMINGINVOICE_CREATE

0 Kudos
263

Using this BAPI - BAPI_INCOMINGINVOICE_CREATE, i am getting an error - Quantity entered larger than quantity to be debited. Please suggest.

8 REPLIES 8

Former Member
0 Kudos
123

HI,

is this created with reference to a PO.. check the quantity in PO and quantity in this Invoice.

Thanks

mahesh

0 Kudos
123

Thanks for the reply.

Now i am getting the error - Account assignment 00 for purchasing document does not exist. I am passing 00 in ACCOUNTINGDATA-SERIAL_NO and X in ACCOUNTINGDATA-XUNPL.

Please help.

Former Member
0 Kudos
123

check this.

<a href="http://www.geocities.com/rmtiwari/main.html?http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/Z_BAPI_INCOMINGINVOICE_CREATE.html">BAPI INCOMING INVOICE</a>

0 Kudos
123

Hi i am getting the error for - Balance not zero: 300.00- debits: 600.00 credits: 300.00.

0 Kudos
123

Just an example - works in my case.

S_HEADERDATA-INVOICE_IND = 'X'.

S_HEADERDATA-DOC_DATE = sy-datum.

S_HEADERDATA-DOC_TYPE = document type.

S_HEADERDATA-PSTNG_DATE = V_DATE1.

S_HEADERDATA-COMP_CODE = '100'.

S_HEADERDATA-GROSS_AMOUNT = gross amount. Enter total amount here

S_HEADERDATA-CURRENCY = 'USD'.

  • Fill item details in loop if more than 1 line item

TAB_ITEMDATA-PO_NUMBER = ebeln.

TAB_ITEMDATA-PO_ITEM = EBELP.

TAB_ITEMDATA-REF_DOC = MBLNR.

TAB_ITEMDATA-REF_DOC_YEAR = MJAHR.

TAB_ITEMDATA-REF_DOC_IT = ZEILE.

TAB_ITEMDATA-TAX_CODE = 'E0'.

TAB_ITEMDATA-ITEM_AMOUNT = net amount.

gross amount should be the total of all the net amounts on the line item

CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'

EXPORTING

HEADERDATA = S_HEADERDATA

IMPORTING

FISCALYEAR = KEY-FISCALYEAR

INVOICEDOCNUMBER = KEY-INVOICEDOCNUMBER

TABLES

ITEMDATA = TAB_ITEMDATA

RETURN = TAB_RETURN

EXCEPTIONS

OTHERS = 01.

0 Kudos
123

Is it not possible to run the BAPI from se37?

I am doing that and getting the error. Please help.

0 Kudos
123

you can run it from se37. what error are you getting?

0 Kudos
123

Hello Pravinkumar,

Although this is 2 years old post, I have the same error.

"Quantity entered larger than quantity to be debited"

Were you able to solve it?

How?