Skip to Content
author's profile photo Former Member
Former Member

Add Rows to a child object (UserObjectMD_ChildTables )

Hi,

I have a user defined object(SHR) and few child tables to that object (SHR1,SHR2,...)

I'm trying to add lines to the child objects.

Can you please post sample code for that?

Dim oSRHeader As SAPbobsCOM.UserObjectsMD

Dim oSRChild As SAPbobsCOM.UserObjectMD_ChildTables

oSRHeader = objSbo.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)

If oSRHeader.GetByKey("AITS_SH_OSHR_UDO_01 ") = True Then

oSRHeader.ChildTables.SetCurrentLine("3")

End If

I don't know how to proceed after this.

since, oSRHeader.ChildTables.Add will be adding a new Child, correct?

How to add rows to the child table?

Thanks for your help!

Regards,

Geetha

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jan 26, 2008 at 01:36 PM

    Hi Geetha,

    a UserDefined Object is no UserDefined Table.

    there's no DIAPI-Object for UDO at the moment.

    regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 04:30 AM

    Hi,

    You are using the MD objects that are not to populate the tables. The Metadata objects are to create, remove or update the fields or tables, not their records.

    You have to populate or remove records from a UDO by recorset, at least in 2005, it is supposed that in 2007 the object will be available.

    Best Regards

    Guillermo Ocampo

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.