Installing the CallAPI for SAP

This document guides you through the new installation of a CallAPI for SAP.

AE supplies a CallAPI for SAP. You can use this interface to directly run AE Scripts from ABAP programs. The CallAPI is represented by an RFC Server that includes the function module "AE." You call this module directly from ABAP.

The CallAPI for SAP is available under UNIX and Windows.

A three-character code is assigned to each supported UNIX variant. This code appears in some file names (AP6 for AIX, for example). Throughout this document the specific code is replaced by "???."

Technical Implementation

Diagram of the technical implementation

To Install the CallAPI for SAP

Note that a sound knowledge of  SAP's RFC technology is required put the RFC Server into operation.

  1. Install the Java Runtime Environment (JRE).

    If JRE is already available in the required version, you can skip this step.

    • Admin computer and/or user computer
    • You check the version of the system's current Java Virtual Machine (VM) with the following command.

      java -version

      If several JRE or Java SDK versions are installed on the computer, the order of the directories that is indicated in the settings of %PATH% or $PATH is relevant. The particular Java Runtime Environment that is listed first in the list of directories is applied.

    • Download the required Java Runtime Environment from http://java.sun.com and install it. The installation process includes the automatic installation of the Java Plug-in for Web browsers. You can deactivate it in the system control, because AE does not need it.
  2. Transfer the files.

    Windows:

    • Transfer the supplied files of the CallAPI for SAP. 

    UNIX:

    • Transfer the TAR file ucxsapc.tar.gz via ftp.
    • Unpack the tar file:

      gzip -d ucxsapc.tar.gz
      or gunzip ucxsapc.tar.gz

      tar xvf ucxsapc.tar

      (Linux: tar -zxvf ucs???.tar.gz)

      The files that are supplied appear in their corresponding directories. The tar file can then be deleted after unpacking.

      Pay special attention to tar messages (which, for example, can be called up by various users) and make sure that all files have been correctly unpacked.

    • The RFC Server requires the RFC library (versions 3.1G and later) for operation:

      librfccm.o (AIX), librfccm.so (Solaris, zLinux) or librfccm.sl (HP-UX). Set the variable according to the RFC library's installation folder and the CallAPI for SAP.

      AIX: export LIBPATH=Paths of the installation directories

      HP-UX: export SHLIB_PATH=Paths of the installation directories

      Solaris, Linux, zLinux: export LD_LIBRARY_PATH=Paths of the installation directories

      Example for HP-UX:

      The CallAPI for SAP was installed in /opt/uc4/callapi/bin and the RFC library in /opt/uc4/callapi/rfclib. The environment variable must be set as follows:

      export SHLIB_PATH=//opt/uc4/callapi/bin:/opt/uc4/callapi/rfclib

  3. Install the SAP Java Connector.

    • Host
    • The RFC Server requires the SAP Java Connector.
    •  Install the 32-bit SAP JAVA Connector if you use 32-bit Java. 64-bit Java requires the 64-bit SAP Java Connector.

    • Download the SAP Java Connector from the SAP Service Marketplace and install it (Support Portal -> Downloads -> SAP Connectors -> SAP Java Connector -> Tools & Services).
    • Copy the SAP Java Connector files to the BIN directory of the agent.
    • UNIX: To set the environment variables, see the installation folder of the CallAPI for SAP. 

      AIX: export LIBPATH=path of the installation directory

      HP-UX: export SHLIB_PATH=path of the installation directory 

      Solaris, Linux, zLinux: export LD_LIBRARY_PATH=path of the installation directory

      Example for HP-UX:
      The CallAPI for SAP is installed in /opt/uc4/callapi/bin. The SAP Java Connector must be stored in the same directory. Set the environment variable as follows:

      export SHLIB_PATH=//opt/uc4/callapi/bin

  4. Adjust the INI file for the RFC Server program.

    Adjust the file ucxsapc.ini according to your environment. The sections [CP_LIST] and [RFC] are the essential parameters. The section [CP_LIST] contains the Automation Engine data. The section [RFC] determines the SAP Gateway to which the RFC Server registers.

    Example for the INI-file sections [RFC] and [CP_LIST]:

    [RFC]

    hostname=sap01

    PROGID=TEST

    GWSERV=sapgw00

    RFC_TRACE=1

    unicode=1

     

    [CP_LIST]

    2217=fsu

    It is not required to use a new INI file with each new Automation Engine version. Just make sure to update your INI file. The relevant information is provided in the Release Notes, which are available in the manual Release Notes.

  5. Start the RFC Server.

    The RFC Server can run as a service under Windows. In UNIX, you can either use the ServiceManager or start using the command nohup.

    The RFC Server can be called with the Java Application Launcher using the following parameters (optional): 

    File name Start parameter

    Description

    ucxsapc.jar -IPath and file name Path and name of the INI file for the RFC Server
    -V

    Outputs the Automation Engine version including the hotfix number in the following format:

    "ucxsapc version Automation Engine version plus hotfix number"

    -VPath and file name

    Outputs the Automation Engine version including the hotfix number to the file in the following format:

    "ucxsapc version Automation Engine version plus hotfix number"

    The following command-line call can be used to start the RFC Server:

    java -jar ucxsapc.jar

    Use the following command to start the RFC Server on a HP-UX platform (64 bit):

    java -d64 -jar ucxsapc.jar

  6. Check the registration in the SAP system.

    Start the transaction "SMGW" with SAPGUI or log on to the Gateway Monitor via Tools -> Administration -> System Monitoring -> Gateway-Monitor. Select Jump -> Registered Systems. The started server program should be shown in system type REGISTER_TP.

    Example of an Overview

    LU name   TP name   Host name       Host address      System type  Request
    R31       sapgw00   R31             193.154.170.111   LOCAL_R3    16:33:07
    wgntw13   uc4call   WGNTW13         193.154.170.13    REGISTER_TP 12:11:18
    R31                 R31             193.154.170.111   REMOTE_GWY  10:25:14

  7. Define the RFC destination in the SAP system.

    Start the transaction "SM59" or log on via Tools -> Administration -> Management -> Network -> RFC Destination. Specify a TCP/IP connection:

    • Connection type: T
    • Activation type: Registered Server Program
    • Program ID:  The program ID (case sensitive) that was used in the INI file UCXSAPC.INI.

    If the SAP system consists of several application servers, the SAP Gateway on which the RFC Server registered should also be entered in the RFC destination. Otherwise, ABAP programs can only establish a connection if they run on the same application server as the one on which the RFC Server has registered.

    Example of a TCP/IP connection

    Test the connection using the button Test Connection.

    Example of a test result

    Connection type:   TCP/IP connection
    Logon:                   1,360 msec
    0  KBytes:               264 msec
    10 KBytes:                39 msec
    20 KBytes:         62 msec
    30 KBytes:         45 msec

    A successful test result indicates that the CallAPI is ready for operation.

See also:

CallAPI for SAP