Inserting a Message Check  

You can insert code that checks whether the system has sent a message. If the program finds a message, it displays:

Dim msg1 As String
If Sap.MessageFlag Then
' MsgBox Sap.Message
msg1 = Sap.Message
End If

This code is useful for trapping success or error messages. For example, the generated program can identify that an operation has succeeded and display it to the user.