SAP connector

You can configure SAP connector with the Product Master application.

Product Master-SAP connector is an upstream connector for importing data from the SAP Material Management module into the Product Master operational catalogs. SAP upstream connector allows you to import material and vendor information for data enrichment and review before publication to downstream channels. This guarantees quality and speed time to market through data consolidation and governance that is enforced by Product Master. SAP connector imports data into Material catalog and Vendor catalog operational catalogs. Material catalog has Material hierarchy as primary and Plant hierarchy as secondary hierarchy. Vendor catalog has Company hierarchy as primary and Location hierarchy as secondary hierarchy.

Working with the SAP connector

The connector uses SAP Intermediate Document (IDOC) and Business Application Programming Interface (BAPI) for data transfer. SAP Enterprise Resource Planning (ERP) needs to be configured to generate IDOC files and place these in the FTP or SFTP directory (configurable through the ftp.directory property in the application.properties file). The connector reads IDOCS from the FTP or SFTP location and processes in batches. If the IDOCTYP field in the IDOC is MATMASXX, for example, MATMAS01, MATMAS02. Then, IDOC is processed as a Material Master IDOC. If the field is,IDOCTYP CREMASXX then IDOC is processed as a Vendor IDOC.

SAP connector creates new items (materials or vendors) in the Product Master along with modifying existing items. Connector also categorizes these based on information available in IDOCs. After completion of each batch, all successfully parsed IDOCs for which items are created or updated in the Product Master are moved to Success directory. If there is any error in parsing or creating or updating items, then IDOCs are moved to Error directory. SAP connector performs initial import of categories from SAP ERP system into the Product Master and populates Plant, Material, Company, and Location hierarchies in the Product Master.
Note: SAP connector supports only Material Master and Vendor type IDOCS.

Installing the connector

Proceed as follows to install the connector:

  1. Browse to the $TOP_CONNECTOR/connectors folder.
  2. Locate and extract the ipm_connectors_12.0.0.X_YYYYDDMMZZZ.tar.gz base file.
  3. Set the TOP_CONNECTOR environment variable to point to the extracted folder:
    export TOP_CONNECTOR=/opt/connectors/mdmce-connectors
  4. Enable the connector in the $TOP_CONNECTOR/conf/connector_settings.ini file.
  5. Run the installer script.
    cd $TOP_CONNECTOR
    cd bin
    ./install.sh
  6. Update the application.properties file located in the following folder:

    $TOP_CONNECTOR/connectors/mdmce_sap/conf

    For more information, see Updating properties file.
  7. Start the connector from the $TOP_CONNECTOR/connectors/bin folder:
    ./start_connectors.sh sap
    ./start_connectors.sh -all
    Stop the connector through the following command:
    ./stop_connectors.sh -all or ./stop_connectors.sh sap
  8. Check status of the connector through the following command:
    ./status_connectors.sh -all or ./status_connectors.sh sap

Updating properties file

You need to update the following parameters in the application.properties file.
MDM company configuration
mdm.company.user=<user_name>
mdm.company.password=<password>
mdm.company.company=<company>
JCO client configuration
jco.client.lang=en
jco.client.client=<client_id>
jco.client.passwd=<password>
jco.client.user=<user_name>
jco.client.sysnr=00
jco.client.ashost=<ip_address/host_name>
jco.client.destination=abap_as_without_pool
jco.passwordencrypted=false
bulk.import.batchsize=2
bulk.category.import.batchsize=50
file.success.dir.path=/opt/connectors/idocs
file.error.dir.path=/opt/connectors/idocs/error
file.idoc.source.directory=/opt/IODC/
FTP configuration
ftp.url=<ftp_url>
ftp.user=<user_name>
ftp.password=<base64-encoded password>
ftp.idoc.dest.directory=<idocs_directory>
Database-related parameters
app.datasource.url=jdbc:db2://<hostname>:<port>/PIMDB
app.datasource.username=<username>
app.datasource.password=<password>

Importing data models

Proceed as follows to import base data model and data model:
  1. Log in to the Admin UI.
  2. Import the connectors_basemodel.zip file located in the following folder:

    mdmce_connectors/datamodel

  3. Import the connectors_sap_datamodel.zip file located in the following folder:
    mdmce_connectors/connectors/mdmce_sap/datamodel

Configuring JCo client

SAP connector uses the JCo client to fetch categorization data from the SAP system. Load the JCo client library through the following command:

  1. Copy the libsapjco3.so file to a folder, for example /opt/sapjso3lib/ folder.
  2. Add the following to the .bashrc or .bash_profile file:
    export LD_LIBRARY_PATH=/opt/sapjso3lib
    Note: If the library is not set after editing the .bash_profile file, run source .bash_profile file on the console.
  3. Copy the sapjco3.jar file to the /opt/connectors/mdmce-connectors/libs folder.

Troubleshooting

The logs for the connector are created in the $TOP_CONNECTOR/logs folder.

If the connector does not start processing, then verify the configuration parameters in the applications.properties file.