Symptom

An add-on or integration adds an Issue for Production through the DI API, and the call fails with this message:

In "Amount (FC)" "From" field, enter a number.

Example

The integration creates the document as an oInventoryGenExit object and links each line to a production order with BaseType = 202, BaseEntry and BaseLine, for example with a batch-managed item and a warehouse. Add() returns the error above instead of creating the issue.

The message does not mention prices, which makes the real cause hard to spot.

Cause

At least one item on the document has a negative Last Evaluated Price. The DI API cannot calculate the amount for the issue from a negative price and rejects the document.

SAP does not yet know what causes the Last Evaluated Price to become negative.

Who is affected

All of the following must apply:

  • You use SAP Business One 10.0 or SAP Business One 10.0, version for SAP HANA.
  • An Issue for Production is added through the DI API.
  • One of the items on the document has a negative Last Evaluated Price.

To find affected items, run this query on the company database:

SQL
SELECT "ItemCode", "ItemName", "LstEvlPric"
FROM OITM
WHERE "LstEvlPric" < 0;

If the query returns no rows, this article does not apply.

Solution

Refresh the Last Evaluated Price of the items the query returned:

  1. Go to Inventory → Inventory Reports → Inventory Audit Report.
  2. In the selection criteria, leave Date From and To empty, select all warehouses and restrict the report to the affected items. Run the report.
  3. Open Inventory → Item Master Data for each affected item. In the Price List field, choose Last Evaluated Price and check that the price is now zero or positive.
  4. Add the Issue for Production again through the DI API.

Because the root cause is unknown, write down what happened before the price turned negative, for example data imports, add-ons or unusual postings. If you can reproduce it, report the exact steps to SAP support under component SBO-MM-PRL-PRL.

Confirm the result

  • Run the query again. It returns no rows.
  • The DI API adds the Issue for Production without an error.
  • Check the journal entry of the new issue to make sure the posted amounts are plausible.