Hi Ankit,
I appended your code (for checking whether the user has clicked YES on the ReconciliationScreen) to my code (for opening the SAP B1 Reconciliation Screen).
I am very pleased to inform you that the arrangement works perfectly, much to my amazement!
I only made a few minor adjustments to your code, which now reads as follows:
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
If pVal.BeforeAction = False And pVal.FormType = 0 Then
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK = True Then
Dim oMessageForm As SAPbouiCOM.Form
oMessageForm = SBO_Application.Forms.Item(pVal.FormUID)
Dim oitem As SAPbouiCOM.Item
For Each oitem In oMessageForm.Items
If SAPbouiCOM.BoFormItemTypes.it_STATIC And oitem.UniqueID = "7" Then
Dim oStatic As SAPbouiCOM.StaticText
oStatic = oMessageForm.Items.Item("7").Specific
If (oStatic.Caption = "Reconcile the selected transactions?" And pVal.ItemUID = "1") Then
SBO_Application.MessageBox("OK")
Exit For
End If
End If
Next
End If
End If
========
The only problem is that I chose a simple code to test if my code is executed:
SBO_Application.MessageBox("OK")
It fires many times, and the reason is that it's a message box.
Once I will have replaced it by my real code, the problem will disappear
So, many many thanks for helping me to do something which I thought was impossible.
Best Regards
Leon