Installing the CallAPI for SAP

CallAPI files are supplied with the Automation Engine. The CallAPI for SAP is available on UNIX and WINDOWS.

You can use this interface to run AE scripts from ABAP programs. Technically, the CallAPI is represented by an RFC Server that includes the function module AE which you can call directly from ABAP.

To Install the CallAPI for SAP

Note: Good knowledge of the SAP RFC technology is required to put the RFC Server into operation.

  1. Install the Java Runtime Environment (JRE), if necessary.

    1. (Admin/User computer) Check the version of the current Java Virtual Machine (VM) in the system using the 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.

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

  2. Download and store the files.

    Windows

    • Download all the files that are supplied for the CallAPI for SAP.

    UNIX

    • Download and transfer the TAR file ucxsapc.tar.gz via FTP, and unpack it: :gzip -d ucxsapc.tar.gz or gunzip ucxsapc.tar.gz

      tar xvf ucxsapc.tar

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

    Notes:

    • The files that are supplied are included in the corresponding directories.

    • Pay special attention to tar messages that can be made by various users.

    • Make sure that all files are correctly unpacked and delete the tar file.
  3. Install the SAP Java Connector.

    1. (Host) Download the SAP Java Connector from the SAP Sortware Download Center of the SAP Support Portal at https://support.sap.com/jco.

    2. Copy the SAP Java Connector files to the BIN directory of the agent.

    3. UNIX: To set the environment variables, see the installation folder of the CallAPI for SAP. 

      • AIX:export LIBPATH=Paths of the installation directories

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

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

        Example

        The CallAPI for SAP is 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

  4. Adjust the INI file (ucxaspc.ini) of the SAP CallAPI for the RFC Server program. The section [CP_LIST] contains the Automation Engine data and the section [RFC] determines the SAP Gateway to which the RFC Server registers. For more information, see Call API SAP.

    Important! If you are using several SAP CallAPIs, make sure that you are using a unique program name for each one.

    Example

    [RFC]

    hostname=sap01

    PROGID=TEST

    GWSERV=sapgw00

    RFC_TRACE=1

    unicode=1

     

    [CP_LIST]

    2217=servername

    Note: You can keep your existing INI file even if there is a new Automation Engine version and adjust it as required.

  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.

    Alternatively, you can install it with the Java Application Launcher using the following parameters: 

    File name:ucxsapc.jar

    Start parameter:

    • -IPath and file name

      Path and name of the INI file for the RFC Server

    • -V

      Outputs the Automation Engine version in the following format: ucxsapc version Automation Engine version plus hotfix number

    • -VPath and file name

      Outputs the Automation Engine version 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 SAP GUI or log on to the Gateway Monitor to make sure that the started server program is available in system type REGISTER_TP. For more information, see SAP Help.

  7. Define the RFC destination in the SAP system. Start the transaction SM59 or go to the RFC Destination to specify a TCP/IP connection and test it.

    • Connection type: T
    • Activation type: Registered server program
    • Program ID:  The program ID (case sensitive) that you have specified in the INI file UCXSAPC.INI.

    Important! If you are using several application servers on your SAP system, specify the SAP Gateway to which the RFC Server is registered in the RFC Destination. Otherwise, ABAP programs can only establish a connection if they run on the same application server on which the RFC server has registered.

See also: