Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3229

Re: How to get Line Number in Purchase Order

$
0
0

Fantastic. I did it like so:

 

Dim oMatrix As SAPbouiCOM.Matrix = Nothing

Dim oCol As SAPbouiCOM.Column = Nothing

Try

    oMatrix = Me.m_oForm.Items.Item(CONSTANTS.SALES_ORDERS_MATRIX).Specific

    Dim sCols As New StringBuilder

    sCols.AppendLine("Numeric Index, Unique ID, TableName, Database Alias")

    For iCol As Integer = 0 To oMatrix.Columns.Count - 1

        oCol = oMatrix.Columns.Item(iCol)

        sCols.AppendLine(iCol.ToString & "," & oCol.UniqueID & "," & oCol.DataBind.TableName & "," & oCol.DataBind.Alias)

    Next

 

    Using sWriter As New StreamWriter("h:\temp\SalesOrderMatrixColumns.csv")

        sWriter.Write(sCols.ToString)

    End Using

Catch ex As Exception

    Me.AddOnApp.SBO_Application.MessageBox("Error in Test button code: " & ex.Message)

Finally

    NewSharedMethods.releaseCOMobject(oMatrix)

    NewSharedMethods.releaseCOMobject(oCol)

End Try

 

And got a nice CSV with all sorts of information. This will be very helpful in the future. Thanks Edy!


Viewing all articles
Browse latest Browse all 3229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>