Showing results for 
Search instead for 
Did you mean: 

Infinite loop with et_validate and innerevent

Former Member
0 Kudos

I'm trying to set focus to another cell (user field) in the matrix of a 'Goods Receipt'

after ItemCode validation but the program enters an infinite loop.

This is my code:

Case SAPbouiCOM.BoEventTypes.et_VALIDATE

Select Case pVal.ColUID

Case "1"

If Not pVal.BeforeAction Then

If Not pVal.InnerEvent Then

oForm = m_oApp.Forms.Item(FormUID)


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

oEdit = oMatrix.Columns.Item("1").Cells.Item(pVal.Row).Specific

Dim sItemCode As String = oEdit.String.Trim

oEdit = Nothing

If sItemCode <> "" Then

If IsItemD(sItemCode) Then



Catch ex As Exception

m_oApp.StatusBar.SetText("Rendere visibile e attiva la colonna 'U_DescSemeRA'", SAPbouiCOM.BoMessageTime.bmt_Long, SAPbouiCOM.BoStatusBarMessageType.smt_Error)

End Try

End If

End If

oMatrix = Nothing


oForm = Nothing

End If

End If

End Select

Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos

Hi Andrea,

Maybe a quicker way to get around this is to change the approach. Rather on the lost_focus event (after event) of that cell - set the focus to your cell.