Skip to Content
0
Former Member
Oct 22, 2008 at 05:25 AM

what is the code for checking the negative value before adding .

9 Views

Hi,

Can anybody help me what is the code for checking the negative value before adding .I have tried this code its working but 1st it adds then its checking the condition .

If pVal.FormType = "139" And pVal.FormMode = "1" And pVal.ItemUID = "38" And pVal.ActionSuccess = False And pVal.BeforeAction = True Then

Try

Dim oMatrix As SAPbouiCOM.Matrix

oMatrix = oApplication.Forms.GetForm(pVal.FormType, pVal.FormTypeCount).Items.Item("38").Specific

If oMatrix.Columns.Item("15").Cells.Item(pVal.Row).Specific.Value < 0 Then

oApplication.SetStatusBarMessage(" You Cannot enter the negative value", SAPbouiCOM.BoMessageTime.bmt_Short)

End If

End If

'oForm.Freeze(False)

Catch ex As Exception

End Try

End If

Regards,

Ruheena Tasneem