The following sample shows how to update a BusinessPartners object in the database. Use this sample as a basis to all business objects of master data type (not document type).
Dim nErr As Long
Dim errMsg As String
Dim vBP As SAPbobsCOM.BusinessPartners
Set vBP = vCompany.GetBusinessObject(oBusinessPartners)
'Get the required record of the current object
If (vBP.GetByKey("HU1001") = True) Then
'Update the required properties
vBP.FreeText = "Here's free text"
Call vBP.Update
End If
'check for errors
Call vCompany.GetLastError(nErr, errMsg)
If (0 <> nErr) Then
MsgBox ("Found error:" + Str(nErr) + "," + errMsg)
End If