Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem with creating default form while registeting UDO

Hi All

I'm facing problem on creating default form while registering UDO using some VB.Net code.

the SAP shows object registed successfully.but

it doesn't create the default form.

sample code is

Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD

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

oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tNO

oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tYES

oUserObjectMD.Code = "ABC"

oUserObjectMD.Name = "ABC" oUserObjectMD.ObjectType =SAPbobsCOM.BoUDOObjType.boud_MasterData

oUserObjectMD.TableName ="ABC"

lRetCode = oUserObjectMD.Add()

If lRetCode <> 0 Then

oCompany.GetLastError(ErrCode, ErrMsg)

MessageBox.Show(ErrMsg)

Else

MessageBox.Show("Table " + TableName + " has been registered.")

End If

Regards,

Alpesh

Former Member
Not what you were looking for? View more on this topic or Ask a question