Accessing Data Using SAS/ACCESS Interface to R/3

Overview

You can use SAS/ACCESS Interface to R/3 to access SAP data two different ways. Both methods generate a SAS DATA step.
  • Remote Function Call. This typical method offers online access to the SAP data.
  • Extract Management. Now largely superseded, this original method offers offline access to SAP data. Here is when you might find it most useful:
    • A poor or slow communication link exists between SAS and SAP.
    • A backup file is required.
    • A lot of data exists.

Remote Function Call (RFC) Method

Remote Function Call (RFC) is an SAP implementation of the Remote Procedure Call. RFC allows access to R/3 from external applications, such as SAS or other SAP systems.
The following figure provides an overview of the RFC method. The ABAP Function module and the ABAP Report module (provided with the interface), attach to the R/3 system. Communication between the ABAP Function module and the interface itself uses RFC over a TCP/IP connection. In addition to the components in the previous figure, in a z/OS environment a SAS RFC Server is deployed between the SAP system and the SAS Server to provide access to data in the SAP system.
Remote Function Call (RFC) Method of Accessing Data from the R/3 System
RFC Method of Accessing Data from the R/3 system
In general, the RFC method consists of generating a SAS DATA step to access the SAP data. It then uses the DATA step to create one of these items:
  • a data set that is a SAS copy of the SAP data
  • a view that reads the SAP data each time it is required

Extract Management Method

Overview

This method creates an ABAP query that copies the data from SAP to an external file. It also creates a SAS DATA step that then reads the external file into SAS. After the SAP data has been exported to SAS, the data can be held either temporarily for discrete analysis or permanently in a SAS data warehouse. The interface generates all of the necessary programs for both ABAP and SAS (based on the SAP data dictionary tables).

Installation and Setup

  1. Generate an ABAP report: Use the descriptor file to create an ABAP report and write it to a text file. The ABAP report is used later to copy the SAP data to an external intermediate data file.
  2. Generate a DATA step: Generate a SAS DATA step to read the intermediate data file.
  3. Install the ABAP report in R/3: This step is independent of SAS/ACCESS Interface to R/3 and SAS and can be performed simultaneously with Step 2.
  4. Install the ABAP text file from Step 1 into SAP.

Data Transfer and Use

After installation and setup, you can perform these steps as many times as required.
  1. Run the ABAP report in R/3: Run the installed ABAP report on SAP. This creates the external intermediate data file.
  2. Use the DATA step to read in or copy the external intermediate data file into SAS. However, depending on your situation, it might be possible to simplify or streamline the outlined process. For example, in UNIX a named pipe or other external file can allow ABAP to write data to the external intermediate data file so that SAS can read it simultaneously.