Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem in add values to matrix

Dear All,

I have designed a screen using screen painter,Add the values to the form am using the following code

Private Sub AddValuesToMatrixFromCRL(ByRef code As String, ByRef name As String)


oMatrix = oForm.Items.Item("41").Specific


oForm.DataSources.DataTables.Item("DATA").ExecuteQuery("SELECT T1.[LineNum], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[Price], T1.[LineTotal] FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry AND DocNum = 'DocNum'")

oMatrix.Columns.Item("V_0").DataBind.Bind("DATA", "LineNum")

oMatrix.Columns.Item("V_1").DataBind.Bind("DATA", "ItemCode")

oMatrix.Columns.Item("V_2").DataBind.Bind("DATA", "Dscription")

oMatrix.Columns.Item("V_4").DataBind.Bind("DATA", "Price")

oMatrix.Columns.Item("V_11").DataBind.Bind("DATA", "LineTotal")




oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single

If oMatrix.RowCount >= 1 Then

oMatrix.SelectRow(1, True, False)

End If

Catch ex As Exception

SBO_Application.MessageBox("AddValuesToMatrixFromCRL :" & ex.Message)

End Try

End Sub

But when am executing the program values not added to the matrix



Former Member

Hello Guru,

I think the problem locates in the SQL ('DocNum'), marked as bold below:

SELECT T1.LineNum, T1.ItemCode, T1.Dscription, T1.Quantity, T1.Price, T1.LineTotal FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry AND DocNum = 'DocNum'"

Kind Regards, Yatsea

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question