Skip to Content

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

Error when adding row in UDO of type Master Data using DIAPI


When we try to add new rows to a user defined object of type master data using the DIAPI we always get the error: -4002 To generate this document, first define the numbering series in the Administration module. A UDO of type master data has no numbering series?

The code for adding the row is UDO of type master data is:

               oUserTable = oCompany.UserTables.Item( "PMX_TEMP_MD" );
                oUserTable.Code = "123";
                oUserTable.Name = "sss";
                int retCode = oUserTable.Add(); //Error -4002

The code for registration of the UDO is:

               oUserObjectsMD.Code = "PMX_TEMP_MD";
                oUserObjectsMD.TableName = "PMX_TEMP_MD";
                oUserObjectsMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tYES;
                oUserObjectsMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO;
                oUserObjectsMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData;
                int retCode = oUserObjectsMD.Add();

We are using SBO 2005A SP1 PL 31.

Is there maybe an other way for inserting new rows in a UDO of type master data using the DIAPI? Or is this a bug?

Thanks for the help.



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