cancel
Showing results for 
Search instead for 
Did you mean: 

How to navigate matrix

Former Member
0 Kudos

Hi

I have this problem,

I created a matrix in screen painter with 2 column with the unique ID(V_0and V_1) and set the data bound to true. I also set the table as (@SIT1) and to the column (U_Code and U_Desc). This is UDO Master Data Lines

When tried navigating using the arrows, the matrix table does not refresh only the UDO Master Data is able to navigate.

How do i bind the master data lines to navigate when the master data is changed for example the docNum? Can anyone help me by providing me some sample source code on how to navigate the master data lines?

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

i have also a piece of Code how to define ChildTables for UDOs. I am using this code for installing Udos. Hope this helps.


    Public Sub addUDO(ByVal oCanCancel As SAPbobsCOM.BoYesNoEnum, ByVal oCanClose As SAPbobsCOM.BoYesNoEnum, _
    ByVal oCanCreateDefaultForm As SAPbobsCOM.BoYesNoEnum, ByVal oCanDelete As SAPbobsCOM.BoYesNoEnum, _
    ByVal oCanFind As SAPbobsCOM.BoYesNoEnum, ByVal oCanLog As SAPbobsCOM.BoYesNoEnum, _
    ByVal oCanTransfer As SAPbobsCOM.BoYesNoEnum, ByVal oManageSeries As SAPbobsCOM.BoYesNoEnum, _
    ByVal oObjectType As SAPbobsCOM.BoUDOObjType, ByVal strUID As String, ByVal strName As String, _
    ByVal strTableName As String, ByVal alSubTables As ArrayList, ByVal alSearchColums As ArrayList, _
    ByVal oCompany As SAPbobsCOM.Company)

        Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
        Dim iReturnCode As Integer
        Dim strErrMsg As String
        strErrMsg = ""
        oUserObjectMD = CType(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD), SAPbobsCOM.UserObjectsMD)

        oUserObjectMD.CanCancel = oCanCancel
        oUserObjectMD.CanClose = oCanClose
        oUserObjectMD.CanCreateDefaultForm = oCanCreateDefaultForm
        oUserObjectMD.CanDelete = oCanDelete
        oUserObjectMD.CanFind = oCanFind
        oUserObjectMD.CanLog = oCanLog
        oUserObjectMD.CanYearTransfer = oCanTransfer
        oUserObjectMD.ManageSeries = oManageSeries
        oUserObjectMD.Code = strUID
        oUserObjectMD.Name = strName
        oUserObjectMD.TableName = strTableName
        oUserObjectMD.ObjectType = oObjectType
        If Not alSubTables Is Nothing Then
            For Each strSubTableName As String In alSubTables
                oUserObjectMD.ChildTables.TableName = strSubTableName
                oUserObjectMD.ChildTables.Add()
            Next
        End If

        If oCanFind = SAPbobsCOM.BoYesNoEnum.tYES Then
            If Not alSearchColums Is Nothing Then
                For Each strSeachColumn As String In alSearchColums
                    oUserObjectMD.FindColumns.ColumnAlias = strSeachColumn
                    oUserObjectMD.FindColumns.Add()
                Next
            End If


        End If





        iReturnCode = oUserObjectMD.Add()

        '// check for errors in the process
        If iReturnCode <> 0 Then
            If iReturnCode = -1 Then
            Else
                oCompany.GetLastError(iReturnCode, strErrMsg)
                MsgBox(strErrMsg)
            End If
        Else
            MsgBox("UDO: " & oUserObjectMD.Name & " was added successfully")
        End If

        oUserObjectMD = Nothing
        GC.Collect()        'Release the handle to the table
    End Sub

Former Member
0 Kudos

Hi Christian Gollobich

Thanks for your reply

Yeah i tried your code, but the my form still does not navigate through the child table. Is there anything else to declare?

Former Member
0 Kudos

Nevermind... i figured out why it is not working

i left out the object type in the screen painter

I am kinda new in screen painter, so if anyone could just brief me on some of this terms used in screen painter.

under the form category,

So the 'object type' in the screen painter have to tied down with the UDO table name?

what is the type, unique id and auto managed used for?

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

did you defined Subtables in your UDO ?

If not, the Line-Table won't be readed.

Regards,

Chrisitan