Welcome Notes

Welcome Viewers

13 April 2017

Set Current Date Matrix Row SAP B1

Dear All,
   Today we will see "How to set Current Date in Matrix Row " using SAP SDK


    ''' <summary>
    ''' To Set Current Date in Matrix Column 
    ''' </summary>
    ''' <param name="oForm">Pass Form Name</param>
    ''' <param name="strMatrixUID">Pass Matrix ID</param>
    ''' <param name="strColUID">Pass Column ID</param>
    ''' <param name="intRowNumber">Pass Row Number</param>
    ''' <remarks></remarks>
    Friend Sub SetCurrentDateInMatrix(ByVal oForm As SAPbouiCOM.Form, ByVal strMatrixUID As String, ByVal strColUID As String, ByVal intRowNumber As Integer)
        Try
            Dim oMatrix As SAPbouiCOM.Matrix = Nothing
            Dim oETDate As SAPbouiCOM.EditText = Nothing
            oMatrix = oForm.Items.Item(strMatrixUID).Specific
            oETDate = oMatrix.Columns.Item(strColUID).Cells.Item(intRowNumber).Specific
            ' oMatrix.Columns.Item(strColUID).Cells.Item(intRowNumber).Specific.Value = String2date(DateTime.Now.ToString("dd-MM-yyyy"))
            oETDate.String = DateTime.Now.ToString("dd-MM-yyyy", CultureInfo.CurrentCulture)


        Catch ex As Exception

        End Try
    End Sub