![]() |
![]() |
Accessing and Using R/3 Data |
You can use the SAS/ACCESS Interface to R/3 to access SAP data by using two different methods:
Remote Function Call
The Remote Function Call method is normally used. It offers online access to the SAP data.
Extract Management
The extract management method is the original method that has now largely been superseded. It offers off-line access to the SAP data that can be useful when
there is a poor or slow communication link between SAS and SAP
a backup file is required
there is a lot of data
Note: Both methods generate a SAS DATA step.
Remote Function Call (RFC) Method |
The 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.
An overview of the Remote Function Call method for accessing data from SAP is shown in the following figure. Two modules (ABAP Function and ABAP Report, which are 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. Note that in a z/OS environment, in addition to the components in the previous figure, a SAS RFC Server is deployed between the SAP System and the SAS Server to provide access to the data in the SAP System.
Remote Function Call (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, and then it uses the DATA step to create either
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 |
The extract management 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).
The extract management method to access SAP data is discussed in the following sections.
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.
Generate a DATA step.
Generate a SAS DATA step to read the intermediate data file.
Install the ABAP report in R/3.
This step is independent of the SAS/ACCESS Interface to R/3 and SAS and can be performed simultaneously with Step 2.
Install the ABAP text file from Step 1 into SAP.
Note: After installation and setup,
you can perform the following steps
as many times as required.
Run the ABAP report in R/3.
Run the installed ABAP report on SAP. This creates the external intermediate data file.
Use the DATA step.
Use the DATA step to read in or copy the external intermediate data file into SAS.
Note: 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 enable ABAP to write data to the external intermediate data
file so that SAS can read it simultaneously.
![]() |
![]() |
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.