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

(Urgent ) Inventory tranfer (DI) - Move Bin allowcation with Batch error

$
0
0

Hi expert!

 

I have to use SDK to create Inventory transfer (just move Item with Batch code to other  Bins ).

 

My codes :

.

.....

                     oTransfer.Lines.ItemCode = StrItemCode

                    oTransfer.Lines.Quantity = nQty

                 

                    For i As Integer = 0 To dtItemScan.DefaultView.Count - 1

                        oTransfer.Lines.FromWarehouseCode = FromWhsCode

                        oTransfer.Lines.WarehouseCode = ToWhsCode

 

                        oTransfer.Lines.BatchNumbers.BatchNumber = dtItemScan.DefaultView(i).Item("BatchCode").ToString

                        oTransfer.Lines.BatchNumbers.Quantity = nQty                     

                        oTransfer.Lines.BatchNumbers.Add()

 

                        oTransfer.Lines.BinAllocations.BinActionType = SAPbobsCOM.BinActionTypeEnum.batFromWarehouse

                        oTransfer.Lines.BinAllocations.BinAbsEntry = 2 ' CInt(dtItemScan.DefaultView(i).Item("FromBin").ToString)

                        oTransfer.Lines.BinAllocations.Quantity = dtItemScan.DefaultView(i).Item("Quantity")

                       oTransfer.Lines.BinAllocations.SerialAndBatchNumbersBaseLine = i

                        oTransfer.Lines.BinAllocations.Add()

 

                        oTransfer.Lines.BinAllocations.BinActionType = SAPbobsCOM.BinActionTypeEnum.batToWarehouse

                        oTransfer.Lines.BinAllocations.BinAbsEntry = 4 'CInt(dtItemScan.DefaultView(i).Item("ToBin").ToString)

                        oTransfer.Lines.BinAllocations.Quantity = nQty

                        oTransfer.Lines.BinAllocations.SerialAndBatchNumbersBaseLine = i

                        oTransfer.Lines.BinAllocations.Add()

 

                    Next

 

                    oTransfer.Lines.Add()

 

                'Add the document

                RetVal = oTransfer.Add

 

Error:

-10 1470000838 - Invalid "敓楲污湁䉤瑡档畎扭牥䉳獡䱥湩e"; specify a valid "敓楲污湁䉤瑡档畎扭牥䉳獡䱥湩e"

 

I have already added Good Receipt PO successfully . But with above codes use for inventory transfer , I can't not. Help me , please!

 

Thank you!


Viewing all articles
Browse latest Browse all 10665

Latest Images

Trending Articles



Latest Images

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