I'm having a problem using the V6.7 DI SDK with VB 6.
My code loops through a collection, creating stock transfer entries in SAP BO. The User requirement is to add detail lines to the stock transfer until the from warehouse code changes after which a new stock transfer is created for all items originating from this warehouse, etc.
So I have declared a stock transfer object:
Private SAPStockTransfer As SAPbobsCOM.StockTransfer
Set SAPStockTransfer = SAPCompany.GetBusinessObject(oStockTransfer)
After which I set the appropriate properties of the stock transfer object and add the stock transfer lines as appropriate.
When the warehouse changes I firstly call the add() method of the stock transfer object then I reset the stock transfer object as follows:
Set SAPStockTransfer = Nothing
Set SAPStockTransfer = SAPCompany.GetBusinessObject(oStockTransfer)
The problem is at this stage, the SAPStockTransfer is not re-initialized, as I would have expected, but persists the previously held values.
Am I doing something wrong?