cancel
Showing results for 
Search instead for 
Did you mean: 

Perform stock transfer...?

Former Member
0 Kudos

Hi Guys

How would you perform a stock transfer thro' code? What are the processes that surround this action?

Thanks alot

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

In order to create a stock transfer you need to use the DIAPI. Create a document object and make it a transfer. Then add all the document lines needed. Finally add the document and you are done. (You can also create a parked document of type transfer and have a user check it and add it manually).

HTH Lutz Morrien

Former Member
0 Kudos

HI,

Thanks for the reply, but this is new to me - How would I code this?

Former Member
0 Kudos

Can you also tell me more on the parked document.

Thanks

Former Member
0 Kudos

Hi Avish

In order to do a stock Transfer, you must use the object STockTransfer. Here you have an example.

  
Dim a As SAPbobsCOM.StockTransfer
a = SboCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oStockTransfer)
a.FromWarehouse = "01"
'// The first line is automatically added
a.Lines.ItemCode = "Item1"
a.Lines.Quantity = 1
a.Lines.Price = 1
a.Lines.WarehouseCode = "To Warehouse"

'// Adding a second line to the stock transfer
a.Lines.Add()
a.Lines.ItemCode = "Item2"
a.Lines.Quantity = 1
a.Lines.Price = 2
a.Lines.WarehouseCode = "To WareHouse"
a.Add()

I hope it helps you

Daniel Rial

Former Member
0 Kudos

Thanks Dani

The code I had written was similar but refused to work - after some investigation I found that the data was'nt saving because I had to set an exchange rate and have a date within a valid range..Its working now.

Know anything about parked documents?

Thanks again