on 09-27-2007 10:26 AM
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
oUserObjectMD.Code = "PSSIT_PARAM"
make this name 8 characters.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Suresh before creating this UDO are you creating sum other tables and field etc?? Im sure you coz of your other post:-) Well i have faced this same problem. What i did was add a delay in the execution then restart the execution again it helps sumtyms.. What i figure is when you try doing this in the frontend (ie thru B1) We get that pop up askin whether to continue with the changes etc?? I gues it has somethin to do with that..
Try addin the delay it may help
regards
Aris
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.