on 04-07-2009 6:51 AM
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)
Try
oMatrix = oForm.Items.Item("41").Specific
oMatrix.Clear()
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.Clear()
oMatrix.LoadFromDataSource()
oMatrix.AutoResizeColumns()
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
Regards,
Guru
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
7 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.