Get meta data of a table 
From Theobald Software
|
|
The code snippet shows, how to obtain the meta data of a SAP table by using the ReadTable class.
After calling RetrieveAllFieldsOfTable() the Fields collection is filled with detailed information on each column.
[C#]
R3Connection con = new R3Connection("hamlet", 11, "Theobald", "XX", "DE", "800"); con.Open(); ReadTable read = new ReadTable(con); read.TableName = "MKPF"; read.RetrieveAllFieldsOfTable(); for(int i=0; i < read.Fields.Count; i++) Console.WriteLine(read.Fields[i].FieldName + " (" + read.Fields[i].ABAPType + ", " + read.Fields[i].Length + ")"); con.Close();


