You are on page 1of 4

OData Backend Generator

 
1. https://account.hanatrial.ondemand.com
2. Neo Trial -> Services
a. Mobile Services, users -> Enable (not only for OData service generation but also for mobile app)
b. Portal -> Enable (for HTML5 app only)
c. SAP Web IDE Full-Stack -> Enable
 
3. In "SAP Web IDE Full-Stack" -> Go to Service
Result: Web IDE will be opened in a new window
 
4. Web IDE -> Preferences
a. Extensions: turn on "Mobile Services App Development Tools" - SAVE!
Result: Web IDE will be refreshed automatically
 
5. Cloud Foundry:
API Endpoint:
- Check the endpoint here:
https://account.hanatrial.ondemand.com/cockpit/#/home/trialhome
Cloud Foundry Trial
Select subaccount (by default ‘trial’)
API Endpoint link is shown in the ‘Cloud Foundry’ box
(for trial: https://api.cf.eu10.hana.ondemand.com)

User Name: trial user account


 
Note: If login succeeds but "Organization" will not be shown just Save the page and reload it
 
Organization and Space will be filled in automatically (in case of multiple subaccount you have to select
the preferred one)
 
c. SAVE the page
d. (Re)Install Builder (progress indicator - bottom right corner)
Result: notification will be shown (top right corner)
e. SAVE the page
 
5. Web IDE -> Development
a. Right click on 'Workspace' -> New -> Project from Template
b. Category: Mobile Services
c. Mobile OData Service Project
d. Project Name: e.g. 'dkomDemo' -> Next
Note: If error message will be shown, just ignore it
 
6. Service App Name: e.g. 'dkomDemoApp'
Version: e.g. '1.0.0'
Deployment Target: Neo
Authentication Method: NONE
Use in-memory database
Unselect 'Use generated test data' -> Finish
 
7. Right click on Project Name -> Import -> File or Project
a. Select onlineShop.csdl.xml from the desktop (resources or dkom2019 folder)
Result: the sample metadata file will be shown in the CSDL Editor
 
8. Right click on the xml file -> Generate Mobile OData Service
Result: source files will be generated under <Project Name>/srv
 
9. Right click on SRC folder -> Import -> File or Project
a. Browse 'initial-data.zip'
b. Confirm Import
Result: Initial data files will be available in <Project Name>/srv/src/main/resources/initial-data
 
10. Right click on SRV -> Build -> Build
Result: 'target' folder will be created under <Project Name>/srv with the generated .war file
 
11. Right click on the generated .war file -> Export
Result: webarchive file can be saved locally
 
12. Go back to HANA Trial account
https://account.hanatrial.ondemand.com
 
13. Neo Trial -> Applications -> Java Applications -> Deploy Application
 
Note: only 1 service can run at a time
 
14. WAR File Location: browse saved .war file
Application Name: e.g. 'dkomdemoapp'
Runtime Name: Java EE 7 Web Profile TomEE 7
 
15. Deploy
16. Start
 
 
Android Mobile Application
 
17. Open Android Studio -> Select "Start a new SAP Cloud Platform Android project"
18. Server Connection:
Account Name: e.g. 'dkomDemoMobileApp'
Admin API URL:
19. Go back to HANA Trial account
https://account.hanatrial.ondemand.com
20. Neo Trial -> Services -> Mobile Services, users -> Go to Service
Result: Cloud Platform Mobile Services will be opened in a new tab
c. Important Links -> Copy Admin API
Note: should be something like https://hcpms-<I-USER-ID>trial.hanatrial.ondemand.com/
 
Admin UI URL: will be filled in automatically
Authentication Type: SAML
Username: trial user
Password: your pwd for trial user account

 
3. Cloud Configuration -> Create
Application Name: e.g. 'dkomDemo'
Application ID: com.sap.dkom.demo
Auth type: None
 
4. OData Services -> Add -> Create
Destination name: e.g. 'demoDestination'
Backend URL: URL of the generated and deployed service
Authentication Type: No Authentication
 
5. Android Studio Project:
Project Name: e.g. 'MyFirstDemoApp'
 
6. Next
7. Finish
8. The generated app can be run on the device or in a simulator
 
 
UI5/Fiori
 
1. https://account.hanatrial.ondemand.com
2. Neo Trial -> Applications -> HTML5 Applications -> New Application
Application Name: e.g. 'dkom'
3. Go to the application -> Versioning -> Edit Online
Result: SAP Web IDE Full-Stack will be opened
4. Clone the repository from the popup
5. Press "Do it later" in the "Git Ignore System Files" popup
6. Import the ZIP file (make sure that no subfolders are added)
7. Open the "Git Pane" on the right side
a. Press "Stage All"
b. Specify a commit message
c. Commit and push -> origin/master -> Save
d. Wait for push is completed message: "Push has been completed"
8. Go back to SCP Cockpit
9. Under "Versioning" the new commit will be shown
10. Actions column -> Create a new version based on this commit
Version Name: 1.0
11. Actions column -> Activate this application version
12. Refresh the page
13. There is a new destination name and a red circle -> copy the destination name (dkom_service)
14. Go back to Trial account -> Connectivity -> Destinations
15. New Destination
Name: dkom_service
URL: generated service URL
 
Note: All the other fields remain default
16. Save
17. Go back to the application, and restart it
18. Open the application with the Application URL
 
Fiori launchpad integration:
19. Open the Portal service in Services -> Go to service
20. Open "Site Directory", and Create a new Site using the "+" tile
Name: e.g. "dkom"
Type: SAP Fiori Launchpad
21. Create
Result: Site configuration will be opened automatically
 
22. Press the "Apps" menu
23. Create a new app using the "+" button in the bottom
a. App Resource: select your previously created application (e.g. "dkom")
Note: All other fields are filled automatically
 
24. Go to "Catalogs" tab, press Add (+) and select "Sample Catalog"
25. Go to "Groups" tab, press Add (+) and select "Sample Group"
26. Press "Save"
 
27. Close the window and select the site on Portal service home page
a. Site directory -> Edit -> Publish -> Publish
28. Hover your mouse on Site tile, and press the public URL
29. Launchpad opens with the new "dkom" tile
 

You might also like