Skip to Content

'BAPI_INCOMINGINVOICE_CREATE' with return items (movemunt type 161)

Hello Experts,

While trying to create an invoice from a PO with return items (movement type 161), the BAPI_INCOMINGINVOICE_CREATE ended with errors like 1)(Error Messsge : Reverse Qty Greater than qty created so far ).

I would like to have some assistant here, how to create an invoice with return items.

Thanking in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Sep 30, 2009 at 12:31 PM

    The header INVOICE_IND needs to be empty when posting against returns items so that a credit memo will be created. NB you can't use this BAPI to post a single invoice containing both ordinary lines and returns items even though you can do this in MIRO - another instance of a BAPI not being able to do something you can do in the the related transaction.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 14, 2020 at 04:46 PM

    I passed 'S' (Debit) for DELIV_POSTING and 'H' (Credit) for RETURN_POSTING in structure HEADERDATA for a credit memo posting and it worked for me! I would imagine it would just be the other way round for an invoice posting.

    Please see below:

    wl_headerdata-deliv_posting = 'S'.
    wl_headerdata-return_posting = 'H'.

    .

    .

    .

    .

    .

    CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
    EXPORTING
    headerdata = wl_headerdata
    IMPORTING
    invoicedocnumber = l_docnr
    fiscalyear = l_year
    TABLES
    itemdata = tl_itemdata
    * ACCOUNTINGDATA =
    glaccountdata = tl_glaccountdata
    * MATERIALDATA =
    taxdata = tl_taxdata
    withtaxdata = tl_withtaxdata
    return = tl_return
    * EXTENSIONIN =
    .

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.