Anfang des Inhaltsbereichs

Objektdokumentation SAPTable Class Dokument im Navigationsbaum lokalisieren

The SAPTable class represents a very common data type in the SAP system and is frequently used to hold the results of the RFC call. It is occasionally used to pass in selection variables to the RFC call. A SAPTable is made of SAPStructures of a single type. For example a SAPTable called RFCFuncTable would be made up of RFCFunc structures (rows).

 

[C#]

public class SAPTable : System.Collections.CollectionBase

 

Public Constructors

protected SAPTable ( )

Creates a new instance of SAP Table. You should use the SAP table control to reference SAP Tables in your code. The SAP table will be created automatically by the connector.

 

Public Methods

Add (SAPStructure)

Adds a new row (SAPStructure) to the table

Contains(SAPStructure)

Returns true if the SAPTable contains that row

CopyTo(SAPStructure[ ],int)

Copies into a SAPStructure array up to the given index

CreateNewRow()

Creates a new blank row in the SAPTable

GetElementType()

Returns the type of the particular SAPStructure (for example,  RFCFunc or other SAP structure)

IndexOf(SAPStructure)

Returns the current index ID

Insert(int, SAPStructure)

Inserts at the index given a SAP structure

Remove(SAPStructure)

Removes the SAP structure specified from the table

SortBy(string fieldname, string direction)

The SAP table now supports sorting, for example in a datagrid.

ToADODataTable

Creates a new ADO .NET DataTable from the SAP Table.

FromADODataTable

Creates the SAP Table from an ADO .NET DataTable. Note that the schemas must be IDENTICAL.

 

Public Properties

This[int]

An indexer to get access to the current SAP structure

 

Example

See the Winform sample for examples of using the SAPTable class.

 

Ende des Inhaltsbereichs