Skip to Content
0
Former Member
Aug 15, 2005 at 09:08 AM

Registration UserObjectsMD by way of code

304 Views

Hi all, i have a problem

i Creating User Business Object, one header Table and three table Documents

header Table = "@SLSL_ADDITIONALEXP"

1 table Documents = "@SLSL_ADDITIONALSTR"

2 table Documents = "@SLSL_ADDITIONALPAR"

3 table Documents = "@SLSL_ADDITIONALORD"

Code C#

SAPbobsCOM.UserObjectsMD uo = (SAPbobsCOM.UserObjectsMD)Sbo.Instance.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD);

uo.Code = "UDOAddEx";

uo.Name = "AdditionalExpenses";

uo.ObjectType = SAPbobsCOM.BoUDOObjType.boud_Document;

uo.TableName = "@SLSL_ADDITIONALEXP";

uo.Add();

uo.ChildTables.TableName = "@SLSL_ADDITIONALSTR";

uo.ChildTables.Add();

uo.ChildTables.TableName = "@SLSL_ADDITIONALPAR";

uo.ChildTables.Add();

uo.ChildTables.TableName = "@SLSL_ADDITIONALORD";

uo.ChildTables.Add();

where

Sbo.Instance.Company.GetBusinessObject(...);

home function and he work is correct

but Business Object do not creatind

please advice what might be the problem?