This week SAP released the next generation of C/C++ based RFC connectivity toolkits: the SAP NetWeaver RFC SDK 7.10 (short: NW RFC SDK). Compared to the “classical” RFC SDK (which has been available since SAP R/3 Release 2.1!) this new version brings a substantial set of new features and simplifications, which we hope will make the life of C developers, who need to interface with SAP systems, much easier. This blog aims at giving an overview over these features.
The first thing to point out is: the NW RFC SDK has been a complete re-design from scratch. This allowed to throw over board some old ballast (e.g support for COM/DCOM) and to make things easier at those points, where the old architecture had made the handling of certain tasks tedious and complicated (e.g the processing of nested structures). However this also means that the API has changed incompatibly.
So people, who want to migrate existing RFC applications to the new SDK, will need to adjust their coding as well as their “way of thinking”: some things are now achieved by quite different concepts, especially in handling the input/output parameters and in the RFC Server case. So it’s not just a matter of “replacing this function call by that one”.
The new SDK now offers virtually all possibilities, which the R/3 kernel on the other side supports. E.g when connecting to a 7.00 backend, you can work with “ABAP Messages” (E-, A- and X-Messages); however, this feature is not yet available with a 4.6C backend, simply because the kernel doesn’t support it yet.
One other implication of the fact that the implementation of the RFC protocol in the R/3 kernel has changed over time, is: we didn’t want to have too many “if-elses” and special treatments in the new code. Therefore the decision was made to “cut off” at a certain point. So the NW RFC SDK only supports backend releases from 4.0B onwards. If you still need to connect to a 3.1I system, you will unfortunately need to stick to the classical SDK. However we hope this will not be too much a limitation (the number of 3.1I systems is slowly approaching zero) and the advantages gained by this decision will benefit 99% of the users.
So what are now the improvements that the NW RFC SDK has to offer?
- You no longer need to worry about getting the correct structure definitions for your imports, exports and tables. One API call fetches the complete definition of a function module from the backend DDIC and caches it for later use. (Metadata and repository functionality kind of like in JCo.)
- Setting and reading parameter values is simplified and unified, which makes it now possible to work with nested structures as well as tables defined under IMPORTING/EXPORTING.
- No need to worry about codepages anymore. You simply work with one character data type in your application, and the RFC lib automatically chooses the correct codepage for you, depending on the backend (Western European, Japanese, Kyrillic, Unicode, etc, etc).
- Working with ABAP Exceptions, ABAP Messages or System Failures is now fully supported.
- Simplified support for tRFC/qRFC. It is now possible to create tRFC transactions consisting of multiple steps (function modules).
- A simpler programming model
- Support for IPv6
- And I probably forgot a few…
The NW RFC SDK can be downloaded as described in note 1025361. Documentation will follow soon (keep an eye on that note for updates). To get started, read the header file “sapnwrfc.h” and the demo programs included in the SDK. The above note describes also, where to download doxygen documentation and a development guide in PDF format.
The first successful projects based upon the NW RFC SDK have been Piers Harding’s NetWeaver RFC gives the Next generation Ruby and Perl Connectors: wrappers around the NW RFC SDK, which allow to do RFC communication from within Ruby and Perl programs. We hope that the new RFC SDK, as well as the “scripting connectors”, will get a “warm reception” in the SAP community and will enable many new projects, which would otherwise have been difficult (or impossible) to achieve. And even if you already have a satisfactory RFC application based on the old SDK, it may be worth taking a look at the NW RFC SDK, as it might simplify your coding and ease the maintenance!
Well, that’s what I can say for a starter. Feedback is of course highly wellcome, but please understand that I have a fulltime job, a wife and a kid to take care of… So I may not be too quick in answering all questions. Professional questions and bug reports can of course always be sent to SAP via an OSS message under “BC-MID-RFC”.
The Q&A section of this blog is becoming kind of crowded now, therefore I started a new blog, introducing a couple of upcoming new features of the NW RFC Library: New developments in Netweaver RFC communication You are all invited to start asking questions there…!