This page contains frequently asked questions (FAQ), related to SAP and scripting languages. Any feedback for extending and improving this list would be greatly appreciated.
Getting started with scripting languages
Where can I found information about getting started with PHP?
Where can I found information about getting started with Ruby?
Connecting to an SAP backend system
How can I connect to an SAP backend system in a scripting application?
There are several ways to access SAP backend. Two possibilities are via web services or RFC.
- PHP and RFC
When working with RFC connections and PHP one must use the SAPRFC library to make a connection to the R/3 or NetWeaver backend system.
- PHP and web services
When working with web service connections the standard PHP SoapClient class or the nusoap package can be used.
- Ruby and RFC
When working with RFC connections and Ruby one must use the SAP::Rfc library to make a connection to the R/3 or NetWeaver backend system.
- Perl and RFC
Perl works easily with the SAP RFC. Download the SAP::Rfc or sapnwrfc (RFC SDK supplied by SAP for NW2004+) from CPAN and compile against the appropriate SAP RFC library.
Since which version are RFC and WS available?
RFC functionality between two SAP systems or between an external system and an SAP system has been available since Release 2.1 of the SAP system. Up to Release 3.0 of the SAP system, RFCs are executed directly using the application server; in later versions, the load can be distributed across application servers by using a pre-activated message server. (source)
What access rights do I need to make RFC calls?
RFC Trusted/Trusting Systems states authorization object S_RFCACL is needed, which can be checked using the AUTHORITY_CHECK_TRUSTED_SYSTEM function module. However, this did not work for me - the SCRIPTUSR apparently does not have this authorization, but is able to make RFC calls.
Introduction to RFC Client Programs states: Logon to an SAP system is possible with a DIALOG user or a CPIC user
What is a BAPI? What is a RFC? What is the difference?
Business Application Programming Interface (BAPI) is a business method defined on a business object inside a SAP system. A Remote Function Call (RFC) is used as the technical way to call this method.
I have a different version of librfc. Can I use it?
The RFC library is downward and upward compatible, so you should be able to use it. We recommend that you use the newest version available for your operating systems. (Source: SAP Note 413708)
Where can I find a list of connectors, which version numbers, functionality, and installation howto, for all supported languages?
Where can I get the 'librfc' library?
In the Service Marketplace: RFC Library. Please also note the mentioned SAP Notes about current version, download location and additional required libraries.
Is the ... connector Unicode-aware?
There are three variants of system connections: if both the client and the server are unicode aware, unicode is used directly. If only one side uses unicode, encoding is done on this side. If neither of the systems use unicode, the client (calling side) is doing the conversion according to the codepages.
- PHP: the connector requires the non-unicode librfc. open: how well does librfc handle conversions? is this dependend on the php part also?
- Ruby, Phyton, Perl: open
Do I need the RFC SDK?
No, you don't need the SDK for using the runtime connectors if you're using connectors' binaries. However, if you want to compile it yourself or want to change the connectors get it from http://service.sap.com/swdc -> Download -> Support Packages and Patches -> Additional Components -> SAP RFC SDK.
Does SAP Webservices support all SOAP features?
According to this page the following features are not supported: SOAP Actor, SOAP Encoding, binary Attachments, non-HTTP(s) transport binding.
How can I create my own Webservices?
Which licence I need to use LIBRFC32.DLL in my application?
You can use the librfc without any special license. But the redistribution of the library is not allowed. So if you want to sell your system to other SAP customers, you must not deliver the librfc with your system, but the SAP customers should download the latest version from the SAP Service Marketplace. (source)
Which ports are needed for RFC/WS access? I need to configure my firewall.
This PDF lists all IP Ports used by SAP applications.
SAP Scripting Framework
What is SAP Scripting Framework?
The SAP Scripting Framework is a set of tools that help scripting developers to import SAP backend systems into a repository and then generate backend calls in a number of scripting languages.
For more information, please visit this page: SAP Scripting Framework.
Download is available here: Scripting Languages Tool (Preview)
Scripting in a Box
What is Scripting in a Box?
Scripting in a Box is a package, containing a web server; MySQL database software; scripting runtimes for PHP, Perl, Ruby and Python; Eclipse development environment. All these products can be installed with a single installation procedure and configured easily.
Download is available here: Scripting in a Box.