Skip to Content

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

Validation in the matrix........

Hi Experts,

I have a doubt regarding validation in the matrix....this is my coding for validating the column if the code is NULL.

Private Function ValidateTM(ByRef oForm As Form,
 ByRef BubbleEvent As Boolean) As Boolean
Try
  Dim oMatrix As Matrix
  Dim oCode As EditText
  Dim oName As EditText
  Dim iCnt As Integer

 oMatrix = oForm.Items.Item("3").Specific
 For iCnt = 1 To oMatrix.RowCount - 1
 oCode = oMatrix.Columns.Item("Code").Cells.Item(iCnt).Specific
oName = oMatrix.Columns.Item("Name").Cells.Item(iCnt).Specific
                If oCode.Value = "" Then
                    oCode.Active = True
 objSBO_Application_Mas.MessageBox("Row : " & iCnt.ToString & " Code is missing")
  oMatrix.Columns.Item("Code").Cells.Item(iCnt).Click
(BoCellClickType.ct_Regular)
                  Return False
                End If
                If oName.Value = "" Then
                    oName.Active = True
                    
objSBO_Application_Mas.MessageBox("Row : " & iCnt.ToString & " Name is missing")
      oMatrix.Columns.Item("Name").Cells.Item(iCnt).Click
(BoCellClickType.ct_Regular)
                
                    Return False
                End If
            Next
            Return True
        Catch ex As Exception
            objSBO_Application_Mas.MessageBox(ex.ToString)
            Return False
        End Try
    End Function

In this coding all the validations works fine even in the

specific row when the column value is null it's pop

ups a message box that the field is NULL....

now my problem is suppose if *in the

CODE column the value is null,so when

i close(cancel) my form it shouldn't get

canceled...definitely the use should enter

some value......for this i think we have to

use BUBBLE EVENT=FALSE....but i

don't know where to use this bubble

event....* can anybody help me...

regards,

shangai.

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question