Session
Abstract class representing a connection to the SAP system. An instance of Session cannot be created directly, instead you create an instance of NWRfcSession, SoapSession or RfcSession (see examples).
Properties
Name | Type | Description |
---|---|---|
CallActive |
bool |
True if there is an asynchronous call currently running |
Error |
bool |
True if error occured Note: This property is cleared after reading, e.g. the second call always returns False |
ErrorInfo |
RfcError |
This property contains extended error information |
IsConnected |
bool |
True if currently connected to SAP system |
LicenseData |
LicenseData |
Allows you to set the license data programmatically (instead of using Registry keys) |
LogonData |
LogonData |
Use this property to specify logon data, such as client, user and language |
Option |
Option |
Allows you to set and retrieve additional options, such as trace file location |
SessionType |
string |
Evaluates to RFC or SOAP , depending on the session type |
SystemID |
string |
ID (e.g. "T01") of the SAP system you are connecting to |
TypeCache |
TypeCache |
The TypeCache of this session (this property can be used to share type information between two sessions) |
Methods
Method AbortCall
Abort currently running asynchronous call
Method About
Show information about RFC Connector
Method CallFunction
Parameter | Type | Description |
---|---|---|
call |
FunctionCall |
the call to execute |
synchronous |
bool |
Call a function module |
This function allows you to call a function module
Method ChangePassword
Parameter | Type | Description |
---|---|---|
newPass |
string |
new password for user |
Change the user's password
Method CheckPasswordExpired
Parameter | Type | Description |
---|---|---|
Return Value | bool |
True if user must change his password |
Checks whether the user must change his password
Method Connect
Connect to SAP system
Method CreateCall
Parameter | Type | Description |
---|---|---|
Return Value | FunctionCall |
new FunctionCall object |
Create a new FunctionCall
Method CreateType
Parameter | Type | Description |
---|---|---|
Return Value | RfcType |
new RfcType object |
Create a new RfcType
Method Disconnect
Disconnect from System
Method ImportCall
Parameter | Type | Description |
---|---|---|
moduleName |
string |
|
ignoreUnsupportedParams |
bool |
|
Return Value | FunctionCall |
Function call definition |
New with Rfc Connector 2.0. This function will import the whole function module definition from the backend, eliminating the need to specify parameters manually
Method ImportType
Parameter | Type | Description |
---|---|---|
type |
string |
name of the type to import |
Return Value | RfcType |
the imported type |
This function is deprecated in Rfc Connector 2. Please change your code to use ImportCall() instead of defining module definitions manually.
Events
Event: CallFinished
This event is fired when an asynchronous call has returned from the system