Skip to Content
0
Former Member
Sep 07, 2010 at 02:24 PM

Bubbleevent work fine?

11 Views

UPPSS.... sorry for html format!!

Repeat a message:

hi experts, I have an innusual problem with bubbleevent

Public Function F149_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent) 
    As Boolean
   ' Formulario Ofertas venta Dim x As Integer 
Try 
   oForm = oApplication.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount) 
   If pVal.Before_Action = True Then 
       F149_ItemEvent = True 'amm 20100907 DEBUGGING 
       Select Case pVal.EventType 
         Case SAPbouiCOM.BoEventTypes.et_VALIDATE 
            Select Case pVal.ItemUID 
                Case "4" 'cardcode 20100907 DEBUGGING  probar... que el bubbleevent va ok?? 
                          F149_ItemEvent = False 
            End Select 
       End Select 
   Else '(before_action = false) 
      Select Case pVal.EventType 
          Case SAPbouiCOM.BoEventTypes.et_VALIDATE 
                 Select Case pVal.ItemUID 
                       Case "4" 'CardCode 
                             If pVal.InnerEvent = False Then
                                     ... code here (ALWAYS EXECUTE!!!!??) 
                             End If 
                  End Select 
       End Select 
  End If 
 Catch ex As Exception 
        F149_ItemEvent = False 
        GestionError("F149_ItemEvent", ex) 
 End Try 
End Function

In Main.vb i have an Itemevent Controller:

Private Sub oApplication_ItemEvent(ByVal FormUID As String, ByRef pVal As 
  SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) 
  Handles oApplication.ItemEvent Dim FormType As String 
Try 
  If pVal.EventType SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD And _ 
           pVal.EventType SAPbouiCOM.BoEventTypes.et_FORM_ACTIVATE _ Then 
    FormType = IIf(pVal.FormType = 0, FormUID.Substring(0, 3), pVal.FormType) 
    Select Case FormType 
           Case "149" ' Ofertas de venta 
           BubbleEvent = F149_ItemEvent(FormUID, pVal) 
     End Select 
End If 
Catch ex As Exception 
    GestionError("Application_ItemEvent(" + FormUID + ", " + pVal.EventType.ToString + ")", ex) 

 End Try
End Sub

As you can see... i put bubbleevent always "FALSE" (via F149_Itemevent=false) for debug.... so addon ALWAYS EXECUTE!!!!?? the part of before_Action=false??

what i doing wrong??? I miss something?

thanks in advanced & kind regards