cancel
Showing results for 
Search instead for 
Did you mean: 

Change Event

Former Member
0 Kudos

Hi

First I wanna say that i'm getting great support from this forum here -> Thanks!

I've tried to catch change events of an editText-Control in the orderline - grid.

It works when enter values manually but doesn't work when a default value get set (eg. after selecting an item).

It's important that I get every changed/new value because I'll do some calculations with the current sum of those columns.

For now I rely on LostFocus events on different columns just to make sure that i catch changes in one column that maybe doesn't get/lost Focus.

And what about an rowChanged Event? Could be useful too.

Greetings

Phil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello

use et_VALIDATE instead of et_LOST_FOCUS

it will be fired off whenever a new value is being validated in the cell

and will be much better from performance aspects

Regards, Avi.

Former Member
0 Kudos

I prefer et_VALIDATE also, but I usually check to see if the value has really changed, because this event fires more often than I would like. I used et_GOT_FOCUS to save the starting value and update the saved value if it passes the et_VALIDATE event.

Bruce Harold

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Thanks for the explanations. When I change the Value of another Control within the et_Validate - Event , SBO hangs.

Steps to reproduce the behaviour:

- Use the Filter Events Sample

- For the order Form check:

<SNIP>

If pVal.BeforeAction = False And pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE And pVal.ItemUID = "38" And pVal.ColUID = "58" Then

txtGesGew = frm.Items.Item("14").Specific

txtGesGew.Value = "Test"

End If

</SNIP>

Then open an order and enter a value into the Weight-Column.

When I do not set the control value it works.

By the way I don't get an et_VALIDATE event for the default values but I think this is by design?

oops: I'm using VB.NET

Greetings

Phil

Message was edited by: Philipp Knecht

Former Member
0 Kudos

Any news on this?

And Bruce thanks for the tip. Does this work with more than one form open that are throwing events?

Greets

Phil

Message was edited by: Philipp Knecht

Former Member
0 Kudos

Philipp,

I track the last item separately for each form instance. I have a different handler object for each form so that the data is not all jumbled together. I use another class to get the events and pass them to appropriate handlers.

--Bruce

Former Member
0 Kudos

Hi all,

SBO fires VALIDATE event more than once and I use a trick:

Public Instances as Integer

If pVal.FormType = 140 Then

If pVal.ItemUID = "38" Then

If pVal.ColUID = "1" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE And pVal.Before_Action = False Then

oForm = SBO_Application.Forms.GetFormByTypeAndCount(140, pVal.FormTypeCount)

oMatrix = oForm.Items.Item("38").Specific

GetIskaot(oForm, oMatrix, pVal.Row)

End If

End If

End If

Private Sub GetIskaot(ByRef oForm As SAPbouiCOM.Form, ByRef oMatrix As SAPbouiCOM.Matrix, ByVal NRow As Integer)

If Instances <> 0 Then Exit Sub

Instances = 1

.

.

.

Instances = 0

End Sub

It's a real example that works fine

Regards,

Mark

Message was edited by: Mark Gulyansky

Former Member
0 Kudos

Hi Bruce and Mark

Thanks for the tips. I like the idea of different handler objects.

Sadly it's just not possible to manipulate a .text property of another control within an controls et_validate - event.

Maybe i have to set the property later then in the lost focus - event or so...

Anyhow imho event errors are making SBO UI develoment complicated and hard to maintain because of the workarounds.

Greets

Phil