forked from piersharding/perl-sapnwrfc
-
Notifications
You must be signed in to change notification settings - Fork 0
SAP RFC Connector using the SAP NW RFC SDK for Perl
lausser/perl-sapnwrfc
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
sapnwrfc - SAP Netweaver RFC support for Perl
================================================================================
FORK NOTICE - PLEASE READ
================================================================================
Original Author: Piers Harding <piers@cpan.org>
Original Project: https://github.com/piersharding/perl-sapnwrfc
Last Official: Version 0.37 (2013)
Fork Maintainer: Gerhard Lausser <gerhard.lausser@consol.de>
Fork Repository: https://github.com/lausser/perl-sapnwrfc
Current Version: 0.53 (2026)
ABOUT THIS FORK
---------------
This is an UNOFFICIAL maintenance fork of the original sapnwrfc project,
which has not been updated since 2013.
WHY THIS FORK EXISTS:
I maintain check_sap_health (https://github.com/lausser/check_sap_health),
a Nagios/Icinga monitoring plugin for SAP systems, which depends on sapnwrfc.
When customers want to modernize their infrastructure to current Linux
distributions (Fedora 43+, RHEL 10+, etc.), the original 2013 code fails
to compile on modern C23 compilers (GCC 14+).
This fork exists to:
- Make sapnwrfc compile on modern systems (C23/GCC 14+)
- Maintain backward compatibility with legacy systems (CentOS 7)
- Support my consulting work around SAP monitoring
- Make the code available to others who need it
This is NOT an official takeover or CPAN namespace claim. If Piers Harding
wishes to resume maintenance of the original project, I will happily defer
to the official repository.
MAINTENANCE POLICY
------------------
Status: Professional maintenance for check_sap_health support
Free Support: NONE - Use at your own risk
Bug Reports: Accepted via GitHub issues (no fix guarantees)
Pull Requests: Accepted (no merge timeline guarantees)
Priority: Features/fixes needed for check_sap_health take precedence
COMMERCIAL SUPPORT
------------------
I maintain this fork as part of my professional consulting work around
SAP monitoring (check_sap_health). If you require:
- Specific bug fixes or enhancements
- New feature development
- SNC (Secure Network Communications) implementation
- Integration with check_sap_health or other monitoring tools
- Custom SAP RFC development
- Consulting or training
I am available for PAID consulting and development work on a HIGHLY SELECTIVE
basis. My schedule is extremely limited, and I only accept engagements that
are technically interesting, well-compensated, and respect my time constraints.
In other words: I'm overworked, allergic to deadlines, and generally unavailable.
You'll need to make an exceptionally compelling case (tears optional but effective)
to get my attention.
Contact: gerhard.lausser@consol.de
IMPORTANT BOUNDARIES:
- NO free support or free development work
- NO urgent/deadline-driven projects without premium rates
- NO small requests - minimum engagement required
- Open source means the code is free, NOT my time
If you have a serious, well-funded project, can accommodate a consultant who
works on his own terms, and are prepared to beg in a heart-rending manner,
then contact me. Otherwise, please hire someone else.
RELATED PROJECTS
----------------
- check_sap_health: https://github.com/lausser/check_sap_health
Nagios/Icinga monitoring plugin for SAP systems (uses sapnwrfc)
INSTALLATION
------------
Since this is not on CPAN, install directly from GitHub:
# Using cpanm
cpanm git://github.com/lausser/perl-sapnwrfc.git
# Or manual installation
git clone https://github.com/lausser/perl-sapnwrfc.git
cd perl-sapnwrfc
perl Makefile.PL --source=/path/to/nwrfcsdk
make
make test
make install
SNC (SECURE NETWORK COMMUNICATIONS) SUPPORT
--------------------------------------------
The perl-sapnwrfc module supports SNC for encrypted/authenticated RFC connections.
This has been supported since the original code was written, but was never documented.
SNC enables:
- Mutual authentication between client and SAP system
- Encryption of data in transit
- Integration with GSS-API security libraries (SAP CommonCryptoLib, Kerberos)
Example SNC connection:
use SAPNW::Rfc;
my $conn = SAPNW::Rfc->rfc_connect(
ashost => 'sap.example.com',
sysnr => '00',
client => '800',
snc_mode => '1', # Enable SNC
snc_lib => '/usr/sap/cryptolib/libsapcrypto.so',
snc_myname => 'p:CN=CLIENT, O=MyCompany, C=US',
snc_partnername => 'p:CN=SAP/ABC, O=MyCompany, C=DE',
snc_qop => '9', # Maximum protection
lang => 'EN'
);
Key SNC Parameters:
snc_mode - Enable SNC (1=on, 0=off)
snc_lib - Path to crypto library (e.g., libsapcrypto.so)
snc_myname - Client's SNC identity (X.509 DN format)
snc_partnername - SAP server's SNC identity
snc_qop - Quality of Protection (1-9, 9=maximum)
Requirements:
- SAP NetWeaver RFC SDK 7.50+ (included in this distribution's build)
- SAP CommonCryptoLib or compatible GSS-API library
- Valid certificates/PSE files (use sapgenpse to manage)
- Backend SAP system configured for SNC
For detailed SNC setup, see the SAP documentation or contact me for consulting.
CHANGES IN VERSION 0.50 (2025)
-------------------------------
New fork by Gerhard Lausser to support check_sap_health on modern platforms.
- Fixed compilation errors on modern C23 compilers (GCC 14+)
- Fixed bool/true/false keyword conflicts
- Reduced compiler warnings
- Added LICENSE file (GPL-1.0+ OR Artistic-1.0)
- Updated documentation with fork information
- Maintains 100% backward compatibility with 0.37
Version 0.50 marks a fresh start for this fork, creating clear distance
from the abandoned upstream project with its inconsistent versioning
(0.31/0.37/0.38 in different files).
Further changes can be found in the file *Changes*.
Unfortunately the original author was not reachable any more.
<piers@cpan.org>: host b1.develooper.com[45.54.12.11] said: 554 5.7.1
<piers@cpan.org>: Recipient address rejected: Access denied (in reply to
RCPT TO command)
================================================================================
ORIGINAL README FOLLOWS BELOW
================================================================================
Copyright (c) 2006 - 2014 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
About
SAP RFC Connector using the SAP NW RFC SDK for Perl
Resources
Stars
Watchers
Forks
Languages
- XS 52.9%
- Perl 46.1%
- Shell 1.0%