Postman collection
Suppliers Write

pixiSupplierOrderLineLocQtyCreate

Creates a location-specific quantity for one supplier order line, optionally rounded to package units and the minimum order quantity.

Adds a quantity for a specific location (Lagerort) to an existing supplier order line. The actual insert is done by the internal procedure pixi.SupplierOrderLineLocQtyCreate.

Steps:

  1. Opens a transaction, or sets a savepoint if the caller already has an open transaction.
  2. Resolves the user: if UserId is empty, the user is looked up by UserName. If that name does not exist, the user pixiAdministration is used.
  3. Resolves the location in dbo.Location. If LocationId is passed, it is matched against LocationKey. Otherwise Location is matched against the location code LocID. LocationId takes priority over Location.
  4. Checks whether a quantity for this order line and location already exists in pixi.SupplierOrderLineLocQty. If so, the message Location already exists for sent location. is prepared.
  5. If the location was found:
    • NULL values of ConsiderPackageUnits and ConsiderMinOrderQty are treated as 0.
    • The internal create procedure is called with the order line, location, quantity and both flags. It is asked to return the inserted IDs.
  6. If the location was not found, the message Match value for parameter Location does not exists in db. is prepared and nothing is created.
  7. If a message was prepared, a row with ReturnCode = ERROR and ErrorMessage is returned.
  8. Commits its own transaction.

If a SQL error occurs, the transaction is rolled back where possible and an ERROR row with the SQL error text is returned.

Notes

  • Duplicate check does not block the insert. If a quantity for the location already exists, the error message is prepared, but the internal create procedure is still called. The caller therefore receives the result of the internal procedure followed by an ERROR row. Whether a duplicate is created or rejected depends on pixi.SupplierOrderLineLocQtyCreate, whose definition is not attached.
  • The behaviour of the internal procedure is not visible here. This covers which IDs it returns, how package units and minimum order quantity are applied, and which further tables it writes.
  • AppName is required but not used in the code.
  • UserName is required even when UserId is passed.
  • dbo.Location and pixi.SupplierOrderLineLocQty are read with NOLOCK.
  • If the caller has an outer transaction and a non-fatal error occurs, the code does not roll back. Changes made up to the error may remain in the outer transaction.
  • Success produces no explicit status row. Only the result of the internal procedure is returned.

Tables used

Location · Read SupplierOrderLineLocQty · Read UCS_USERS · Read
SQL object:
dbo.pipiSupplierOrderLineLocQtyCreate
Updated at 2026-10-30