pixiDispoGetOpenSupplierOrders
Returns open supplier order lines and order lines with status ANG, with open quantity and estimated delivery date, paged by line key.
Collects open purchase quantities for disposition (replenishment planning) from two sources and returns them as one list.
Type 1200 – supplier order lines (pixi.SupplierOrderLine):
- Only lines whose supplier order has a status with
IsOrderedConfirmed = 1(ordered or confirmed). - Only lines with an open quantity other than 0. The open quantity is
Qty - DeliveredQty - UndeliveredQty, with missing values counted as 0. EstimatedDeliveryDateis the line's estimated delivery date, or'0'if none is set.SupplOrderNRis the internal number of the supplier order.SupplOrderDateis the creation date of the line.
Type 2200 – order lines with status ANG (Orderlines):
- Only lines with
Status = 'ANG'and a quantity other than 0. QtyandQtyOrderedare the line quantity.QtyReceivedandQtyNotDeliveredare always 0.EstimatedDeliveryDateis today plus the supplier'sDefaultDeliveryDays. If the supplier has no value, 1 day is used.SupplOrderNRis the order number.SupplOrderDateis the creation date of the line.
For both types, item data (SupplNr, ItemNrInt, ItemNrSuppl) comes from Items via a left join. ItemNrSuppl falls back to ItemNrInt when the item has no supplier item number.
Paging: only lines whose key is greater than SOrderlineKeyStart are returned. The combined list is sorted by SOrderlineKey in ascending order and limited to RowCount rows. To get the next page, pass the last SOrderlineKey you received as the new SOrderlineKeyStart.
All dates are returned as text in the format dd.mm.yyyy.
Notes
- All tables are read with
NOLOCK, so the result can include uncommitted data. SOrderlineKeycomes from two different key spaces:SupplierOrderLine.Idfor type1200andOrderlines.OrderlineKeyfor type2200. The same key value can therefore appear in both types.- Paging uses a single threshold for both sources.
- If a page ends in the middle of such a duplicate key, the remaining row with that key is skipped on the next page.
- Always evaluate
Typetogether withSOrderlineKey.
- The two sources are combined with
UNION, so rows that are completely identical are returned only once. - If
RowCountis NULL, 10000 is used. EstimatedDeliveryDatefor type2200is calculated from the current server date at the time of the call.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
SOrderlineKeyStart
|
int | 0 |
Only lines with a key greater than this value are returned. Used for paging; NULL is treated as 0. Example: |
RowCount
|
int | 10000 |
Maximum number of rows returned. NULL is treated as 10000. Example: |
Result set 1 · Always
Open supplier order lines (type 1200) and order lines with status ANG (type 2200), sorted by SOrderlineKey ascending.
| Column | Type | Description |
|---|---|---|
SOrderlineKey
|
int |
Key of the line: SupplierOrderLine.Id for type 1200, Orderlines.OrderlineKey for type 2200. |
ItemKey
Nullable |
int |
Key of the item. |
EstimatedDeliveryDate
Nullable |
varchar(10) string |
Estimated delivery date as dd.mm.yyyy. For type 1200 it is '0' if not set; for type 2200 it is today plus the supplier's DefaultDeliveryDays (default 1). |
Qty
Nullable |
int |
Open quantity: ordered minus delivered minus undelivered (type 1200), or the line quantity (type 2200). |
Type
|
varchar(4) string |
Source of the row: '1200' = supplier order line, '2200' = order line with status ANG. |
SupplNr
Nullable |
string |
Supplier number from the item master data. |
ItemNrInt
Nullable |
string |
Internal item number. |
ItemNrSuppl
Nullable |
string |
Supplier item number; falls back to ItemNrInt if empty. |
SupplOrderDate
Nullable |
varchar(10) string |
Creation date of the line as dd.mm.yyyy. |
SupplOrderNR
Nullable |
string |
Internal number of the supplier order (type 1200) or order number (type 2200). |
QtyOrdered
Nullable |
int |
Ordered quantity of the line. |
QtyReceived
|
int |
Quantity already delivered (type 1200); always 0 for type 2200. |
QtyNotDelivered
|
int |
Quantity marked as not delivered (type 1200); always 0 for type 2200. |
Response example
<SqlRowSet1>
<row>
<SOrderlineKey>10452</SOrderlineKey>
<ItemKey>2381</ItemKey>
<EstimatedDeliveryDate>15.07.2024</EstimatedDeliveryDate>
<Qty>8</Qty>
<Type>1200</Type>
<SupplNr>104</SupplNr>
<ItemNrInt>ART-4711</ItemNrInt>
<ItemNrSuppl>LF-88231</ItemNrSuppl>
<SupplOrderDate>02.07.2024</SupplOrderDate>
<SupplOrderNR>B-2024-0815</SupplOrderNR>
<QtyOrdered>10</QtyOrdered>
<QtyReceived>2</QtyReceived>
<QtyNotDelivered>0</QtyNotDelivered>
</row>
<row>
<SOrderlineKey>10467</SOrderlineKey>
<ItemKey>5120</ItemKey>
<EstimatedDeliveryDate>11.07.2024</EstimatedDeliveryDate>
<Qty>3</Qty>
<Type>2200</Type>
<SupplNr>217</SupplNr>
<ItemNrInt>ART-9902</ItemNrInt>
<ItemNrSuppl>ART-9902</ItemNrSuppl>
<SupplOrderDate>08.07.2024</SupplOrderDate>
<SupplOrderNR>500123</SupplOrderNR>
<QtyOrdered>3</QtyOrdered>
<QtyReceived>0</QtyReceived>
<QtyNotDelivered>0</QtyNotDelivered>
</row>
</SqlRowSet1>
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiDispoGetOpenSupplierOrders>
<!-- <SOrderlineKeyStart>0</SOrderlineKeyStart> -->
<!-- <RowCount>5000</RowCount> -->
</ns1:pixiDispoGetOpenSupplierOrders>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiDispoGetOpenSupplierOrders>
<!-- <SOrderlineKeyStart>0</SOrderlineKeyStart> -->
<!-- <RowCount>5000</RowCount> -->
</ns1:pixiDispoGetOpenSupplierOrders>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
// 'SOrderlineKeyStart' => '0',
// 'RowCount' => '5000',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiDispoGetOpenSupplierOrders', $soapArguments);
- SQL object:
- dbo.pipiDispoGetOpenSupplierOrders