Professional Documents
Culture Documents
APPS
MOB260
Exercises / Solutions
Matt Borges, Milton Chandradas, Davinder Singh,
Midhun VP,Raca Jha, Chris Jobson, Wolfgang Scheer / SAP
SE
MOB260
TABLE OF CONTENTS
2 Preparations .......................................................................................................................................5
4 Exercise #1 .........................................................................................................................................23
5 Exercise #2 .........................................................................................................................................25
6 Exercise #3 .........................................................................................................................................33
7 Exercise #4 .........................................................................................................................................43
8 Exercise #5 .........................................................................................................................................53
9 Exercise #6 .........................................................................................................................................65
10 Exercise #7.........................................................................................................................................73
2
MOB260
11 Exercise #8.........................................................................................................................................93
3
MOB260
Most of the time, uncommenting code simple requires removing a "/*" and a
"*/". Most of the time, commenting out code simple requires adding a "/*" and
a "*/".
Each exercise also has one or more notes in the code that pinpoint some of
the more important pieces. These can be found by searching for "NOTE
#<Exercise>" (for example, "NOTE #1"). Read the notes while waiting for the
app to launch.
Chapter 1: Preparations
Estimated Duration: 5 minutes
Chapter 3: Exercise #1
Estimated Duration: 5 minutes
Chapter 4: Exercise #2
Estimated Duration: 5 minutes
Chapter 5: Exercise #3
Estimated Duration: 5 minutes
Chapter 6: Exercise #4
Estimated Duration: 5 minutes
Chapter 7: Exercise #5
Estimated Duration: 10 minutes
Chapter 8: Exercise #6
Estimated Duration: 5 minutes
Chapter 9: Exercise #7
Estimated Duration: 10 minutes
4
MOB260
2 PREPARATIONS
Overview
Estimated time: 5 minutes
Objective
In this unit you will learn how start the local SAP Mobile Platform Server, set up your
workspace and connect your device.
2. Double click .
5
MOB260
2. Click on
with the right mouse button.
3. Click .
4. Click
.
6. Click .
7. Click on
with the right mouse button.
6
MOB260
Explanation Screenshot
8. Click
.
9. Click .
7
MOB260
8
MOB260
Explanation Screenshot
5. Click somewhere in the
folder with the right mouse
button while holding down the
SHIFT key.
9
MOB260
1. Click .
3. Click .
10
MOB260
Explanation Screenshot
4. Enter adb devices to check
if there are any devices already
connected.
Summary
You have completed the exercise!
11
MOB260
3 APPLICATION SETUP
Overview
Estimated time: 10 minutes
Objective
In the this unit you will learn how to set up the application, deploy it, and register with the
SMP server.
2. Select the
IPv4 adress .
Therefore click .
4. Click .
12
MOB260
Explanation Screenshot
5. Click .
8. Click
.
13
MOB260
Explanation Screenshot
11. Click .
14
MOB260
the field.
15
MOB260
Explanation Screenshot
3. Press
16
MOB260
Explanation Screenshot
4. Navigate some of the data to
see that you can follow
relationships.
Press .
5. Press
to see details of the customer.
17
MOB260
Explanation Screenshot
6. You can navigate back by
7. Click .
18
MOB260
Explanation Screenshot
9. Click .
10. Press
19
MOB260
Explanation Screenshot
11. Click
.
12. Click .
20
MOB260
Explanation Screenshot
13. Click .
14. Press
Summary
You have completed the exercise!
21
MOB260
22
MOB260
4 EXERCISE #1
Overview
Estimated time: 5 minutes
Objective
In this exercise you will learn how to change defining requests so that relationships are
downloaded without using $expand.
4.1 Exercise 1
In this exercise the defining requests get modified so that all needed data and relationships
are fetched from the backend without using $expand.
Explanation Screenshot
1. Open up the index.html file
in Notepad++. If you need help
performing that, take a look at
Open up Important Windows.
23
MOB260
Explanation Screenshot
Summary
You have completed the exercise!
24
MOB260
5 EXERCISE #2
Overview
Estimated time: 5 minutes
Objective
In this exercise we will set the request format for the gateway backend and mark the
Products defining request as shared.
5.1 Exercise 2
Explanation Screenshot
1. Open up a Internet Explorer
window. Then enter the
following link:
https://localhost:8083/Admin/ .
You can also click the link
directly.
2. Click
in order to proceed.
25
MOB260
Explanation Screenshot
4. Enter "Welcome16" as
password.
5. Click .
6. Click to
enter the application section.
26
MOB260
Explanation Screenshot
7. Click on the Application
ID .
9. Click to
import a .ini file.
27
MOB260
Explanation Screenshot
11. Go to
D:\Files\Session\MOB260\mob
260_app and select the .ini file
.
Click to confirm
your selection.
28
MOB260
Explanation Screenshot
15. Your screen should now
look like this.
29
MOB260
Click .
2. Click .
3. Click .
30
MOB260
Explanation Screenshot
4. Click
5. Click .
31
MOB260
Explanation Screenshot
6. Click .
7.
You can still navigate and follow dependencies. But this
time the offline store was used.
Summary
You have completed the exercise!
32
MOB260
6 EXERCISE #3
Overview
Estimated time: 5 minutes
Objective
This exercise will show how to use client-driven paging in your application.
6.1 Exercise 3
Explanation Screenshot
1. Open up the index.html file
in Notepad++. If you need help
performing that, take a look at
Open up Important Windows.
33
MOB260
Explanation Screenshot
3. Enter Exercise #3 in the text
field then press ENTER or use
the button "Find Next".
34
MOB260
Explanation Screenshot
7. Uncomment the uncomment
section by removing .
35
MOB260
Explanation Screenshot
11. Find the next occurence by
pressing ENTER in the search
window.
36
MOB260
Explanation Screenshot
16. Find the next occurence by
pressing ENTER in the search
window.
37
MOB260
Explanation Screenshot
21. Remove also the end of the
comment section .
38
MOB260
Explanation Screenshot
27. Your screen should now
look like this.
39
MOB260
Click .
Click .
40
MOB260
Explanation Screenshot
3. By altering the number in the
41
MOB260
Summary
You have completed the exercise!
42
MOB260
7 EXERCISE #4
Overview
Estimated time: 5 minutes
Objective
In this exercise you will learn how to use server-driven paging in your app.
7.1 Exercise 4
Explanation Screenshot
1. Open up the index.html file
in Notepad++. If you need help
performing that, take a look at
Open up Important Windows.
43
MOB260
Explanation Screenshot
3. Click to
find the next occurrence.
6. Click to
find the next occurrence.
44
MOB260
Explanation Screenshot
7. Uncomment the uncomment
section by removing .
9. Click to
find the next occurrence.
11. Click
to find the
next occurrence.
45
MOB260
Explanation Screenshot
12. Remove also the end of the
comment section .
13. Click
to find the
next occurrence.
15. Click
to find the
next occurrence.
46
MOB260
Explanation Screenshot
16. Uncomment the
uncomment section by
removing .
17. Click
to find the
next occurrence.
47
MOB260
Explanation Screenshot
48
MOB260
2. Press to use
server-driven paging.
49
MOB260
Explanation Screenshot
3. Increase the number of items
per page to the total of existing
entries. In this case it is 39.
4. You need to
hit for the
change to take affect.
6. Now
select
50
MOB260
Explanation Screenshot
7. Press to
see the changes.
Press .
9. Click .
51
MOB260
Explanation Screenshot
10. Your screen should now
look like this.
Click
Summary
You have completed the exercise!
52
MOB260
8 EXERCISE #5
Overview
Estimated time: 10 minutes
Objective
In this exercise you will learn how to enable the app to edit line items that were downloaded
from the backend.
8.1 Exercise 5
Explanation Screenshot
1. Open up the index.html file
in Notepad++. If you need help
performing that, take a look at
Open up Important Windows.
53
MOB260
Explanation Screenshot
3. Click to
find the next occurrence.
6. Click to
find the next occurrence.
54
MOB260
Explanation Screenshot
7. Uncomment the uncomment
section by removing .
8. Click to
find the next occurrence.
10. Click
to find the
next occurrence.
55
MOB260
Explanation Screenshot
11. Uncomment the
uncomment section by
removing .
13. Click
to find the
next occurrence.
56
MOB260
Explanation Screenshot
16. Click
to find the
next occurrence.
57
MOB260
Explanation Screenshot
21. Your screen should now
look like this.
58
MOB260
Click .
59
MOB260
Explanation Screenshot
3. Choose a RANDOM line
item. The remaining steps
show the exercise based on
selecting 0000000020.
60
MOB260
Explanation Screenshot
5. Edit the quantity.
7. Click .
61
MOB260
Explanation Screenshot
8. Press to
navigate back.
Do a .
Go to .
62
MOB260
Explanation Screenshot
11. Click .
Click .
13. Click
14. Click
.
63
MOB260
Explanation Screenshot
16. To see the changes follow
the next steps:
Click .
17. Click
.
Summary
You have completed the exercise!
64
MOB260
9 EXERCISE #6
Overview
Estimated time: 5 minutes
Objective
In this exercise you will see how to create a line item.
9.1 Exercise 6
Explanation Screenshot
1. Open up the index.html file
in Notepad++. If you need help
performing that, take a look at
Open up Important Windows.
65
MOB260
Explanation Screenshot
3. Click to
find the next occurrence.
5. Click to
find the next occurrence.
66
MOB260
Explanation Screenshot
7. Click to
find the next occurrence.
10. Click
to find the
next occurrence.
67
MOB260
Explanation Screenshot
11. Uncomment the
uncomment section by
removing .
13. Click
to find the
next occurrence.
68
MOB260
Explanation Screenshot
69
MOB260
Click .
3. Click to create a
new line item.
70
MOB260
Explanation Screenshot
4. Enter the Quantity (positive
integer).
5. Enter a note.
6. Click .
71
MOB260
Explanation Screenshot
7. Notice that the line item is
annotated with
on both the detail screen and
the list screen.
Click .
Summary
You have completed the exercise!
72
MOB260
10 EXERCISE #7
Overview
Estimated time: 10 minutes
Objective
In this exercise you will see how to correctly use URLs returned from the SDK to read and
edit both locally created entities and ones that are downloaded from the backend.
10.1 Exercise 7
Explanation Screenshot
1. Open up the index.html file
in Notepad++. If you need help
performing that, take a look at
Open up Important Windows.
73
MOB260
Explanation Screenshot
3. Click to
find the next occurrence.
5. Click to
find the next occurrence.
7. Click to
find the next occurrence.
74
MOB260
Explanation Screenshot
8. Uncomment the uncomment
section by removing .
10. Click
to find the
next occurrence.
75
MOB260
Explanation Screenshot
13. Click
to find the
next occurrence.
16. Click
to find the
next occurrence.
76
MOB260
Explanation Screenshot
18. Click
to find the
next occurrence.
20. Click
to find the
next occurrence.
22. Click
to find the
next occurrence.
77
MOB260
Explanation Screenshot
23. Uncomment the
uncomment section by
removing .
24. Click
to find the
next occurrence.
27. Click
to find the
next occurrence.
78
MOB260
Explanation Screenshot
30. Click .
35. Click
to find the
next occurrence.
79
MOB260
Explanation Screenshot
36. Comment the comment
section by adding /*.
38. Click
to find the
next occurrence.
80
MOB260
Explanation Screenshot
41. Click
to find the
next occurrence.
44. Click
to find the
next occurrence.
81
MOB260
Explanation Screenshot
45. Comment the comment
section by adding //.
47. Click
to find the
next occurrence.
50. Click
to find the
next occurrence.
82
MOB260
Explanation Screenshot
51. Uncomment the
uncomment section by
removing .
53. Click
to find the
next occurrence.
83
MOB260
Explanation Screenshot
57. Enter cordova run android
to build the application and
deploy the application to the
device.
84
MOB260
Click .
85
MOB260
Explanation Screenshot
4. On the details screen, press
86
MOB260
Explanation Screenshot
6. Edit the note.
7. Press .
87
MOB260
Explanation Screenshot
8. Click .
Click .
88
MOB260
Explanation Screenshot
10. Edit the line item you
created in Exercise #6.
Click .
89
MOB260
Explanation Screenshot
12. Edit the note.
13. Click .
14. Click .
15. Do a .
90
MOB260
Explanation Screenshot
16. Do a .
17. Click .
18. Click
91
MOB260
Summary
You have completed the exercise!
92
MOB260
11 EXERCISE #8
Overview
Estimated time: 10 minutes
Objective
In this exercise you will learn how to create a new sales order and a new related line item
using Content-ID referencing in a change set (instead of a deep insert).
11.1 Exercise 8
Explanation Screenshot
1. Open up the index.html file
in Notepad++. If you need help
performing that, take a look at
Open up Important Windows.
93
MOB260
Explanation Screenshot
3. Click to
find the next occurrence.
5. Click to
find the next occurrence.
6. Click .
94
MOB260
Explanation Screenshot
7. Click to
find the next occurrence.
95
MOB260
Explanation Screenshot
12. Click
to find the
next occurrence.
15. Click
to find the
next occurrence.
96
MOB260
Explanation Screenshot
16. Now we finished changing
the index.html file.
97
MOB260
4. Click .
98
MOB260
Explanation Screenshot
5. Go to the new sales order
detail screen.
Click .
7. Click .
Click .
99
MOB260
Explanation Screenshot
9. Click .
10. Click .
11. Do a .
100
MOB260
Explanation Screenshot
12. Do a .
13. Click .
Summary
You have completed the exercise!
101