Installing the Agent for SAP

This topic guides you through the installation of an SAP agent.

Notes:

This page includes the following:

Requirements

Note: Make sure you have the following information before starting the installation:

  1. Access to the SAP Service Marketplace (http://service.sap.com):

    • Name and Password

  2. SAP user administrator:

    • Name and Password

  3. (Optional) SAP Transport-system administrator:

    • when using the AE interface, Name and Password of the SAP System adminsitrator

    • when operating the system with SAP GUI, Name and Password of the SAP Transport -system administrator

  4. Parameter for RFC access to the particular SAP system:

    • Name of the SAP System

    • Host name of an SAP instance or SAP Router String - host

    • SAP system number sysnr

    • (Optional) Computer name or SAP Router String of the Message Server lb_host

    • (Optional) Logon group Ib_group

  5. Access to the operating system.

  6. TCP/IP access to the Automation Engine.

  7. Agent name.

  8. AE Installation directory.

  9. Access to the AE system client 0000:

    • Name and Password

Installing the Agent for SAP

  1. Installing the Microsoft Visual C++ 2010 Redistributable Package (Windows)

    As of JCo 3.0.0, JCo running on Windows the Visual Studio 2005 C/C++ runtime libraries are required. For more information, see SAP note 684106.

    You can skip this step when the required version of the package is already installed. You can access the installed programs through the computer's Control Panel to check if the package is available, and if so, which version.

  2. Install the Java Runtime Environment.

    This installation step can be omitted if the required version of Java Runtime Environment is already available. SAP note 684106 describes what JREs are supported.

    On the Admin computer and/or user computer:

    • Check the current version of your system's Java Virtual Machine (JVM) using the following command:

    • java -version

      Note that the order of the indicated directories is relevant when specifying %PATH% or $PATH if several versions of JRE or Java JDK are installed on your computer. The Java Runtime Environment that is listed first is used.

    • Download the required Java Runtime Environment from http://java.com and install it.

  3. Install the Agent

    • UNIX

      On the host computer:

      • Log in using the AE user.

      • Transfer the file UCXJR3X.tar.gz to a directory (i.e. sap).

      • Switch to the sap directory:

        cd sap.

      • Unpack the .tar file:

        gzip -d UCXJR3X.tar.gz

        tar xvfo UCXJR3X.tar

        Make sure all files have been unpacked correctly and to note all .tar messages, which can come from various owners. After that you can delete the .tar file if you like.

      • Make sure all files have the correct owner and group entries.

      • Rename the supplied INI file ucxjr3x.ori.ini to ucxjr3x.ini.

      • Adjust the INI file to your system environment.

    • WINDOWS

      • Switch to the subdirectory: IMAGE:AGENTS\SAP\WINDOWS.

      • Run SETUP.EXE to start the program.

      • Adjust the INI file of the SAP agent to your system environment. For more information, see Agent SAP.

      • Adjust the HEADER.SAP, TRAILER.SAP, RESTART.SAP or HEADER.SAPBW, TRAILER.SAPBW and RESTART.SAPBW as necessary. For more information, see Executing Jobs.

        The SAP agent is an AE background program and it is generally started as a service in the ServiceManager. For more information, see ServiceManager.

  4. Install the SAP Java Connector

    On the host computer:

    • A detailed configuration and installation guide is provided in the archive of the SAP Java Connector (<sapjco-install-path>/docs/jco/intro.html). Read this description carefully to ensure that everything works correctly.

      To see which Java Connector version is supported, Refer to the requirements of the SAP agent.

      Install the 32bit SAP Java Connector if you use 32bit Java. 64bit Java requires the 64bit 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.

      The SAP note 636912 includes information that can be used to verify that the Java Connector has correctly been installed.

    • Test the installation with: java -jar {path-to-sapjco.jar}/sapjco.jar –stdout
      On Windows, you can double click on sapjco.jar.
      No error messages should be shown
  5. Import the AE Interface

    This installation step is only required if you intend to use the AE interface.

    On the host computer:

  6. Create a System User in SAP.

    On the host computer:

    • Log in to the SAP system using the SAP user administrator.

    • Create an authorization profile either directly or with a role. For more information, see SAP Security Objects.

      Create a user and assign the authorization profile or role.

      The SAP System user must be created with the same password in each SAP client in which you want to run jobs.

  7. Create Connection Objects

  8. Set Up the Agent object

    • Switch to the folder HOST.

    • Create an Agent object.

    • As agent name, use the same name as specified in the SAP agent's INI file parameter name=.

    • Open the Agent object and switch to the Agent page and select Connection objects for each connection type you will use in the SAP Connections section.

    • Save and close the Agent object.

  9. Start the Agent

    The AE system must be running on the server computer. For more information, see Multi-Server Operations.

    On the host computer:

    • User the commands to start the agent via the command line for your operating system.

    • Windows:

      <path to java> -Xrs -Xmx256M -jar ucxjr3x.jar

      If java is installed in a folder which contains spaces the command needs to be placed in quotes.

      For example:

      "C:\Program Files (x86)\Java\jre7\bin\java" -jar -Xrs -Xmx256M ucxjr3x.jar

    • UNIX:

      <path to java> -Xmx256M -jar ucxjr3x.jar

      For example:

      /usr/bin/java -jar -Xmx256M ucxjr3x.jar

      If SAP Java Connector cannot load its native library the parameter -Djava.library.path can be used to point to a directory which contains the libsapjco3.so.

      The Agent can also be started by using the ServiceManager. For more information, see ServiceManager.

      The maximum size of the memory allocation poolshould be set to at least 256MB for starting Java agents (Databases, Rapid Automation , JMX, SAP). You can specify a value for the storage limitation of Java applications by using the start parameter -Xmx. Specifying a value that is too low can cause the agent to crash. The default value depends on the Java version that is used. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. If large spool lists or Job logs are transferred the value should be much higher (for example -Xmx1024M).

      The Java parameter -Xrs ensures that the agent keeps running in the Service Manager when a User logs off. It is best to use this parameter on Windows only. More detailed information is provided in the Java documentation.

    • Verify that the agent for SAP has logged on.

    • Call information about agents in the Administration perspective. Newly logged-on agents have not yet been assigned to a client, therefore they can only be viewed in client 0000. You can now assign the new agent to clients with the required rights by using the Agent object. For more information, see Authorizations Page.

  10. Function test

    • Start a test job.

      Create a LOGIN object and an SAP_ABAPJob. Use the syntax <sap client>,<user> for the user info in the LOGIN object Make sure that the checkbox for the Agent log report is selected in the Job object.

      Example script for the test job:

      R3_ACTIVATE_REPORT REP=RSM04000_ALV,COVERPAGE=YES

      The current ABAP creates a list of actual users.

    • Monitor the process in Process Monitoring.

      It can take a couple of seconds for the system to register that the job is done. The agent checks at an increasing interval whether the job is still running. This is done in order to capture short running Jobs early. The status check interval increases the longer the Job runs. The maximum value can be specified in the UC_HOSTCHAR_DEFAULT variable. For more information, see UC_HOSTCHAR_DEFAULT - Host Characteristics.

    • Check the job report (PLOG and REP)

    • Check the agent logins in the log file.

    • On the SAP system:

      • Check the log entries from the current period with the transaction RZ15 (only when using the standard interface).

      • Shut down the agent.