Skip to Content
author's profile photo
Former Member

DI: SetCurrentLine

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Posted on Apr 14, 2004 at 08:09 AM

    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 comment
    10|10000 characters needed characters exceeded