pixiDispoGetItems
Returns a batch of items with preferred supplier, prices, stock and location-specific planning data for export to the Logcontrol Dispo software.
Exports item master data for the Logcontrol disposition (purchase planning) software. The call works in batches of items.
- Candidate selection: the first
ItemCountitems withItemKeygreater thanItemKeyStartare taken fromitems, ordered byItemKeyascending, together with their default supplier. - Preferred supplier: if an
AddItemsrecord withPreferredSupplier = 1exists, its supplier replaces the default supplier of the item. - Additional data per item:
- item tags (tags of type
TypeId = 1) as a comma-separated list, - the earliest
OrderDateof all order lines of the item, - the summed bin quantity (
BinItemQTY) over all bins in locations that are not special stock (SpecialStock <> 1).
- item tags (tags of type
- Result: one row per item and location from
ItemLocationSpecific. Only rows are returned where- the supplier exists in
Suppliers, - an
AddItemsrecord exists for the item and this supplier, - the location is not a special stock location,
- and, if
LocationIdsis given, theLocIDis contained in the comma-separated list.
- the supplier exists in
The result is sorted by ItemKey ascending. Decimal values (SupplPrice, Price) are returned as text with a comma as decimal separator; dates are formatted as dd.mm.yyyy. Single and double quotes are removed from the item name.
Paging: call again with ItemKeyStart set to the highest ItemKey of the previous batch.
Notes
- All reads use
NOLOCK; results may contain uncommitted data. ItemCountlimits the number of candidate items, not the number of result rows. Because of the per-location rows the result can contain more rows; because of the inner joins (supplier,AddItems,ItemLocationSpecific, non-special-stock location, location filter) it can contain fewer or even none, although further items exist. An empty result therefore does not necessarily mean the end of the item list; a caller should advanceItemKeyStartby the batch range rather than stop.Quantityis joined via the order line data: for items without any order lineQuantityis always0, even if stock exists.Quantityis the total over all non-special-stock locations, not the quantity of the location inLocationId(seeLocationQuantityfor that).Tagsstarts with a leading space (only the first comma is removed), and special characters such as&are XML-escaped by the concatenation.- An empty or whitespace-only
LocationIdsis treated likeNULL(no location filter). List entries are trimmed; each entry is compared asvarchar(10). VATLevel:LforMwStSatz = 2,0forMwStSatz = 3, otherwiseH.Typis always0100.- Temporary tables are dropped via
util.TempTableDrop(not attached).
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
ItemKeyStart
|
int | 0 |
Only items with an Example: |
LocationIds
|
varchar(max) string |
NULL |
Optional comma-separated list of location IDs ( Example: |
ItemCount
|
int | 1000 |
Maximum number of candidate items read from Example: |
Result set 1 · Always (may be empty)
One row per item and location with supplier, price, stock and planning data, sorted by ItemKey.
| Column | Type | Description |
|---|---|---|
ItemKey
|
int |
Internal item key. |
SupplPrice
Nullable |
varchar(30) string |
Purchase price of the supplier from |
ITemName
Nullable |
string |
Item name with single and double quotes removed. |
VPE
|
decimal |
Packaging/order unit ( |
MinStockQty
|
decimal |
Minimum stock of the item at this location, |
MinOrderQty
|
decimal |
Minimum order quantity at this location, |
SupplNr
|
varchar(4) string |
Supplier number (preferred supplier if defined, otherwise default supplier of the item). |
TontrText
|
string |
Text of the configuration type ( |
ItemNrInt
Nullable |
string |
Internal item number. |
ItemNrSuppl
Nullable |
string |
Supplier item number from |
Quantity
|
int |
Total bin quantity over all non-special-stock locations; |
ExportDate
|
varchar(10) string |
Current date in format |
Typ
|
varchar(4) string |
Constant record type |
SupplName
Nullable |
string |
Supplier name. |
CreateDate
Nullable |
varchar(10) string |
Creation date of the item in format |
OrderDate
|
varchar(10) string |
Earliest order date of an order line for the item in format |
Tags
|
varchar(4000) string |
Comma-separated item tags (with leading space), empty if none. |
SupplierDeliveryDays
|
int |
Default delivery days of the supplier, |
ACTIVE
Nullable |
boolean |
Enabled flag of the item ( |
Price
Nullable |
varchar(30) string |
Sales price of the item as text with comma as decimal separator. |
VATLevel
|
varchar(1) string |
VAT level: |
IsBundle
Nullable |
boolean |
Indicates whether the item is a bundle. |
LocationId
Nullable |
string |
Location ID ( |
LocationQuantity
Nullable |
decimal |
Location-specific quantity from |
TargetStock
|
decimal |
Target stock at this location, |
SafetyStock
|
decimal |
Safety stock at this location, |
Response example
<SqlRowSet1>
<row>
<ItemKey>1024</ItemKey>
<SupplPrice>4,2500</SupplPrice>
<ITemName>Kaffeebecher Keramik 300 ml</ITemName>
<VPE>6</VPE>
<MinStockQty>20</MinStockQty>
<MinOrderQty>12</MinOrderQty>
<SupplNr>L001</SupplNr>
<TontrText>-</TontrText>
<ItemNrInt>KB-300</ItemNrInt>
<ItemNrSuppl>MUG-300-W</ItemNrSuppl>
<Quantity>148</Quantity>
<ExportDate>14.05.2024</ExportDate>
<Typ>0100</Typ>
<SupplName>Keramik Großhandel GmbH</SupplName>
<CreateDate>03.02.2021</CreateDate>
<OrderDate>11.02.2021</OrderDate>
<Tags> Küche, Geschenk</Tags>
<SupplierDeliveryDays>5</SupplierDeliveryDays>
<ACTIVE>1</ACTIVE>
<Price>9,9500</Price>
<VATLevel>H</VATLevel>
<IsBundle>0</IsBundle>
<LocationId>001</LocationId>
<LocationQuantity>148</LocationQuantity>
<TargetStock>200</TargetStock>
<SafetyStock>30</SafetyStock>
</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:pixiDispoGetItems>
<!-- <ItemKeyStart>0</ItemKeyStart> -->
<!-- <LocationIds>001,002</LocationIds> -->
<!-- <ItemCount>1000</ItemCount> -->
</ns1:pixiDispoGetItems>
</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:pixiDispoGetItems>
<!-- <ItemKeyStart>0</ItemKeyStart> -->
<!-- <LocationIds>001,002</LocationIds> -->
<!-- <ItemCount>1000</ItemCount> -->
</ns1:pixiDispoGetItems>
</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 = [
// 'ItemKeyStart' => '0',
// 'LocationIds' => '001,002',
// 'ItemCount' => '1000',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiDispoGetItems', $soapArguments);
- SQL object:
- dbo.pipiDispoGetItems