sapnwrfc - SAP Netweaver RFC support for Perl
Copyright (c) 2006 - 2010 Piers Harding.
All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of either:
a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any
later version, or
b) the "Artistic License" which comes with this Kit.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
the GNU General Public License or the Artistic License for more details.
You should have received a copy of the Artistic License with this
Kit, in the file named "Artistic". If not, I'll be glad to provide one.
You should also have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
For those of you that choose to use the GNU General Public License,
my interpretation of the GNU General Public License is that no Perl
script falls under the terms of the GPL unless you explicitly put
said script under the terms of the GPL yourself. Furthermore, any
object code linked with perl does not automatically fall under the
terms of the GPL, provided such object code only adds definitions
of subroutines and variables, and does not otherwise impair the
resulting interpreter from executing any standard Perl script. I
consider linking in C subroutines in this manner to be the moral
equivalent of defining subroutines in the Perl language itself. You
may sell such an object file as proprietary provided that you provide
or offer to provide the Perl source, as specified by the GNU General
Public License. (This is merely an alternate way of specifying input
to the program.) You may also sell a binary produced by the dumping of
a running Perl script that belongs to you, provided that you provide or
offer to provide the Perl source as specified by the GPL. (The
fact that a Perl interpreter and your code are in the same binary file
is, in this case, a form of mere aggregation.) This is my interpretation
of the GPL. If you still have concerns or difficulties understanding
my intent, feel free to contact me. Of course, the Artistic License
spells all this out for your protection, so you may prefer to use that.
One last thing - The SAP NW RFC SDK is a prerequisite for this perl package
to work. The NW RFC SDK is proprietary software owned by SAP AG. For this
reason I will not supply ANY component part of the RFCSDK with this perl
package, and further more you must obtain it through the normal channels
with SAP AG - ie. you must have a licensed SAP R/3 installation at your
disposal.
****ATTENTION****
This package will NOT work unless you obtain the latest NW RFC SDK for SAP NewWeaver
from SAP - this is package is commonly referred to as "sapnwrfc", and is a complete
rewrite from the previous one called SAP::Rfc.
Installation
In brief, the following should work on most systems:
perl Makefile.PL
make
make test << provide all your host routing information.
make install
Help on the build process is available by doing:
perl Makefile.PL --help
and it says:
The whole trouble with the build process is one
of determining what your OS is, and which RFC
library needs to be linked in, and where that
library lives.
To help with this there are two command line
options that you can use to point me in the
right direction:
(1) --source /usr/sap/rfcsdk
This tells me where to look for your installed
RFCSDK. This must be the directory that contains
the ./lib and ./include directories of the RFCSDK
In the include directory must be saprfc.h etc.
By default, this looks in /usr/sap/rfcsdk
(2) --addlibs ' -lm -ldl -lpthread '
This tells me what additional libraries need to
be passed in at link time - this can be anything
that you would put in LDFLAGS.
By default this is ' -lm -ldl -lpthread '
YOU MUST MAKE SURE THAT YOU ADD THE LIB PATH TO LD_LIBRARY_PATH
EG:
export LD_LIBRARY_PATH=/usr/sap/rfcsdk/lib
Example:
perl Makefile.PL --source /opt/rfcsdk --addlibs '-lsomethingwacky'
My personal build script contains:
perl Makefile.PL --source=/home/piers/code/sap/nwrfcsdk
where the SAR file for the NW RFC SDK has been unpacked into
/home/piers/code/sap.
Help on obtaining the NW RFC SDK can be found in the OSS notes
on http://service.sap.com/support.
Ulrich updates the notes:
https://service.sap.com/sap/support/notes/1025361 - availability
https://service.sap.com/sap/support/notes/1056696 - compiling help
Please email directly if you have problems, and are willing to help
with testing (especially for other platforms) => piers@cpan.org.
HP-UX
-------
sapnwrfc has been successfully tested under HP-UX 64bit architecture.
Make sure that LD_LIBRARY_PATH is set to include the lib directory
of your NW RFC SDK and run "perl Makefile.PL –addlibs='-lCsup'"
You must make sure that you are pointing the the 64 bit Perl - most likely
in /opt/perl_64 and that the sym link for /opt/perl points to this too.
Cheers - Piers Harding - R/2 R/3 BASIS, IFACE, JAPH, whatever ...
email: piers@cpan.org