Skip to Content
avatar image
Former Member

Change\Update value of condition on MM invoice trough BAPI.

Good afternoon,
I need to develop a report that creates the MM invoices (MIRO) automatically. Our client frequently changes the percentages of discount conditions manually when they are creating invoices. If the percentages of discount conditions are not changed, the invoice automatically inherits the discount from its PO conditions. To create an invoice I use BAPI_INCOMINGINVOICE_CREATE. The problem is that whitin the BAPI structures, there are only the fields COND_TYPE, COND_ST_NO, COND_COUNT and not the field that i have to change (COND_VALUE, that is present in the BAPI_PO_CREATE's structure) as illustrated in the attached image. I need to set the value of the condition (which is given to me by a .CSV file) at the time of invoice creation. Is there a function that can change the COND_VALUE field ?

Many thanks in advance,
M.

bapiincidsnv.png (59.6 kB)
pocond.png (22.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 13, 2016 at 03:26 PM

    Hi

    Probably you should update tjhe PO before creating the invoice by BAPI BAPI_PO_CHANGE

    Max

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 14, 2016 at 07:22 AM

    Hi Max,

    thank you for reply but the problem is that conditions are stored in the KONV table and the record is created only if you change the condition on MIRO. If the invoice inherits the PO conditions, no record is inserted in the KONV table and the field KNUMV (condition document) of RBKP table is empty. I need to create the invoice's condition document, at the time of invoice creation.

    Marco

    Add comment
    10|10000 characters needed characters exceeded