Skip to Content
0

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

Oct 13, 2016 at 02:12 PM

171

avatar image
Former Member

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

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

Hi

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

Max

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 14, 2016 at 07:22 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded