Postman collection
Orderlines Write

pixiSetOrderlineLocation

Moves a single order line or a bundle order line, together with the related bundle lines, to another location (LocID).

Changes the location (LocationID and LastOrdLocationID) of order lines. The call delegates to the internal procedure Pixi_UpdateOrderLocation with user name API and returns one status row.

Which records are changed

  • Only OrderlineKey given: the order line itself is moved. If the line belongs to a bundle, all other lines of the same bundle and the bundle order line (BundleOrderlines) are moved as well.
  • Only BundleOrderlineKey given: all component order lines of this bundle and the bundle order line itself are moved. The component lines are moved only if the bundle order line has an eligible status.
  • Neither key given: the call fails, because no order can be determined.

Only lines with an eligible status are updated. Eligible statuses are all non-final states from OrderStates (FinalState = 'N') except EIN, FUT and FUS. Lines with any other status are skipped silently, and the call still returns OK.

Validation

The internal procedure checks the following and rejects the call if a check fails:

  • The order line or bundle order line exists.
  • LocationId exists in Location.
  • At least one line of the order has the status NEW, ANG, HAL, MIN, BES, STO or NLB.
  • None of the affected order lines is on a picklist (PLitem).

POS / reservation locations

If the target location has a ResLocID, ResOnLocDate of the order header is reset to NULL. The procedure then looks at other orders that have eligible lines on the same location with the same items. If the latest ResOnLocDate of those orders is earlier than the earliest reservation date of this order, all reservations of this order get that latest ResOnLocDate plus one second as their new ResDate.

Result

The call returns ReturnCode = 'OK' on success. Otherwise it returns ReturnCode = 'ERROR' with the generic message Ilegal parameters.

Notes

  • All failure reasons of the internal procedure collapse into the single message Ilegal parameters. The detailed reasons are only emitted via PRINT, for example ERROR: Wrong LocationID: ... or ... must not be on Picklist. Whether a SOAP client receives these texts is not visible in the code.

  • UpdateEmp is set to API and UpdateDate to the current time on all updated rows.

  • The internal procedure runs in its own transaction, or uses a savepoint if a transaction is already open. On a runtime error it rolls back, logs the error via log.InsertError and the call returns ERROR.

  • During the update of BundleOrderlines, CONTEXT_INFO is temporarily set to 0x30000. According to a code comment this avoids recalculating bundles; the triggers that evaluate it are not attached.

  • Validation reads use NOLOCK; updates use ROWLOCK.

  • Passing both OrderlineKey and BundleOrderlineKey is not recommended:

    • The bundle key determines the order.
    • The bundle order line itself is not updated.
    • The same order lines can be collected twice, so creating the unique index on the internal temp table fails and the call returns ERROR.

    Pass only one of the two keys.

  • The status check (NEW, ANG, HAL, ...) only requires one line of the whole order in such a status, not necessarily the target line.

Tables used

Orderlines · Write BundleOrderlines · Write OrderHeader · Write Reservation · Write Location · Read PLitem · Read OrderStates · Read
SQL object:
dbo.pipiSetOrderlineLocation
Updated at 2026-10-30