on 01-31-2008 3:57 PM
I've recently tested an upgrade to PL 42. There seems to be an issue when trying to exit a function or trying to set return false.
Here is a sample code of what i use to accomplish in previous patches.
...
Case SAPboiuCOM.BoEventTypes.et_VALIDATE
Select Case pVal.ItemUID
Case "matPay"
If pval.InnerEvent Then
do nothing
else
Dim oMatrix as SAPbouiCOM.Matrix = oForm.Items.item(pVal.ItemUID).Specific
Select Case pVal.ColUID
Case "RegHours" : if sglRegHours = oMatrix.Columns.Item(pVal.ColUID).Cells.Item(CInt(val(pval.Row)).Specific.Value then Return False
End Select
No matter what I try here, Return False, Exit Function, it does not work. It keeps executing the rest of the code. And yes, the statement gets executed.
Any one else has found something similar to this odd behavior ?
any comments or suggestions would be greatly appreciated
Edited by: Neftali Figueroa on Jan 31, 2008 10:58 AM
Hi Neftali Figueroa
¿Can you have tried with Exit Select?
The other option you have is replace the case for if.
José Moreno
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
That too. I even tried controlling the process with a boolean variable, and after it executes the statement blnValueChanged = False
it stays True.
Never seen anything like this in my developer life! The funny part is that it only occurs with cells that have values other than zero.
But it makes no sense at all since when I validate for equality the system detects no inequality and executes the statement correctly.
I found a workaround but there's seems to be a nasty bug between .NET and SAP B1 PL 42
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well
I found a workaround for this odd problem. What I did was ... since the evaluation part of the code (if statement) was getting executed right, i changed the statement like this
blnValueEdited = (sglRegHours <> Csgl(oMatrix.Columns.Item(pVal.ColUID).Cells.Item(CInt(val(pval.Row)).Specific.Value ))
and then evaluate the blnValueEdited for true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.