on 06-04-2012 8:41 PM
Is there a way for an SAPUI5 application to consume an RFC directly? if not perhaps a SOAP web service?
Hi Kelly,
I posted this today in order to explain the code Gavin is referring to:
That could be what you're looking for.
Cheers,
César.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guys,
I want to pass some parameters to WSDL service from SAPUI5 interface. Can somebody tell me how to do this. Thanks and best regards.
Fahad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Much easier way is to use the standard SICF service /sap/bc/soap/rfc . It 'wraps' function modules, and converts the parameters to and from SOAP. Fairly easy to use jQuery to extract the results too.
Not well documented!
It's not perfect, but it's standard, needs no additional code, and works.
Jon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's not quite as easy as you think, but it's possible.
https://cw.sdn.sap.com/cw/groups/json-adapter-for-abap-function-modules
You should convert your RFC to a REST-based web service. Then use AJAX to call it. You will need to consider security and SSO though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
SAPUI5 is in its core a HTML5+ Javascript framework.
So if you want to consume an RFC, you need to have a javascript framework which allows this.
I do not believe such a framework exist.
If your SAPUI5 application is running on a Java based web application server (such as SAP NW Java AS or ), then it is possible to use the JCO java library to perform the connection on the server side. Then you could include the data through a JSP as @Abilash gamp suggest, or you could expose a REST API for sapui5 to easily consume (with JSONModel).
It is possible to call webservices from Javascript but it is not a common practice.
See this stackoverflow thread for more information http://stackoverflow.com/questions/124269/simplest-soap-example-using-javascript
After executing the webservice from javascript, you should create a JSONModel or an XMLModel with the contents of the response.
Regards
Dagfinn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, in that case there is no security issue (or only a minor one) by exposing ERP data through web services to mobile devices.
However, I would still consider such an implementation a 'hack' - Mobile is going to be a huge force in the coming years, so my advice would be to think about a long term mobile strategy for the company/customer and _then_ decide on the technology.
Even with Intranet use case, exposing a BAPI as a WS so that a HTML5 app can consume it, ... no, I don't think that's a good idea. I would use the portal to expose the BAPI in [whateveryouwant], adding security and role based access to the mix.
Keeps licensing issues down to a minimum, you can get HTML5 apps (online / phonegap'ed) and watch from the sideline which mobile technology from SAP will survive will be considered enterprise ready
Yasin
I came across this article today..webrfc
but Not sure if this is relevant today and what are the risks with it..you may want to check it out.
Sandip
Hi Kelly,
You can use JSP with SAPUI5 library to call a Web Service or RFC i.e., traditional way.
Thanks
Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is a standard SOAP wrapper for RFC function modules. It is service /sap/bc/soap/rfc, and the main parameter is services, which names the function to call.
You need to activate it transaction SICF, and call it with a SOAP call (i.e. not just with a URL). It's good for simple calls - some things (like commits) get a little more complex (there is a parameter session_mode to tell SAP whether to start a new session).
Hi
I am using the following code to call the jsp page:
$.ajax({
url : "test.jsp",
data : "{'name':'abc','age':'20'}",
contentType : "application/json",
type : "POST",
success : function(json) {
alert("Hi, there is no problem!");
},
error : function(xhr, status) {
alert("Sorry, there was a problem!");
},
complete : function(xhr,status) {
alert("The request is complete!");
}
})
I am getting the following error :
500 (Unable to compile class for JSP Generated servlet error: org.apache.jasper.runtime.HttpJspBase cannot be resolved to a type Generated servlet error: org.apache.jasper.runtime.JspSourceDependent cannot be resolved to a type Generated servlet error: The method getPageContext(Servlet, ServletRequest, ServletResponse, String, boolean, int, boolean) in the type JspFactory is not applicable for the arguments (test_jsp, HttpServletRequest, HttpServletResponse, null, boolean, int, boolean))
Please help. I am using NWDS (NetWeaverDevelopmentStudio) and running on localhost.
Thanks
Preety
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.