Dear All,
Today , We will see, How to Split string Price in Matrix SAP B1
Today , We will see, How to Split string Price in Matrix SAP B1
Public Function SAPPriceSpliter(ByVal aForm As SAPbouiCOM.Form, ByVal aMatrixUid As Object, ByVal oColId As Object, ByVal oRowId As Object) As Double
'**********************************************
' Declare Local Variable
'**********************************************
Dim oMatrix As SAPbouiCOM.Matrix = Nothing
Dim dblPurPrice As Double = 0
'**********************************************
oMatrix = aForm.Items.Item(aMatrixUid).Specific
Try
Dim result As String = Regex.Replace(oMatrix.Columns.Item(oColId).Cells.Item(oRowId).Specific.Value, "[a-zA-Z\s]+", String.Empty)
dblPurPrice = Convert.ToDouble(result)
Catch ex As Exception
dblPurPrice = 0
Finally
If oMatrix IsNot Nothing Then
oMatrix = Nothing
End If
End Try
Return dblPurPrice
End Function