cancel
Showing results for 
Search instead for 
Did you mean: 

DI: SetCurrentLine

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member185703
Active Contributor
0 Kudos

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

Answers (0)