cancel
Showing results for 
Search instead for 
Did you mean: 

Create stocktaking using sdk

Former Member
0 Kudos

Hi all,

We are trying to create a stocktaking using the following piece of code but when the system try to save the document (ST.Add), system crashes with message vhost32.exe has stopped working. What is wrong on the following?

        Dim ST As SAPbobsCOM.StockTaking
        ST = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oStockTakings)
        ST.ItemCode = "10001"
        ST.WarehouseCode = "00"
        ST.Counted = 5
        ST.Add()
View Entire Topic
edy_simon
Active Contributor
0 Kudos

Hi Fedias,

I have similar code running in SBO 882. PL 8 without problem.

Have you try clearing the temp folder / reinstall the DI API ?

What is your SBO Version ?

Regards

Edy

christophe_averous
Active Participant
0 Kudos

Hi,

Do you compile for x86 plateform?

Also

at the end write

if ST.add<>0 then

     msgbox(ocompany.getlasterordescription)

end if

Regards

Christophe

Former Member
0 Kudos

I was referenced on DI 2007. When i changed the reference to 8.82 worked perfectly.