cancel
Showing results for 
Search instead for 
Did you mean: 

Register UDO as Business Object

Former Member
0 Kudos

HI ALL

Can i register our UDO as Business Object, I want to Insert the data to my UDO via DIAPI, How can i do this

i.e I want my UDO to act as Business object like oPurchaseOrders etc

Mohamed

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello ,

What is the maximume data size can SAPbobsCOM.GeneralData.SetProperty(string,Object) can store , I am getting an exception the size of data is too long, and what is the replacement to store longer data size on UDO table ?

Former Member
0 Kudos

Please open a new thread, this one has already been answered and you will not get many replies.

Former Member
0 Kudos

Thanks

Former Member
0 Kudos

Hi,

Yes it can be done.

Vasu Natari.

Former Member
0 Kudos

HI THanks

Can u give me sample code, or can you tell me how to go about it

Hi Which object i should use to register UDO as DIPI , Can u please tell me the Sample way to do it

Mohamed

Edited by: MohamedZubair on Mar 11, 2010 8:59 AM

Former Member
0 Kudos

Hi,

Please check the following thread. This could help u.

U need to use the GeneralService object to access the UDO, the following sample is provided by SAP B1 help. I could not give more inputs regarding this as i have not worked on this object. Plz try that.

The GeneralService provides access to UDOs.

With the service, you can add, look up and remove rows from user-defined tables. You can also invoke custom methods on the UDO's custom business implementation DLL.

Dim oGeneralService As SAPbobsCOM.GeneralService

Dim oGeneralData As SAPbobsCOM.GeneralData

Dim oChild As SAPbobsCOM.GeneralData

Dim oChildren As SAPbobsCOM.GeneralDataCollection

Dim oGeneralParams As SAPbobsCOM.GeneralDataParams

'Get GeneralService (oCmpSrv is the CompanyService)
Set oGeneralService = oCmpSrv.GetGeneralService("MainUDO")

'Create data for new row in main UDO
Set oGeneralData = oGeneralService.GetDataInterface(gsGeneralData)
oGeneralData.SetProperty "Code", "First"
oGeneralData.SetProperty "U_Data", "my data"

'Create data for a row in the child table
Set oChildren = oGeneralData.Child("ChildUDO")
Set oChild = oChildren.Add
oChild.SetProperty "U_Data", "child data"
oChild.SetProperty "U_Type", 6

'Add the new row, including children, to database
oGeneralService.Add oGeneralData

Vasu Natari.

Former Member
0 Kudos

How can I update a child table row using DI General Service ?

Can you send me an example ?

Thanks