Previous Page | Next Page

Using the SAS RFC Server

Using the SAS RFC Server in Batch Mode

The SAS RFC Server can perform batch mode processing of RFC calls to the SAP system. Users who submit interactive RFC calls to the SAP system might encounter time-out limitations. This occurs when interactive SAP jobs exceed the default processing time-out limit of 10 minutes.

By allowing batch mode processing of RFC calls to the SAP system, time-out limitations for interactive SAP dialog processes are resolved. Batch mode processing is often used to reduce the use of dialog processes and to reduce the impact of extractions (a SAS program reading the tables and views of the SAP system by means of the SAP LIBNAME engine) on the SAP system. Batch processes usually run at a lower priority. Batch mode processes of RFC calls can also help control the number of simultaneous extractions.

The ABAP program that is normally generated (by another ABAP program), executes a requested read and join operation on the database table(s). When operating in batch mode, the SAS RFC Server creates and releases an SAP job to execute this ABAP program. The SAS RFC Server then waits for the job that is running the ABAP program to start and to recall the SAS RFC Server. Finally, the resulting data stream (that the SAS RFC Server receives from the SAP system) is passed on to the SAP LIBNAME engine.

LIBNAME or data set option: BATCH | BATCH_MODE | BATCHMODE= 0|1|Y|N

Indicates whether the SAS RFC Server should use SAP batch jobs for the data extracts.

Y

RFC uses batch jobs to extract R/3 data

N

RFC uses dialog processes to extract R/3 data

The default value for this option is N.

To submit batch requests to the SAS RFC Server, an RFC destination and a variant for ABAP program /SAS/Z_SAS_READ must be set up for each SAS RFC Server instance. Before the SAS RFC Server can execute requests as a batch job the following steps must be performed:

  1. Create a SAS RFC Server destination. For each SAS RFC Server that accesses an SAP System, a destination must be set up on that SAP System. The program ID and the gateway information defined in the destination are used to register the SAS RFC Server on an SAP gateway. If two SAS RFC Servers are used to read data from one SAP application server, two RFC destinations must be set up on that SAP application server.

    If gateway information is omitted from the SM59 destination, the batch job will be constrained to run on the R/3 server mentioned in the SAS LIBNAME statement for the request.

    If explicit gateway information is entered in the SM59 destination information, the batch job will be run on any eligible R/3 server as determined by the SAP site batch configuration.

    Omitting the gateway information is typically used in small SAP configurations such as test, QA, and single server systems. In production environments, it is preferable to have the jobs run on a server allocated by the SAP batch system.

  2. Create a variant of ABAP program /SAS/Z_SAS_READ. After defining the destination for the SAS RFC Server, you will need to make the RFC destination known to the ABAP program. This is done by creating a variant for the ABAP program /SAS/Z_SAS_READ. The concept of variants provides a way of parameterizing ABAP programs. For each defined destination, a variant needs to be created that references the destination. Variants are client dependent.

  3. Start the SAS RFC Server with the variant. For more information about using the SAS RFC Server and particularly the sasrfc_server option, see Using the SAS RFC Server on UNIX and Using the SAS RFC Server on Windows.

For further information about the setup of SAS RFC Server destinations and variants, see the Installation Instructions-- SAS/ACCESS Interface to R3.

Previous Page | Next Page | Top of Page