cancel
Showing results for 
Search instead for 
Did you mean: 

What event trigger the cancel document?

Former Member
0 Kudos

May I know what event can I use to check if user cancel the document?

I need to update some table status when user right click the Purchase Order to cancel the document.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi.

Can u plz try this code under menu click event...

  Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent

        Try

            If pVal.BeforeAction = True Then

                Select Case pVal.MenuUID

                    Case "1284"

                        oForm = SBO_Application.Forms.ActiveForm

                        If (oForm.TypeEx = "142") Then

                            SBO_Application.SetStatusBarMessage("You Dont have the Permission to Cancel the Document...", SAPbouiCOM.BoMessageTime.bmt_Short, True)

                            BubbleEvent = False

                        End If

                End Select

            End If

        Catch ex As Exception

            SBO_Application.MessageBox(ex.Message)

        End Try

end sub

Former Member
0 Kudos

Thank you very much.. it works for me..

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Eric,

I have used FORM_DATA_UPDATE Event while I was writing code for Outgoing Payment (after Cancelling the Outgoing Payment I wanted to update User Table)

I think you can use the same.

Hope it helps.

Thanks & Regards

Ankit Chauhan