Anfang des Inhaltsbereichs

Objektdokumentation SAPServer Class Dokument im Navigationsbaum lokalisieren

The SAPServerclass is generated for you by the SAPWSDL file and the SAPConnectorGenerator custom tool in Visual Studio. In addition to the classes which are maintained by the custom tool an additional class SAPProxy1Impl.cs is created as an example and starting point for the server implementation. You can overwrite and modify it as required.

The SAPServer class should be used together with the SAPServerHost class.

 

[C#]

public class SAPServer : System.ComponentModel.Component

 

Public Constructors

public SAPServer (System.String programId , System.String gwhost , System.String sapgwxx , System.String codepage , SAP.Connector.SAPServerHost host)

Creates an instance of SAPServer and adds it to the SAPServerHost instance you specify. You specify the connection parameters individually.

public SAPServer (string[ ] args , SAP.Connector.SAPServerHost host)

Creates an instance of SAPServer and adds it to the SAPServerHost instance you specify. You specify the connection parameters in the command line arguments array (args).

public SAPServer (string[ ] args)

Same as above except it does not add the server to the SAPServerHost.

public SAPServer (System.String connectionString , SAP.Connector.SAPServerHost host)

Creates an instance of SAPServer and adds it to the SAPServerHost instance you specify. You specify the connection parameters individually

public SAPServer (System.String programId , System.String gwhost , System.String sapgwxx , System.String codepage)

Same as above except it does not add the server to the SAPServerHost.

public SAPServer (System.String connectionString)

Creates an instance of SAPServer with a connection string (for example,  –a<PROGID> -g<gw host server> -x<gateway service> (optional –c<codepage#>). Does not add the server to a host.

public SAPServer ( )

Creates an instance of SAPServer but does nothing else. You have to set connection properties and optionally a host in a separate step.

 

Public Methods

public virtual System.Int32 CheckTransaction (SAP.Connector.RfcTID tid)

See SAPServer and TRFC.

public virtual System.Int32 CommitTransaction (SAP.Connector.RfcTID tid)

See SAPServer and TRFC.

public virtual System.Int32 ConfirmTransaction (SAP.Connector.RfcTID tid)

See SAPServer and TRFC.

public void Continue ( )

Resumes the server after being paused.

public void Pause ( )

Pauses the server.

public virtual void RollbackTransaction (SAP.Connector.RfcTID tid)

See SAPServer and TRFC.

public void Start ( )

Starts the server. This is normally the first step after creating the server(s).

public void Stop ( )

Stops the server.

 

Public Properties

public string ProgramID [ get, set ]

The program ID as registered on the SAPGateway and in the TRFC destination (transaction SM59). For example myProgID. This is case sensitive!

public string SAPCodepage [ get, set ]

Optional - the codepage to use (for example . 4103). Code page 4103 is Unicode (UTF16). If the SAP system you are communicating with is not Unicode (for example release 4.6 Kanji) you may need to change this value.

public string SAPGatewayHost [ get, set ]

The name of the SAP Gateway host (for example PCINTEL11).

public string SAPGatewayService [ get, set ]

The name of the SAP Gateway service (for example sapgw00).

 

Example

See the sample RFCServerConsole for an RFC server implementation of RFC_CUSTOMER_GET.

 

Ende des Inhaltsbereichs