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

Drag and Relate on user forms? No matching records found!

Hi,

when i'm using the drag and relate functionality no matching records are found (Cardcode --> Quotations).

Could it be that this feature is not supported by user forms ?

regards

Markus

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 01, 2008 at 10:59 AM

    Hi Markus,

    Even if you have connected your field into a DBDatasource, the drag and relate is working. Otherwise

    (linked button with given linkedobjecttype) also unfortunatelly not working. (how the system know the

    input for the Drag and Relate)?

    Hereby I am attached a samle code

    Sub CreateForm_ForDragAndRelate()
    
            Dim oForm As SAPbouiCOM.Form = sbo_application.Forms.Add("TEST_DD")
            oForm.Visible = True
    
            Dim oitem As SAPbouiCOM.Item = oForm.Items.Add("1", BoFormItemTypes.it_BUTTON)
            With oitem
                .Top = oForm.Height - 60
                .Left = 5
                .Width = 80
            End With
            oitem = oForm.Items.Add("2", BoFormItemTypes.it_BUTTON)
            With oitem
                .Top = oForm.Height - 60
                .Left = 5 + 80 + 1
                .Width = 80
            End With
    
            oitem = oForm.Items.Add("MTX", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
            With oitem
                .Top = 5
                .Left = 5
                .Width = oForm.Width - 15
                .Height = oForm.Height - 15
                .AffectsFormMode = False
            End With
            '
            Dim oMatrix As SAPbouiCOM.Matrix = oitem.Specific
            Dim oColumns As SAPbouiCOM.Columns = oMatrix.Columns
            Dim oDBDataSource As DBDataSource = oForm.DataSources.DBDataSources.Add("OCRD")
    
            Dim oColumn As SAPbouiCOM.Column = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            With oColumn
                .TitleObject.Caption = "#"
                .Description = .TitleObject.Caption
                .Width = 30
                '.DataBind.SetBound(True, "OCRD", "CARDCODE")
                .Editable = False
            End With
    
            oColumn = oColumns.Add("COL1", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            With oColumn
                .Width = 80
                .TitleObject.Caption = "CardName"
                .Description = .TitleObject.Caption
                .Editable = False
                .DataBind.SetBound(True, "OCRD", "CARDCODE")
                .DisplayDesc = True
                .Visible = True
            End With
            oColumn = oColumns.Add("COL2", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            With oColumn
                .Width = 80
                .TitleObject.Caption = "CardName"
                .Description = .TitleObject.Caption
                .Editable = False
                .DataBind.SetBound(True, "OCRD", "CARDNAME")
                .DisplayDesc = True
                .Visible = True
            End With
            oColumn = oColumns.Add("COL3", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
            With oColumn
                .Width = 80
                .TitleObject.Caption = "TYPE"
                .Description = .TitleObject.Caption
                .Editable = False
                .DataBind.SetBound(True, "OCRD", "CARDTYPE")
                .DisplayDesc = True
                .Visible = True
            End With
            oColumn = oColumns.Add("COL4", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            With oColumn
                .Width = 80
                .TitleObject.Caption = "BALANCE"
                .Description = .TitleObject.Caption
                .Editable = False
                .DataBind.SetBound(True, "OCRD", "Balance")
                .DisplayDesc = True
                .Visible = True
            End With
    
            oDBDataSource.Query()
            oMatrix.LoadFromDataSource()
    
        End Sub
    

    Regards,

    Janos

    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.