Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Perl is a good scripting tools because of its availability across platforms and its vast CPAN library of modules. I wanted a program to query SAP using RFC calls. Microsoft Net requires the WCF LOB Adapter for SAP - which I did not have. So next choice was to look up the Sap::Rfc module for Perl. I was pleasantly surprised to see the NetWeaver RFC gives the Next generation Ruby and Perl Connectors that replaces SAP::Rfc. This new module uses the latest RFC Netweaver SDK and is much easier to use than its predecessor.

However compiling the module on Strawberry Perl was not easy. So I decided to document my experience in this blog.

*If you want to skip these steps, you can download my Perl compilation from the **PI-Monitor site at sourceforge.*

h3. Installing Perl

[Download and install Strawberry Perl | http://strawberryperl.com/releases.html] to C:strawberry. I prefer to use the portable zip file since you can just unzip it to C:strawberry without any side-effects.

h3. Installing the Netweaver RFC SDK

Download the SAP NW RFC SDK. OSS Notes: 1025361  and 1056696 .

First:   http://service.sap.com/swdc
Then:   Download -> Support Packages and Patches -> Entry by Application Group ->
Finally:  On the page "Support Package and Patches", choose "Additional Components" -> SAP NW RFC SDK" -> SAP NW RFC SDK 7.10.
    1. Select your operating system and download the SAR file. (In my case it was NWRFC_2-20002217.SAR).
    2. You need SAPCAR to uncompress this file. To get SAPCAR (Download->Support Packages and Patches -> Entry by Application Group. Then choose "Additional Components" -> SAPCAR -> SAPCAR 7.10)
    3. At the command line, uncompress the SAR file
SAPCAR_3-20002090.exe -xvf NWRFC_2-20002217.SARRead notes on compiling NWRFC for Perl

Perl needs a connection to CPAN network to install the modules.  Before you can install modules, you need to setup your proxy settings. If you don't need a proxy, ignore the first HTTP_PROXY command.

set HTTP_PROXY=http://proxyuser:proxypass@proxyhost:proxyport<br />set PATH=C:
wrfcsdklib;C:strawberryc in;C:strawberryperl in;%path%<br />cpan<br />
cpan>  install sapnwrfc<br />No libsapnwrfc installation found, usually in C:/Program Files/SAP/FrontEnd/SAPg
ui/nwrfcsdk
Which libsapnwrfc build path do you want to link against?*  C:/nwrfcsdk</li><li><br />If you get an error "undefined reference to 'RFC...." - you'll need to manually modify the Makefile.<br />c:strawberryCPAN uildsapnwrfc-libSAPNWMakefile<br />Find the lines
LDLOADLIBS = and prefix c:
wrfcsdklibsapnwrfc.lib c:
wrfcsdkliblibsapucum.lib <br />
From the command line prompt
cd c:strawberryCPAN uildsapnwrfc-
dmake
dmake install*
    h3. Optionally
    • Optionally cpan install Net::Amazon::S3  -- if you want to upload files to Amazon S3.