How to Deploy a SAP UI5 Application Project using Netweaver Developer Studio on SAP AS Java
As an initial step to proceed with deployment, create a Enterprise Application Project.
Goto File-> New -> Enterprise Application Project
Provide a name to this EAR project.e.g SalesOrder
Select UI5 application project to be deployed from the list below. Click Finish.
Verify the EAR project created in this project Explorer View.
Now, Right click on UI5 Applictaion Project name in the Package Explorer view and click Export.
Locate for Java EE - > EAR File option.Click Next
Select 'Overwrite existing file'check box just in case you want to use same EAR project name for multiple times you do this export
Now locate the EAR in Destinationfolder in your respective file system.
In case Destinationfolder provided by you is same every time then make sure it is updated/ overwritten with latest EAR created based on timestamp
Go back to Netweaver Developer Studio and open the Deployment Perspective.
In the Deployment List section, click on Import
Now in Deployment List section, the EAR file will be populated
click Start.
Confirmation dialog will be displayed as shown. Click OK
Finally , deploy success dialog will be shown
Now, you can run UI5 Application Project developed using URL format shown below: http://<Server_Host_Name>:50000/<UI5_Application_Project_Name>/<filename>.html
Changes Have to Do -
- 1. In Index.html
src="./sapui5-1.4/resources/sap-ui-core.js"
changes to
src="./resources/sap-ui-core.js"
- 2. In salesorderController.js
- oTable.bindRows("SalesOrders");
changes to
oTable.bindRows("/SalesOrders");
Issuses -
For Localhost (Tomacat Server) :
In the connectivity.js file
changed to
var serviceUrl = "proxy/https/sapes1.sapdevcenter.com/sap/opu/odata/sap/ZCD204_EPM_DEMO_SRV/";
This is because of Same-Origin Policy .
For Portal :
There is no need to change the service URL in connectivity.js file (Cross Origin Policy)
No comments:
Post a Comment