cancel
Showing results for 
Search instead for 
Did you mean: 

Intercept click on a message box

Former Member
0 Kudos

Hi

can I intercept a click on the confirm button of a message box?

thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rita,

I am new to UI and hope to understand your question;

I think that is possible to intercept a button CLICK on a message box.

You can use this sample code:

Dim rc As Integer

' send message box

rc = SBO_Application.MessageBox("Test ONE: ", , , "NO", "Cancel")

' intercept message click

Select Case rc

Case 1

SBO_Application.SetStatusBarMessage ("Button OK")

Case 2

SBO_Application.SetStatusBarMessage ("Button NO")

Case 3

SBO_Application.SetStatusBarMessage ("Button Cancel")

End Select

Bye,

Roberto

PS: You may look the helloworld sample in the UI samples.

Former Member
0 Kudos

Thanks

my problem is on a system form and with system message. For example when I save an invoice (form 133) SAPBO shows a message that asks to confirm the document; can I intercept the click on this message?

Rita

Former Member
0 Kudos

Hi,

I think you could use some kind of trick for these. As the messagebox form would be the last shown form,and you can´t open another form while clicking something, its ID would be the biggest one. If this suposition is true (if you know that this is not correct, post it!), you can code a program which handles the click event of the biggest ID form in the application.

Perhaps it´s not very good about performance, but does what you are looking for.

Regards,

Ibai Peñ

Former Member
0 Kudos

Hi,

the ID of the invoice form is F_16, the ID of the messagebox form is F_19... I try your solution.

Thanks

Former Member
0 Kudos

Be carefull, becouse the ID is not allways the same. Remove the starting 'F_' and the messabegox'es ID would be the biggest number.

Regards,

Ibai Peñ

Former Member
0 Kudos

Ok...

I try to explain your message with an example to verify if I know it.

Rita