hi,
i will inserted a new record in the table I_OCPR
with the DI-API 6.5
Call vBP.ContactEmployees.Add
Call vBP.ContactEmployees.SetCurrentLine(0)
(example in the helpfile)
but the program is not running
runtime error 438
object have not the methode
what is wrong ?
best regards
ingo
Hi Ingo,
Line no. "0" of the ContactEmployees collection is automatically selected:
Dim vBP As SAPbobsCOM.BusinessPartners
Dim vCE As SAPbobsCOM.ContactEmployees
vBP = oCompany.GetBusinessObject
(SAPbobsCOM.BoObjectTypes.oBusinessPartners)
If (vBP.GetByKey("C00001")) Then
vCE = vBP.ContactEmployees
'=> Error !!!
vCE.SetCurrentLine(0)
'OK, if there are (at least) 2 ContactEmployees...
vCE.SetCurrentLine(1)
vCE.SetCurrentLine(0)
End If
Best regards,
Frank
Add a comment