From R/3 to R/2 
Purpose
An ABAP program in an R/3 System uses an RFC or CPI-C call to start an ABAP program in an R/2 System on an MVS/VSE host, and exchanges data with this program.
The SAP Gateway builds connections to the R/2 host via LU6.2 using services of the SNA communication subsystem. Several communications requests can be processed via one SAP Gateway.
Prerequisites
With this constellation, you must note the following guidelines:
- There must be a SAP Gateway in use that supports SNA.
- There must be an SNA communication subsystem.
- The called function must be an ABAP function module, which has the "remote" ID in the function library.
For more details on the RFC interface, refer to the documentation
Remote Communications.- Using the CPI-C interface
- There must be a SAP Gateway in use that supports SNA.
- There must be an SNA communication subsystem.
- The ABAP target program on the R/2 host must contain the form routine specified in the connect data.
- The calling ABAP program must build the data for the logon to the target system, convert it to EBCDIC and receive the response (possibly a denial) from the target system.
- The side info table TXCOM must be configured in the calling R/3 System. For this, use transaction code SM54.
For details on the configuration of TXCOM, refer to the relevant topic in the following documentation:
- Using the CPI-C interface
- There must be a SAP Gateway in use that supports SNA.
- There must be an SNA communication subsystem.
- The ABAP target program on the R/2 host must contain the form routine specified in the connect data.
- The calling ABAP program must build the data for the logon to the target system, convert it to EBCDIC and receive the response (possibly a denial) from the target system.
- The side info table TXCOM must be configured in the calling R/3 System. For this, use transaction code SM54.
For details on the configuration of TXCOM, refer to the relevant topic in the following documentation:
BC SAP Communication: ConfigurationProcess flow
Using the RFC interface:
Once the above requirements have been met, select the target system with the Transaction SM59.
- Using the CPI-C interface
For details on CPI-C calls, refer to the topic
CPI-C Implementation in ABAP.