Skip to Content
avatar image
Former Member

Calling external function

Hi Gurus!

Lets assume that our partner has a C or Java lib.

From this lib we have to call a function that takes a string and gives back a string.

I would

  • make a runnable program (in C or Java),
  • call the function in it,
  • copy the program to the server,
  • RFC that program in ABAP.

Is there any better solution for that performance wise?


Best Regards,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Oct 17, 2015 at 07:39 AM


    To call a RFC from external system - you need a SAP connector.  For example Java based application, you need JCO connector, through which you can call the RFC from your external program.


    Write a ODATA service and consume it from your application.



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 19, 2015 at 09:27 AM

    Dear All,

    thanks for the answers!

    Raphael: the webservice seems like a big hassle since the client does not have dedicated webserver.

    Venkat: if I create a server program and set it in SM59 then I do not need any connector at all. Am I right?

    Matthew: I assume you had done stuff like that (since you commented on the performance...). Could you affirm me, that the whole process could be achieved like that:

    1. Write a server program in C using the sapnwrfc.h lib as in this example
    2. copy the program to the server
    3. register the destination in SM59
    4. write a function module in ABAP that will act as a client and RFC the server program with input parameters and receives the server's answer as output parameters

    It is really a matter of performance, so if you could advice something better than pls. do!

    Thanks and best regards,


    Add comment
    10|10000 characters needed characters exceeded

    • If you use a web service, then there are additional layers and data conversions that you don't go through if you use direct RFC. It seems evident then, that RFC will be faster. CPIC is an alternative to RFC, but don't know much about. I seem to recall that RFC relies on CPIC, so CPIC is likely to be the absolute fastest.

      You may find that a web service's performance is "good enough", however. So you need to balance the relative complexity of RFC (bespoke, SAP only interface) with the simplicity of a web service (global standard).

  • Oct 16, 2015 at 10:02 PM

    Hi David,

    Would not it be better to create a webservice and consume the values that you want?

    You will need:

    Created the service;
    A PI or connection created directly in SAP (Tcode SM59) ;
    ABAP developer to process the data.

    Warm regards,

    Raphael Pacheco.

    Add comment
    10|10000 characters needed characters exceeded