Skip to Content

how to set the line number by comparing the value of a header field with a column of the matrix

Nov 01, 2016 at 03:08 PM


avatar image
Former Member

Hi experts I need validate if codebars of item is equals of codebars into OITM in a line of Pick List, i create a label on the header of the pick list and the ideia is on every item if this label is populate, i compare if the value is equal of one of items of matrix and increment one quantity on the respective itemcode of line of matrix, but i'm not understanding how to select the specific row.

Case SAPbouiCOM.BoEventTypes.et_VALIDATE And pVal.FormTypeEx = "85" And pVal.BeforeAction = False Dim oForm As SAPbouiCOM.Form = Nothing Dim oMatrix As SAPbouiCOM.Matrix = Nothing Dim row As Integer = Nothing Dim oPick As String = Nothing Dim oCol As SAPbouiCOM.Column = Nothing Dim oColumns As String = Nothing Dim oItem As String = Nothing oForm = SBO_Application.Forms.ActiveForm() oMatrix = oForm.Items.Item("11").Specific Dim oTab As String = oMatrix.TabOrder Dim oQtd As Double = 0 Dim oQtdPV As Double = 0 Dim oItemCode As String = Nothing Dim oCodeBar As String = Nothing Dim oEdit As SAPbouiCOM.EditText = Nothing 'Dim oColumn As SAPbouiCOM.IColumn If oForm.Items.Item("EDC_Valida").Specific.Value <> "" Then row = oMatrix.GetCellFocus.rowIndex Dim oCodeBarDoc As String = Nothing oItemCode = oMatrix.Columns.Item("12").Cells.Item(row).Specific.Value() oRecSet.DoQuery(String.Format("select codebars from OITM where ItemCode ='{0}' ", oItemCode)) oCodeBar = oRecSet.Fields.Item("codebars").Value.ToString oCodeBarDoc = oForm.Items.Item("EDC_Valida").Specific.Value 'row = oMatrix.SetCellFocus(rowIndex:="1", ColumnIndex:=oItemCode) oQtd = oMatrix.Columns.Item("19").Cells.Item(row).Specific.Value() oQtdPV = oMatrix.Columns.Item("9").Cells.Item(row).Specific.Value() If oCodeBar = oCodeBarDoc And oQtd < oQtdPV Then 'If oCodeBar = oMatrix.Columns.Item("U_DC_CodBarras").Cells.Item(row).Specific.Value() And oQtd > oQtdPV Then ' SBO_Application.MessageBox("Quantidade maior que a solicitada no Picking") Dim oSoma As Double = 1 Dim oQtdValida As Double = Replace(oMatrix.Columns.Item("19").Cells.Item(row).Specific.Value(), "0", "") BubbleEvent = False ' SBO_Application.MessageBox("Verifique as Quantidades do Picking, ainda faltam linhas a serem validadas") oForm.Items.Item("EDC_Valida").Specific.Value = "" 'oSoma = oSoma + 1 oQtdValida = oQtdValida + oSoma oMatrix.Columns.Item("19").Cells.Item(row).Specific.Value() = oQtdValida Exit Sub ' oMatrix.Columns.Enable("19") = False End If

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers