How to access SAP backend tables using SAPUI5? - eclipse

I'm totally new to SAPUI5 and after learning the classic Dynpro and developing on the SAP GUI I got a few questions about how SAPUI5 works.
As SAPUI5 is developed in Eclipse I'm interested how it could get data from a SAP NetWeaver table.
Do I need a remote call for that? And how does the Eclipse program connect and communicate with NetWeaver?
I didn't find an answer to that, maybe it's just too simple.
Maybe someone have some tips or best practice to share?
Thank you.

SAPUI5 apps are running inside the user's browser and connect to any server with HTTP. This is actually the very standard way of creating client-side web applications. You can use any kind of HTTP server as long as they offer the data at a URL and offer the data in a well-known format like JSON or XML, but when you have a Netweaver server, Gateway and using OData would be the recommended way to go.
Don't think too much about Eclipse. It is not at all required to develop SAPUI5 applications, it just used to be a well-supported editor with additional plugins in the past. Actually SAP WebIDE would be the best-integrated editor now, but you can still use anything from vim to Notepad.
There are plenty of Gateway/SAPUI5 guides on the web, also the official UI5 documentation contains chapters about getting data from the server with OData. I'd recommend doing the entire walkthrough to any beginner!

You have to write a service (as far as I know preferably using SAP NetWeaver Gateway) to expose whatever data and operations you wish to access from the back-end system.

Related

Can I use RESTful web services with Oracle ADF

I want to develop and application with the Oracle ADF, but I want a RESTful web service that will allow for other clients (a desktop app, a mobile app, etc...). TO help me determine the best way to do this I have two questions:
Does the ADF have some easy way to create a REST service built into the application?
If not, can I create a JAX-RS web service and hook it up in the same container as the ADF application?
I am thinking that because of what the ADF is, it may be best not to try to create a service with it. If so, please alert me of this.
Now with the release of jDeveloper 12.2.1 ADF comes with inbuilt REST Freamework which will solve all kinds of requirements(CRUD Operations, Custom method invocation, Paging, Data Consistency Check etc.)
The link for getting started with this
https://docs.oracle.com/middleware/1221/adf/develop/GUID-8F85F6FA-1A13-4111-BBDB-1195445CB630.htm#ADFFD589
will help a lot in getting started with REST and ADF.
For getting into more advanced features please follow this link
https://docs.oracle.com/middleware/1221/adf/develop/GUID-589F3905-5A8D-402D-B2D2-3BEEB2D7DDD4.htm#ADFFD54082
this will help in implementing all the other features in the ADF way.
Yes you can build and consume REST from ADF Faces, please see below a step-by-step tutorial for ADF 12c:
http://docs.oracle.com/cd/E53569_01/tutorials/tut_rest_ws/tut_rest_ws.html
This will work well for simple use cases, where there is not much complexity behind data entry screens.
However, you must keep in mind that ADF is most powerful when using Business Components and Bindings. Any other combination will decrease your productivity.
Yes, you can build REST service on top of ADF components, here's a fresh tutorial showing how to proceed with many Java technologies : http://multikoop.blogspot.com/2014/06/create-restful-services-on-top-of-adf.html and also http://waslleysouza.com.br/en/2014/10/expose-adf-bc-restful-web-service/
With JDeveloper 12.2.1 release, an easy way to create REST services has been provided. Using this feature, you can expose the entity objects of your choice as REST resources and then consume them easily via the DC palette.
Take a look at this blog which provides some insight into the same:
http://stick2code.blogspot.in/2015/11/creating-adfbc-rest-services-new.html

How to use alfresco java API to submit form values

I have developed one spring based java web application. In my project it is requirement to use alfresco as a CMS. For this I want to integrate this application with alfresco. So I decided to use alfresco java API's.
http://dev.alfresco.com/resource/docs/java/
But I am not getting how to use those API's to complete backend work of my web application. Suppose I would like to submit one form having user name & password fields in it. After click on submit button how can I handle request in backend so it will use Alfresco java API to process request and store details in database.
I have to do many operations in my project like upload file, play with documents, Submit different forms. view those forms etc.
My first question is am I going in right direction by using alfresco java API's. if yes then how can use those API? is there any other way to do this?
Any help would be appreciate!!!
Thanks in Advance,
Kailas Salunke.
Well, based on my experience, Alfresco is an excellent ECM but not suitable for being a CMS.
Apart from that, it is difficult to give suggestions, starting from the very general overview you have given, but things like user name and password have little to do with an ECM and storing of data in a database.
You have two options available.
One involve using the Web Content Management Quick Start, it's a Spring Surf app you can (not easily in my opinion) customize for your needs.
The other solutions, if you have an existing web app, rather than develop your own API have a look at CMIS, I have put a simple wikipedia explanation, you can dig further from there.
Then, when you are ready, have a look at Alfresco CMIS first, and the most used Java API for doing CMIS call, which is Apache Chemistry
CMIS, in its intent, guarantee that Alfresco could be replaced with any other CMIS compliant ECM. You can easily integrate Apache Chemistry in your Spring app.

Custom Web Service for xcelsius

I am involved with a team that uses Xcelsius for their dashboard presentation design. I know of options provided by SAP to connect to the database. My team used flynet but lisence issues are pushing us to think of custom webservice. Can design a custom webservice (C# or Java) and use it with Xcelsius. I will realy like to know if its worth it or there are better options for my team. thanks
I was recently involved with an engagement that built out custom web services to both write new and alter existing records in the database. This was the only option for us as SAP does not provide any viable options to write back out of the box. Also, I don't think they (SAP) should but this was a unique requirement that necessitated the workflow.
The web services were in .net

Recommendation required RESTful web services on Linux

Looking for a recommendation of which framework/web server to go with on Linux. The idea is to build database backed RESTful web services.
I know Java, c++, c# (irrelevant I guess on linux) and C. Okay with developing in any of those.
Here is a table of frameworks that have varying degrees of support for REST and the languages they use.
You might want to check out RESTx. It is multi lingual: You can write code in Java, Python (server-side JavaScript coming soon). RESTx is specifically a platform for the creation of RESTful resources and web services. It is NOT a traditional application framework. DB backed web services are actually a specialty of RESTx: You identify the reusable components you want (in this case a JDBC capable DB access component), and then just configure it through the RESTful API or by filling out a small form in a browser. As a result, you get a new RESTful web service, which encapsulates the query you specified when creating the new resource.
I'm the lead developer on RESTx, so if you have any questions, please contact me or visit our forums.
If I were you I would go with Ruby 1.9.2 + Rails 3
they're fun and you get to learn something new
ubuntu specific install guide: http://web2linux.com/installing-rails-3-on-ubuntu-10-04-lucid-lynx/
official RoR intro: http://edgeguides.rubyonrails.org/getting_started.html

Easiest way to interface between a web app and SAP

Greetings!
I've spent some time researching how to communicate with SAP from a PHP web application, but the documentation is more than spare. The ways I found are:
Creating IDoc files, some sort of proprietary plain-text format. But how do I stick them in SAP when they are created on the webserver?
Coding a Windows Application using the SAP BAPI. This way, you have full control and access - but also a lot of pain.
Accessing the RFC (Remote Function Calls), preferrably via SOAP. This would be the best way to connect to a web app.
What I could not find out is: what is the easiest way to connect? Which versions of SAP support SOAP? Anything I've missed?
Thanks for your help!
How you connect to SAP is dependent on what version of SAP, your SAP license and what you're connecting with and what you are trying to do.
If you are trying to access SAP standard functionality - i.e. Read or Update a SAP Service Order, the standard BAPI should allow you to do what you need. (Note that a BAPI is just an RFC with a standard API, which is released for customer use by SAP).
There are various connectors to SAP, but for newer releases of SAP (2004s and later) many RFC function modules are exposed as webservices, which should be ideal for your purposes.
You may have to ask an ABAP developer (or even a non-developer with SAP experience) to help you find which RFC's are available and whether they are exposed as webservices. (If not an ABAP developer should be able to wrap BAPI as a webservice with a simplified interface).
If you are trying to do something that SAP have not provided prior functionality for, or perhaps access custom developed objects you will definitely need the assistance of an ABAP developer to exposes an RFC to you.
Depending on your system setup there may be some system administration tasks to be done in order to allow you to access the SAP system. Whether by RFC or otherwise. (Useful transactions to search for are SICF and SOAMANAGER). The SAP Basis administrator may also need to set up some RFC connections for you.
If your company uses SAP PI/XI or a non-SAP integration engine, it may be easier to connect but that would be in very limited cases.
I've used IDOCs before for single message transfer, but I'm not sure that it would have any advantage over BAPI's or webservices for any Business Type transactions. Although IDOCs have been around for a while and may be quite stable if standard ones exist.
I have to admit that I've only scratched the surface around connecting to SAP, but I hope this is useful.
The third option is the easiest.
Accessing the RFC (Remote Function
Calls), preferrably via SOAP.