2025 Feb 11 9:25 AM
Dear(s),
Context:
We develop a tool to post incoming invoices (like MIRO).
We prepare the import table of the BAPI: BAPI_INCOMINGINVOICE_CREATE1
Our issue:
PO-item is defined as multi account assignment.
We don't know how to prepare the ITEMDATA[] table expected by the BAPI.
Based on ITEMDATA[] table, is there a function module or a class/method that suggests the account assignment table ACCOUNTINGDATA[] ?
If it does not exist, how can I handle the distribution of the quantity/amount ?
In advance, thanks for your comment !
Best regards.
2025 Feb 11 11:48 AM - edited 2025 Feb 11 11:59 AM
AFAIK you have to calculate it in your code (*), handle case of distribution (DISTRIB/VRTKZ) 'by amount', 'by percentage' or 'by quantity', just make sure the sum of the ACCOUNTDATA[] amounts and quantities is equal to the relevant values in the ITEMDATA[].
(*) But feel free to take a look at FMs such as MRM_AMOUNT_QUANTITY_PROPOSE*.
2025 Feb 11 2:21 PM
Thanks a lot for the relevant information.
Following our SAP version, we must call MRM_AMOUNT_QUANTITY_PROPOSE_N