cancel
Showing results for 
Search instead for 
Did you mean: 

System Form 0

Former Member
0 Kudos

Hi,

I have a UDO Form of document type. When I close the form using the close menu , I get a System Form 0 dialog Box with options Yes, No and Cancel to save the record. I have written code for validation, but this code is not executed when I press Yes and the blank record gets saved. Please let me know how to handle the System Form 0 ?

Regards,

Noor Hussain

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Closed

Former Member
0 Kudos

Hi noor_023,

Dim j As Integer = oApplication.MessageBox("Do you want to Add?", 1, "YES", "NO")
 If j = 1 Then
...
...
...
End If

Regards,

Mahesh

Edited by: Mahesh on Jul 2, 2010 2:02 PM

Former Member
0 Kudos

I did this once before along time ago and I don't remember where the code is, but I believe it works just like any other form. Are you setting the filters for the form & events?

Also, this form is used all over the place, so you will need to be sure you are only processing that button when it applies to your form and not when it's being displayed on some other system forms.

Former Member
0 Kudos

Hi John,

Thanks for your time. I am not using any form or event filters. Please if you could post your code here.

Regards,

Noor hussain

Edited by: noor_023 on Jun 29, 2010 10:06 AM

Former Member
0 Kudos

Private Sub SetFilters()

Try

'// Create a new EventFilters object

oFilters = New SAPbouiCOM.EventFilters()

oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_FORM_LOAD)

oFilter.AddEx("0")

.

.

.

SBO_Application.SetFilter(oFilters)

End Sub

Protected Sub FormLoadEvents(ByVal FUID As String, ByVal pVal As SAPbouiCOM.ItemEvent)

Select Case pVal.FormType

Case "0" ' MESSAGE BOX

MessageBoxLoadEvents(FUID, pVal)

End Select

End Sub

Protected Sub MessageBoxLoadEvents(ByVal FUID As String, ByVal pVal As SAPbouiCOM.ItemEvent)

.

.

.

End Sub

Edited by: Gianluca D'Alessandro on Jun 29, 2010 12:43 PM

Edited by: Gianluca D'Alessandro on Jun 29, 2010 12:45 PM