Configure the SAP Adaptor for SAP - EcoSys - Installation & Upgrade - Hexagon PPM

EcoSys SAP Adapter Installation

Language
English
Product
EcoSys
Search by Category
Installation & Upgrade
EcoSys Version
9.0

This section describes the steps for connecting EcoSys to SAP through the web service API and SAP’s JCO.

  1. SAP Adaptor Network Architecture

    The SAP Adaptor is a component (pluginsap.war) that you can deploy within the same container as the EcoSys web application (ecosys.war), or on a different container and/or host. There are three connections involved in making the plug-in operate:

    • STEP 1: The EcoSys web application utilizes SOAP web service calls to communicate with the plug-in. You configure the connection in the EcoSys UI on the External Systems screen, and using the <url> tag.

    • STEP 2: The SAP Adapter utilizes SAP’s JCo (Java Connector) to communicate with the SAP system. You configure this connection in the EcoSys UI on the External Systems screen, using several connection attributes that identify the SAP system.

    • STEP 3: The plug-in then connects back to the EcoSys system using SOAP calls to the static SOAP API (SSAPI). You configure this connection in the EcoSys FMServerSettings.properties file, and should be an address accessible from wherever the plug-in is deployed.

      The status for each of these connections is reported on the System Info > Integration screen. All three connections must be reported as successful for the plug-in to operate correctly.

  2. Prerequisite Components

    Before configuring the SAP Adaptor to connect to SAP, you must install the JCO client component on the EcoSys server. This includes two parts:

    • The SAP sapjco3.dll file must reside in the operating system’s PATH. It is recommended to copy this file to the c:\windows\system32 folder.

    • Install the SAP JCO Java libraries. Specifically, add the sapjco3.jar file to the application server’s Java CLASSPATH. This can be done by copying the sapjco3.jar file into the EcoSys lib folder or the common lib folder of the application server.

      In addition, you must prepare the database for SAP transactions by executing the following one of the following scripts against the ESFM database type that matches the environment.

    • For MSSQL, run fm_ss_sap_global_objects.sql. This script is located in the EcoSys\database\sqlserver\utils folder.

    • For Oracle, run fm_or_sap_global_objects.sql. This script is located in the EcoSys\database\oracle\utils folder.

  3. Configure the SAP Adaptor to Connect to SAP

    After you have installed the underlying web service components, you can configure the connection to SAP using the EcoSys web application:

    1. Log in as an administrator user.

    2. Navigate to the External Data Sources screen.

    3. Add a new external data source for your SAP connection, and set the type to Web Service API.

    4. Configure the connection information as follows, replacing the bold fields with values corresponding to your SAP system. Set the plug-in service URL to match the URL where the SAP Adaptor was deployed. Usually, this is on the same application server where the EcoSys web application was deployed.

      <externalSystem>

      <connection>

      <parameter name="username">ECOSYS_RFC</parameter>

      <parameter name="password">SECRET123</parameter>

      <parameter name="sapClient">300</parameter>

      <parameter name="language">EN</parameter>

      <parameter name="hostName">192.168.10.10</parameter>

      <parameter name="systemNumber">00</parameter>

      <parameter name="repository">EcoSys</parameter>

      </connection>

      <pluginService>

      <url>http://localhost:8080/pluginsap/services/EcoSysPlugin/</url>

      </pluginService>

      <operationConfig>

      </operationConfig>

      </externalSystem>

      If the SAP installation requires the use of a wrapper or proxy around the RFC_READ_TABLE call, this may be specified as an optional parameter in the connection configuration. In this example, the system will call ZRFC_READ_TABLE in place of the standard function:

      <parameter name="rfcReadTableAlias">ZRFC_READ_TABLE</parameter>

      If the SAP system does not require this proxy function, omit this parameter and it will call the native RFC_READ_TABLE by default.

  4. Validating the SAP Connection

    After you have set up the connection information for the external system, you can validate the connection. Navigate to the System Info screen, and then select the Integration tab. A button displays for your SAP connection. Clicking that button runs through a test to validate the SAP connection. The output includes the status and version for three different components of each connection:

    1. The status and version of the plug-in interface itself (the EcoSys adaptor to SAP)

    2. The status and version of the external system provided by the plug-in (in this case SAP)

    3. The status and version of the EcoSys API service the plug-in is using (most of the time this will be the same as your EcoSys web application)

      Each of the three sub components must report Connection Successful, or provide detailed information about what kind of failure was encountered.

      You can then go back to External Data Sources, modify the connection info, then test the connection again until the issues are resolved. You may use this process at any point to validate the connection is functioning.

  5. Troubleshooting the SAP Connection

    The following are common issues when connecting to SAP and their cause/resolution:

    • Missing Java Libraries indicates a .jar file is missing from the application server runtime classpath:

      java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$Repository

      Solution: Add the sapjco3.jar file to your application server’s CLASSPATH.

      This .jar file is part of SAP’s software distribution, and is not supplied by EcoSys.

    • Missing Windows Libraries indicates a .dll file is missing from the Windows OS PATH (c:\windows\system32 or similar):

      caused by --> java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
      JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [no sapjcorfc in java.library.path]. java.library.path

      Solution: Copy the sapjco3.dll file to c:\windows\system32 or somewhere in your OS PATH.

      This .dll file is part of SAP’s software distribution, and are not supplied by EcoSys.

    • Network connection to SAP system not available indicates that the system cannot connect to a live SAP system:

      ERROR partner not reached
      ...
      com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
      Connect_PM GWHOST=192.168.2.13, GWSERV=sapgw00, ASHOST=192.168.2.13, SYSNR=00
      ...
      at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native Method)
      at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:11

      Solution: Verify network connectivity between the EcoSys server and the SAP server. You can do this using ping (the SAP server should reply when pinged from the EcoSys server command line), and also by using telnet to test the connection to the SAP port (typically port 3300 or 3600, depending on the system number).