Skip to Content
author's profile photo Former Member
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?

Thanks,

Best Regards,

David.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Oct 17, 2015 at 07:39 AM

    Hi

    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.

    Otherwise,

    Write a ODATA service and consume it from your application.

    Regards,

    Venkat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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,

    David.

    Add a 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).

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.