India

ZestyBeanz Technologies Pvt Ltd 4th Floor, Nila, Technopark Thiruvananthapuram,
India – 695581
Phone: +91 471 4063254
Fax : +91 471 2700171

   .

ZestyBeanz Technologies Pvt Ltd
61/3236, Manikkath Cross Road
Ravipuram, Kochi, India - 682016
Phone: +91 484 4063254

  UAE

Zesty Labs
Office # 2003, Millennium Plaza Building
Sheikh Zayed Rd, Dubai, UAE
Phone: +971 4333 2222​
Mobile: +971-52-7553466

  Germany​

ZestyBeanz Technologies GmbH
Reuterstraße 1
90408 Nürnberg
Fon: +49 911 4801 444
Fax: +49 911 4801 445

Connecting OpenERP and SAP

Contact Form


Hestin Jose's picture

Connecting OpenERP and SAP

OpenERP can connect to SAP through the RFC gateway using sapnwrfc (SAP NetWeaver R/3 RFC Connector for Python)

The below tutorial is based on the experiance in configuring sapnwrfc in ubuntu 10.04 . There might be changes in other distros and versions. Its is assumed that the commands given below will be run as root user.

You have to download the following

  1. nwrfcsdk - SAP Netweaver RFC SDK. Download recent version appropriate to your architecture(32bit, 64bit ...) from SAP Marketplace.
  2. sapcar - Archive manager. The downloaded nwrfcsdk will be a .SAR archive. We need sapcar to extract the downloaded .SAR archive. Download from SAP Marketplace recent version appropriate to your architecture(32bit, 64bit ...)
  3. sapnwrfc - From http://www.piersharding.com/download/python/sapnwrfc/. Download the latest release

Extract the SDK which will be something like NWRFC_1-20004565.SAR using sapcar (SAPCAR-32bit.exe)  You will get a folder named nwrfcsdk.

  • chmod +x SAPCAR-32bit.exe
  • ./SAPCAR-32bit.exe -xv -f NWRFC_xxxxxxxxxx.SAR

Create a folder /usr/sap and copy this folder(nwrfcsdk) to it.

  • mkdir /usr/sap
  • cp -r nwrfcsdk /usr/sap

Now create a file sap.conf(name can be anything ending with .conf) under the directory /usr/sap/nwrfcsdk/lib
 

  • echo "/usr/sap/nwrfcsdk/lib" > /etc/ld.so.conf.d/sap.conf

To load the libraries run
 

  • ldconfig -v

SAP RFC Gateway will listen on port 3300 by default. If not check on which port it is listening.
Make sure you can reach the port on sap server. For example check if you can connect telnet to it by

  • telnet SAP_SERVER_IP 3300

Install PyYAML

  • apt-get install python-yaml

Extract sapnwrfc, and change directory to the extracted folder and install sapnwrfc

  • tar -zxf sapnwrfc-xxxxxx.tar.gz
  • cd sapnwrfc-xxxxx
  • python setup.py install

Make sure this finishes with no errors.

Now everything is ready to connect to SAP. 
Check the examples coming with sapnwrfc(folder examples). The examples check for the configuration file inside the directory examples/examples. So you have to create a directory examples(mkdir examples/examples) and create a yml file with the connection settings similer to the sap.yml file given in examples.
 

 

Tags: Integrating OpenERP and SAP, synchronizing OpenERP and  SAP, OpenERP, SAP, sapnwrfc , connecting to SAP using python, connecting to SAP RFC gateway from linux, SAP and python

Andrew Stephan 's picture

nice info though I could

nice info though I could search it in Internet. But it is incredible that this was successfully implemented. It will give confidence to existing SAP users to connect to OpenERP (which is really a fantastic open source ERP) and save the additional license costs for their enhancement requirements..!!