%R3CONNB

Connects to or disconnects from an SAP system using a profile
Type: batch macro

Syntax

%R3CONNB
(PROFILE=value, LIBREF=value, FUNCTION=open | close, ID=value, SOURCE=value)

Optional Arguments

PROFILE
identifies the name of the profile that contains the information used in the Logon to R/3 window.
LIBREF
identifies the SAS library containing the LIBREF.R3CONN data set. This data set contains the logon parameters defined for the profile.
FUNCTION
specifies whether you want to open or close the connection to the R/3 system. Valid values are
  • OPEN
  • CLOSE
ID
specifies the connection ID that is associated with the profile.
Note: This parameter was defined for previous versions of this macro and is supported in this release for backward compatibility. However, it is recommended that this parameter not be used.
SOURCE
specifies the logon parameters that are defined in SOURCE type catalog entries. Although the SOURCE parameter is supported in this version, logon parameters should now be defined in profiles that are stored in a SAS data set.
Note: This parameter was defined for previous versions of this macro and is supported in this release for backward compatibility. However, it is recommended that this parameter not be used.

Details

The %R3CONNB macro lets you log on and off the SAP system using parameters stored in the data set libref.R3CONN under the profile name. Profiles that connect to and disconnect from the SAP system can be used for batch operation, such as overnight processing, and to simplify the logon process for end users.

Examples

Example 1: Connecting to an R/3 System Using a Profile

The following example shows how to use the %R3CONNB macro to connect to the R/3 system using a profile:
%r3connb(PROFILE=BatchUser, LIBREF=batch, FUNCTION=open);
In this example, the profile BatchUser is used to connect to the R/3 system. The BatchUser profile uses the connection parameters stored in the BATCH.R3CONN data set.

Example 2: Disconnecting to an R/3 System Using a Profile

The following example shows how to use the %R3CONNB macro to disconnect from the R/3 system by using a profile:
%r3connb(PROFILE=BatchUser, LIBREF=batch, FUNCTION=close);
The BatchUser profile was used to connect to the R/3 system. This example demonstrates how to use the %R3CONNB macro to close the BatchUser profile's connection to the R/3 system.