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

Re: Can't Inventory Transfer Bin to Bin

$
0
0

Hi Bryan,

This is my version in C#

oGT.Lines.ItemCode = ItemCode;
oGT.Lines.Quantity = 1;
oGT.Lines.FromWarehouseCode =sWhsCode;

int iSerialLines = 0;
foreach (string Serial in SerialCollection)
{
          oGT.Lines.SerialNumbers.InternalSerialNumber = Serial;          //From BIN          oGT.Lines.BinAllocations.BinActionType = SAPbobsCOM.BinActionTypeEnum.batFromWarehouse;          oGT.Lines.BinAllocations.BinAbsEntry = iBinEntry;          oGT.Lines.BinAllocations.Quantity = 1;          oGT.Lines.BinAllocations.SerialAndBatchNumbersBaseLine = iSerialLines;          //The value here must match the LineNo of the Serial          //To BIN          iBinEntry = (int)oDT.GetValue("TBEN", i);          sWhsCode = oDT.GetValue("TWHC", i).ToString();          oGT.Lines.WarehouseCode = sWhsCode;          oGT.Lines.BinAllocations.Add();          oGT.Lines.BinAllocations.BinActionType = SAPbobsCOM.BinActionTypeEnum.batToWarehouse;          oGT.Lines.BinAllocations.BinAbsEntry = iBinEntry;          oGT.Lines.BinAllocations.Quantity = 1;          oGT.Lines.BinAllocations.SerialAndBatchNumbersBaseLine = iSerialLines;     //The value here must match the LineNo of the Serial          iSerialLines++;
}

 

When you transfer between BIN, you need to specify both From Bin Information and To Bin Information.

Note the iSerialLines. It must match the LineNum of your Lines.SerialNumbers.

You also need to provide the quantity in the Lines.Quantity.

In My Example above, it is 1 quantity perline.

Generally the sum quantity of these must be equal :

  1. LINES.QUANTITY
  2. total of LINES.SERIALNUMBERS
  3. total of LINES.BINALLOCATION.QUANTITY in the From BIN
  4. total of LINES.BINALLOCATIONS.QUANTITY in the To BIN.

 

Regards

Edy


Viewing all articles
Browse latest Browse all 10313

Trending Articles



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