Skip to Content
0
Former Member
Apr 05, 2012 at 05:05 PM

Cannot create Invetory Transfer through DI Server

336 Views

I'm trying to create an Inventory Transfer through the DI Server, but no matter what I try I keep getting -5002 Not enough data.

I've tried through the DTW sending just DocDate and FromWarehouse for the document and ItemCode, WarehouseCode and Quantity for the row and it worked. DTW template only specifies CardCode as mandatory, but this is wrong (works fine without) and DI Server still returns -5002 even with CardCode.

SDK documentation for DI API for the Add method of the StockTransfer object only states "You must values for the mandatory properties, and then call the Add method.", but stops well short of specifying which properties are mandatory. So typical!

Using v8.81.315 PL07. Not using serial numbers or batches. XML stream follow. Thanks for your help!

05/04/2012 17:44:22 Request

<?xml version="1.0" encoding="UTF-16"?>

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">

<env:Header>

<SessionID>1785BB1E-F1E1-4F12-B9B3-25154F4B4F4F</SessionID>

</env:Header>

<env:Body>

<dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS">

<BOM>

<BO>

<AdmInfo>

<Object>oStockTransfer</Object>

</AdmInfo>

<Documents>

<row>

<FromWarehouse>03</FromWarehouse>

<DocDate>20120405</DocDate>

</row>

</Documents>

<Document_Lines>

<row>

<ItemCode>9Y7212</ItemCode>

<WarehouseCode>01</WarehouseCode>

<Quantity>2</Quantity>

</row>

</Document_Lines>

</BO>

</BOM>

</dis:AddObject>

</env:Body>

</env:Envelope>

05/04/2012 17:44:22 Response (Fault)

<?xml version="1.0"?>

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">

<env:Body>

<env:Fault>

<env:Code>

<env:Value>env:Receiver</env:Value>

<env:Subcode>

<env:Value>-5002</env:Value>

</env:Subcode>

</env:Code>

<env:Reason>

<env:Text xml:lang="en">Not enough data </env:Text>

</env:Reason>

<env:Detail>

<Object>67</Object>

<ObjectIndex>1</ObjectIndex>

<Command>AddObject</Command>

<SessionID>1785BB1E-F1E1-4F12-B9B3-25154F4B4F4F</SessionID>

</env:Detail>

</env:Fault>

</env:Body>

</env:Envelope>