Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3189

Invalid SerialAndBatchNumbersBaseLine Error When Posting Deliveries And StockTransfers via SAP Hana Service Layer

$
0
0

Hi Guys,

 

I am having an issue when posting Delivery Notes or Stock Transfers with Serial tracked items via Service Layer.

I am using SAP Business One For Hana 9.2 PL02.

The error received from Service Layer response is:


{

   "error" : {

      "code" : -10,

      "message" : {

         "lang" : "en-us",

         "value" : "1470000838 - Invalid \"SerialAndBatchNumbersBaseLine\"; specify a valid \"SerialAndBatchNumbersBaseLine\""

      }

   }

}

 

I have followed the SCN Support Note https://launchpad.support.sap.com/#/notes/0001937920 but still having the issue.

It happens even when posting a Delivery Note or Stock Transfer with only one serial on it.

I ensure the SerialAndBatchNumbersBaseLine value is correct so I still do not get it why the error.

 

Please find below Test Code I am using to debug this issue:

 

* For Delivery Notes:

 

Document oDeliveryNote = new SAPB1HanaServiceLayer.SAPB1.Document();

oDeliveryNote.DocType = "dDocument_Items";

oDeliveryNote.CardCode = "C30000";

DocumentLine oLine = null;

oLine = new DocumentLine();

oLine.ItemCode = "A00006";

oLine.Quantity = 1;

SerialNumber Ser = new SerialNumber();

Ser.BaseLineNumber = 0;

Ser.InternalSerialNumber = "A6-000338";

Ser.Quantity = 1;

oLine.SerialNumbers.Add(Ser);

DocumentLinesBinAllocation BinAlloc = new DocumentLinesBinAllocation();

BinAlloc.BaseLineNumber = 0;

BinAlloc.BinAbsEntry = 74;

BinAlloc.Quantity = 1;

BinAlloc.SerialAndBatchNumbersBaseLine = 0;

oLine.DocumentLinesBinAllocations.Add(BinAlloc);

oDeliveryNote.DocumentLines.Add(oLine);

 

* For Stock Transfers:

 

StockTransfer oStockTransfer = new SAPB1HanaServiceLayer.SAPB1.StockTransfer();

oStockTransfer.Comments = "Jose Joya Test Transfers Serials via SAP1 Service Layer";

oStockTransfer.FromWarehouse = "01";

 

StockTransferLine oLine = null;

oLine = new StockTransferLine();

oLine.ItemCode = "A00006";

oLine.Quantity = 1;

 

oLine.FromWarehouseCode = "01";

StockTransferLinesBinAllocation BinLocFrom = new StockTransferLinesBinAllocation();

BinLocFrom.BinActionType = "2";

BinLocFrom.BinAbsEntry = 74;

BinLocFrom.Quantity = 1;

BinLocFrom.SerialAndBatchNumbersBaseLine = 0;

 

oLine.WarehouseCode = "01";

StockTransferLinesBinAllocation BinLocTo = new StockTransferLinesBinAllocation();

BinLocTo.BinActionType = "1";

BinLocTo.BinAbsEntry = 75;

BinLocTo.Quantity = 1;

BinLocTo.SerialAndBatchNumbersBaseLine = 0;

 

oLine.StockTransferLinesBinAllocations.Add(BinLocFrom);

oLine.StockTransferLinesBinAllocations.Add(BinLocTo);

oStockTransfer.StockTransferLines.Add(oLine);

 

.

.

.

 

Could someone please assist?

Delivery Notes And Transfer Documents without Batch/Serial Tracked items works well. The issue happens only when using tracked items.


Viewing all articles
Browse latest Browse all 3189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>