pixiSupplierOrderLineLocQtyUpdate
Updates the quantity and/or undelivered quantity of one location quantity record of a supplier order line.
Updates a single supplier order line location quantity record, identified by SupplierOrderLineLocQtyId. The actual update is done by the internal procedure pixi.SupplierOrderLineLocQtyUpdate. This wrapper does the following:
- Opens a transaction. If the caller already has an open transaction, it sets a savepoint instead.
- Resolves the user. If
UserIdis given, it is used as is. Otherwise the user is looked up byUserNameinUCS_USERS. If no user has that name, the userpixiAdministrationis used. - Normalises the parameters:
ConsiderPackageUnitsandConsiderMinOrderQtybecome0when they areNULL.QtyandUndeliveredQtybecomeNULLwhen they areNULLor0.
- Calls
pixi.SupplierOrderLineLocQtyUpdatewith these values. It always passesReturnUpdatedIds = 1, so the internal procedure is asked to return the IDs it updated. - Commits the transaction if this call opened it.
On any error the transaction or savepoint is rolled back. The call then returns one row with ReturnCode = 'ERROR' and the SQL error message.
Notes
- Internal procedure not attached: the definition of
pixi.SupplierOrderLineLocQtyUpdateis not available. It is therefore unknown:- which tables it changes,
- which validations it performs,
- which columns its success result set has,
- how it handles
NULLforQtyorUndeliveredQty(probably "leave unchanged").
- Value
0cannot be set: because of the checkISNULL(@Qty, '') = '', the value0is treated like "not provided" and passed on asNULL. The same applies toUndeliveredQty. Setting a quantity to0is therefore not possible through this call. - Unused parameter:
AppNameis required but not used by the code. - Rollback on error: if an error makes the transaction uncommittable, the code rolls back to the savepoint. SQL Server does not allow this for uncommittable transactions and may raise a further error.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
AppName
Required
|
varchar(255) string |
– |
Name of the calling application. Required, but not used by the code. Example: |
UserId
|
int | NULL |
ID of the acting user. If omitted, the user is determined from Example: |
UserName
Required
|
varchar(50) string |
– |
User name, used to find the user when Example: |
SupplierOrderLineLocQtyId
Required
|
int | – |
ID of the supplier order line location quantity record to update. Example: |
ConsiderPackageUnits
|
bit boolean |
0 |
Whether package units are taken into account. Allowed values
Example: |
ConsiderMinOrderQty
|
bit boolean |
0 |
Whether the minimum order quantity is taken into account. Allowed values
Example: |
Qty
|
int | NULL |
New ordered quantity. Example: |
UndeliveredQty
|
int | NULL |
New undelivered (open) quantity. Example: |
Result set 1 · On success: whatever pixi.SupplierOrderLineLocQtyUpdate returns (called with ReturnUpdatedIds = 1)
Result of the internal procedure, presumably the IDs of the updated records. Its columns are not visible in the available code.
Result set 2 · On error
Error row with the SQL error message.
| Column | Type | Description |
|---|---|---|
ReturnCode
|
varchar(5) string |
Always |
ErrorMessage
Nullable |
nvarchar(4000) string |
Text of the SQL error that occurred. |
Response example
<SqlRowSet1>
<row>
<ReturnCode>ERROR</ReturnCode>
<ErrorMessage>Supplier order line location quantity not found.</ErrorMessage>
</row>
</SqlRowSet1>
| Status | Message | Cause |
|---|---|---|
| ERROR | {ERROR_MESSAGE()} | Any error raised while resolving the user or inside `pixi.SupplierOrderLineLocQtyUpdate`, for example an invalid `SupplierOrderLineLocQtyId` or failed validations. The changes are rolled back. Check the message text for the actual cause. |
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:pixiSupplierOrderLineLocQtyUpdate>
<AppName>MyWarehouseTool</AppName>
<!-- <UserId>12</UserId> -->
<UserName>jdoe</UserName>
<SupplierOrderLineLocQtyId>4711</SupplierOrderLineLocQtyId>
<!-- <ConsiderPackageUnits>0</ConsiderPackageUnits> -->
<!-- <ConsiderMinOrderQty>0</ConsiderMinOrderQty> -->
<!-- <Qty>24</Qty> -->
<!-- <UndeliveredQty>10</UndeliveredQty> -->
</ns1:pixiSupplierOrderLineLocQtyUpdate>
</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:pixiSupplierOrderLineLocQtyUpdate>
<AppName>MyWarehouseTool</AppName>
<!-- <UserId>12</UserId> -->
<UserName>jdoe</UserName>
<SupplierOrderLineLocQtyId>4711</SupplierOrderLineLocQtyId>
<!-- <ConsiderPackageUnits>0</ConsiderPackageUnits> -->
<!-- <ConsiderMinOrderQty>0</ConsiderMinOrderQty> -->
<!-- <Qty>24</Qty> -->
<!-- <UndeliveredQty>10</UndeliveredQty> -->
</ns1:pixiSupplierOrderLineLocQtyUpdate>
</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 = [
'AppName' => 'MyWarehouseTool',
// 'UserId' => '12',
'UserName' => 'jdoe',
'SupplierOrderLineLocQtyId' => '4711',
// 'ConsiderPackageUnits' => '0',
// 'ConsiderMinOrderQty' => '0',
// 'Qty' => '24',
// 'UndeliveredQty' => '10',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiSupplierOrderLineLocQtyUpdate', $soapArguments);
- SQL object:
- dbo.pipiSupplierOrderLineLocQtyUpdate