Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

RFC APIs

Former Member
0 Kudos

I am aware of the RFC C and Java APIs. Are there any others?

My preferred language is C++ and I would love a nice C++ OO API for RFC. Lacking one I will probably need to write my own wrapper classes on top of the existing C API.

1 ACCEPTED SOLUTION

former_member583013
Active Contributor
0 Kudos

There RFC connectors for <b>PHP</b>, <b>Ruby</b>, <b>Python</b> and <b>Perl</b>...More info here -;)

https://www.sdn.sap.com/irj/sdn/developerareas/technology?rid=/webcontent/uuid/af5aa755-0b01-0010-b2a2-84ceba9a5429">scripting [original link is broken] [original link is broken]

Greetings,

Blag.

8 REPLIES 8

former_member583013
Active Contributor
0 Kudos

There RFC connectors for <b>PHP</b>, <b>Ruby</b>, <b>Python</b> and <b>Perl</b>...More info here -;)

https://www.sdn.sap.com/irj/sdn/developerareas/technology?rid=/webcontent/uuid/af5aa755-0b01-0010-b2a2-84ceba9a5429">scripting [original link is broken] [original link is broken]

Greetings,

Blag.

0 Kudos

Thanks for the link. These wrappers look very useful. This makes the lack of a C++ connector even more odd. I would image the Python wrapper must be very C++ like and could probably be implemented almost directly in C+. Are you aware of any such efforts or of a direct C+ implementation from SAP?

0 Kudos

Hi Don:

Actually...no -:( But you should contact <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=nu3rpndlsru%3d">piers Harding</a> After all...He created the Python, Perl and Ruby connectors -:)

Greetings,

Blag.

0 Kudos

Thanks for the referral. I have sent him a note.

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Don,

our strategy regarding this can be summed up as follows:

1. So far no C++ wrapper on top of the existing RFC lib has bee offered, because

we a) don't want to support two different API sets, which actually do the same

and b) it's not absolutely needed from a technical point of view: a C++ API would

only be icing on the cake, but every one can get by without it.

2. However as Piers already told you, SAP is currently working on a new API,

completely redesigned from scratch. The API, that's offered to the outside world,

is again C. (For the same reasons as above: no "double-support", while

addressing 100% of the potential users. C++ would only address less than 50%,

and C has the additional advantage, that it can easily be called from other

languages like FORTRAN and COBOL....)

So the only option would have been to offer a C++ API in addition to the C API.

But as the support for RFC in the SAP Kernel ("calling RFCs from ABAP") takes

up most of the resources, we can't put too many resourches in the external

connectors.

Here is some good news, though: the new API, even though it's a C based API,

has been modelled like the JCo API. So it "feels" pretty much object-oriented.

The only difference is, that instead of something like

try{

functionModule.invoke();

//process functionModule

}

catch (errorInfo){

//process errorInfo

}

You would write

rc = RfcInvoke(functionModule, errorInfo);

if (rc != RFC_OK){

//process errorInfo

}

else{

//process functionModule

}

Ok, it's not quite OO (you can't group several function calls into a single try

block), but it comes as close as it can!

So my advise is: wait untill the new API appears on the market (if interested, I can

keep you updated on the release date), and ckeck it out. If it meets your

expectations, well, just use it. And if it doesn't, it'll be much easier for you to make

a C++ layer on top of it, than on top of the old API. (Plus you'll be able to take

advantage of all the new features of the new lib, like support for nested structures

and tables, automatic DDIC lookup and metadata-handling, automatic codepage-

handling.)

Best Regards, Ulrich Schmidt, RFC team

0 Kudos

Hi Ulrich,

This sounds very interesting. As we're heavily relying on SAPRFC for our solution, I'm interested in some more strategic infos about the new API:

- What is the current probable timeframe for the release? (you don't have to give an exact date, generic terms like "any time now", "summer", "this year", "next decade" are fine with me).

- Is the API based on the same low-level protocol as SAPRFC or does it introduce a new one? (or more bluntly asked: does it work with old SAP installations? If not, how long before new SAP installations won't support old SAPRFC applications?)

Thanks in advance.

Regards

Adrian

0 Kudos

Hello Adrian,

I just updated the following blog:

/people/piers.harding/blog/2007/02/28/netweaver-rfc-gives-the-next-generation-ruby-and-perl-connectors

You can find download links for the new NW RFC SDK there.

The underlying protocol is still the same: RFC. So the new SDK can be used to communicate with SAP systems from R/3 3.1I to the latest NetWeaver 7.10 (or NW2007 or whatever the marketing guys will call it).

A few of the benefits are: automatic conversion of all codepages, support for deep structures, automatic lookup and caching of meta data information, easier programming model. It should be as easy to use as JCo now, if you are familiar with JCo.

Regards, Ulrich

0 Kudos

Ulrich,

Are there any docs how to use the new rfcsdk.

Some C examples would be nice.

I have build some general C programs on top of the saprfc (only the c library)

which I would like to try out with the new library

Hans