Skip to Content
avatar image
Former Member

Call RFC from SAP UI5 application

Hello,

We are planning to develop some SAP UI5 application based on the Java development using NWDS. I was searching online on how we can call RFCs from SAP UI5 applications but did not find specific details.

I know there is one way to do it through Gateway. But we do not have SAP Gateway right now and not planning to get in near future due to licensing cost.

So, I was told to develop something in SAP UI5 without using SAP Gateway and interact with SAP system.

Can someone tell me the procedure or the path to take?

So far i understood that, I can call RFCs through JCOs or I can publish RFCs as Web Services and then call that WS. But, need to convert SOAP response to JSON in order to consume it in the SAP UI5. Is it true?

If that is right, what are the ways to consume either SAP Web Service or RFCs in SAP UI5 application?

Thanks,

Bhavik

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jan 24, 2014 at 06:47 AM

    Hi Bhavik

    You can not consume the RFC Directly.

    Because SAP UI5 is a open source and is not a integrated and tight framework as in WD Java or WD Abap where you can directly consume using JCO's in case wdjava and a just RFC call in WD Abap.

    Here in SAPUI5 as a open framework only understands the open protocols like json,xml or oData.

    So at any cost your RFC has to be converted /exposed to the one of these protocol

    That is what the Netweaver Gateway comes into the picture.

    Use Gateway to publish RFC as a oData Channel URL so that you can consume easily

    Hope this will help you.

    Regards

    KALYAN

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Ajay,

      I am developing SAPUI5 using jsp file.

      I succeed calling RFC fromthat  jsp using JCo.

      This JSP is deployed in the portal AS J2EE server.

      The question is: why should I use JSON to convert the Java object returned by JCo?

      Thanks.

      Regards.

  • May 19, 2016 at 02:19 PM

    Hi Bhagat Sanjay ,

    Please refer to below link where I have shown how to call RFC using SAP JCO Connector.

    SAP UI 5 – CALLING RFC THROUGH SAP JCO.

    Regards,

    Varun

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 27, 2013 at 03:46 PM

    hi Bhavik,

    Please see the below link, it may be helpful.

    http://scn.sap.com/message/14191555

    Regards,

    Prasad.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 22, 2015 at 04:18 PM

    Hi.

    If I want to consume a web service that I wrote in Java, how should I do it (so no SAP Gatewayhere of course)?

    The web service is deployed on SAP Portal WAS.

    If I understood good, I think I should avoid using REST method.

    Thanks.

    Regards,

    Add comment
    10|10000 characters needed characters exceeded