Skip to Content
author's profile photo
Former Member

Reg UDO Creation

Hi All,

When i create a UDO through code i am getting following error.

My code is below

-


ConnectToCompany()

'Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD

oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)

oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO

oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tNO

oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO

oUserObjectMD.Code = "PSSIT_PARAM"

oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO

oUserObjectMD.Name = "PSSIT_PARAM"

oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData

oUserObjectMD.TableName = "PSSIT_QCPARAMETER"

Try

<u><b> lRetcode = oUserObjectMD.Add()</b></u>

Catch ex As Exception

MessageBox.Show(ex.Message)

End Try

If lRetcode <> 0 Then

If lRetcode = -1 Then

Else

oCompany.GetLastError(lRetcode, sErrmsg)

MsgBox(sErrmsg)

End If

Else

'MsgBox("UDO: " & oUserObjectMD.Name & " was added successfully")

Label7.Text = "UDO: " & oUserObjectMD.Name & " for " & oUserObjectMD.TableName & " "

End If

oUserObjectMD = Nothing

Error occured in the "lRetcode = oUserObjectMD.Add()" line

Value of lRetcode is =-1200 , and error message is " -The data area passed to a system call is too small"

Please some body can help me on this to solve

Regards

Suresh R

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 01:30 AM

    oUserObjectMD.Code = "PSSIT_PARAM"

    make this name 8 characters.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 09:52 AM

    Hey suresh the code seems perfect..check again whether the table is of master data type. Im sure you already done that.. also check whether the name etc provided fall between the ranges specified in OUDO.. n in OUTB check whether the entry for table PSSIT_QCPARAMETER has the name of the udo in the UsedInObj paramter. Hope im of sum help

    Regards

    Aris

    Add comment
    10|10000 characters needed characters exceeded