Platforms to show: All Mac Windows Linux Cross-Platform

Back to RFCConnectionMBS class.

RFCConnectionMBS.CachedClassDescription(repositoryID as String, Name as String) as RFCClassDescriptionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Looks for a cached class description.

This API should be used with care and is only for special scenarios, for example: 1. You know for sure, that a class description has already been cached via ClassDescription(), and don't want to open an extra rfcHandle that will never be used. In this case simply use the SAP System ID as the repositoryID. 2. You have created a hard-coded repository via RfcAddClassDesc(), which contains classes that do not exist in the backend's DDIC.

If repositoryID is "", the "default repository" is used.

repositoryID: System ID of R/3 System, for which this class description has been cached, or "" in case you want to look for it in the default repository.
Name: Name of the class.

RFCConnectionMBS.CachedFunctionDescription(repositoryID as String, Name as String) as RFCFunctionDescriptionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Looks for a cached function description.

This API should be used with care and is only for special scenarios, for example: 1. You know for sure, that a function description has already been cached via FunctionDescription(), and don't want to open an extra rfcHandle that will never be used. In this case simply use the SAP System ID as the repositoryID. 2. You have created a hard-coded repository via AddFunctionDesc(), which contains function modules that do not exist in the backend's DDIC.

If repositoryID is "", the "default repository" is used.

RFCConnectionMBS.CachedTypeDescription(repositoryID as String, Name as String) as RFCTypeDescriptionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Looks for a cached structure/table description.

Similar to TypeDescription(), but it only looks into the cache. Again it should almost never be necessary to get a metadata description of a single structure.

repositoryID: System ID of R/3 System, for which this type description has been cached, or "" in case you want to look for it in the default repository.
Name: Name of the DDIC structure/table.

RFCConnectionMBS.Cancel

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Cancels the RFC call which is currently being called over the given RFC connection and closes the connection.

Can be used only on an RFC client connection and needs to be called from a different thread than the one currently executing the RFC call.

RFCConnectionMBS.ClassDescription(Name as String) as RFCClassDescriptionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the class description that is valid for the system to which connection points to.

If the class description is already in the repository cache for that system ID, it will be returned immediately (from the cache), otherwise it will be looked up in the system's DDIC using the rfcHandle. The result from the DDIC lookup will then be placed into the cache for later use.

The RFC Runtime maintains a cache for every R/3 System ID, as the meta data could be different from R/3 release to R/3 release. This is the main API that should be used.

Name: Name of the class to look up.

RFCConnectionMBS.ClearRepository(repositoryID as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes all metadata from the repository cache of the specified R/3 System.

If repositoryID is "", the "default repository" is cleared.

RFCConnectionMBS.Constructor(LoginParams as Dictionary)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens an RFC client connection for invoking ABAP function modules in an R/3 backend.
Example
Dim loginParams As New Dictionary
loginParams.Value("ashost") = "hostname"
loginParams.Value("sysnr") = "05"
loginParams.Value("client") = "800"
loginParams.Value("user") = "user"
loginParams.Value("passwd") = "****"
loginParams.Value("lang") = "EN"

Dim connection As New RFCConnectionMBS(loginParams)

Opens a client connection to an SAP System. The connectionParams may contain the following name-value pairs:

client, user, passwd, lang, trace and additionally one of

1. Direct application server logon: ashost, sysnr.
2. Logon with load balancing: mshost, msserv, sysid, group.
msserv is needed only, if the service of the message server is not defined as sapms<SYSID> in /etc/services.

When logging on with SNC, user&passwd are to be replaced by

snc_qop, snc_myname, snc_partnername and optionally snc_lib.
(If snc_lib is not specified, the underlying SNC layer uses the "global" GSS library defined via environment variable SNC_LIB or SNC_LIB_64.)

When logging on with SSO Ticket, you can use mysapsso2 instead of user&passwd. The old SSO format (mysapsso) is no longer supported.

Alternatively the connection parameters can be defined in the config file sapnwrfc.ini. In this case you just pass the parameter dest=... and all parameters that are missing in the sapnwrfc.ini entry into RfcOpenConnection().

For a complete list of logon parameters to be used in connectionParams as well as in the sapnwrfc.ini file, see the sample sapnwrfc.ini file in the SDK's demo folder.

If the logon was ok, constructor returns with a new object, otherwise an exception is raised.

RFCConnectionMBS.CreateFunction(Name as String) as RFCFunctionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a data container that can be used to execute function calls in the backend via Invoke.

The importing parameters can be set using the Value() properties. After the RfcInvoke call returned successfully, the exporting parameters can be read from this data container via the Value() properties.

RFCConnectionMBS.CreateTransaction(TransactionID as String, QueueName as String) as RFCTransactionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a container for executing a (multi-step) transactional call.

TransactionID: trasanction ID used to identify the transaction;
queueName: queue name associated with the transaction. If it is "" or empty, the transaction is for tRfc

RFCConnectionMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The destructor.

Closes an RFC connection.

RFCConnectionMBS.FunctionDescription(Name as String) as RFCFunctionDescriptionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the function description that is valid for the system to which connection points to.
Example
Dim fd As RFCFunctionDescriptionMBS = connection.FunctionDescription("BAPI_COMPANY_GETDETAIL")

If the function description is already in the repository cache for that system ID, it will be returned immediately (from the cache), otherwise it will be looked up in the system's DDIC using the connection. The result from the DDIC lookup will then be placed in the cache. The RFC Runtime maintains a cache for every SAP System ID, as the meta data may be different depending on the SAP release. This is the main API that should be used.

Some examples using this method:

RFCConnectionMBS.isConnected as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Checks if we are connected.

Same as Ping, but returns boolean and does not raise exception.

RFCConnectionMBS.Ping

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Ping the remote communication partner through the passed connection handle.

Sends a ping to the backend in order to check, whether the connection is still alive. Can be used on both, client connections as well as server connections.

RFCConnectionMBS.ResetServerContext

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Resets the SAP server context ("user context / ABAP session context") associated with the given client connection, but does not close the connection.

RFCConnectionMBS.TransactionID as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Retrieves a unique 24-digit transaction ID from the backend.

RFCConnectionMBS.TypeDescription(Name as String) as RFCTypeDescriptionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RFC MBS Tools Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the structure description that is valid for the system to which connection points to.

If the structure description is already in the repository cache for that system ID, it will be returned immediately (from the cache), otherwise it will be looked up in the system's DDIC using the rfcHandle. The result from the DDIC lookup will then be placed into the cache for later use.

The RFC Runtime maintains a cache for every R/3 System ID, as the meta data could be different from R/3 release to R/3 release.

Note
Normally it should not be necessary to lookup separate structure descriptions. They are already looked up as part of the function module, in which they are used.

Name: Name of a DDIC structure or table.

The items on this page are in the following plugins: MBS Tools Plugin.


The biggest plugin in space...