You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Exercise 3.2 Create the Business Object Behavior Definition and Implementation
178
178
179
-
After completing these steps you will have created the Behavior Definitionand Implementation for your Busines Object Views. The behavior definition defines what operations are possible for your Business Object.
179
+
After completing these steps you will have created the Behavior Definition and Implementation for your Business Object Views. The behavior definition defines what operations are possible for your Business Object.
180
180
181
181
1. Right-click on the Z_I_TRAVEL_U_XXX CDS Artifact and choose “New Behavior Defintion“.
182
182
<br>
183
183
184
184
2. Provide the default description, and change the Implementation Type to “Unmanaged”. Then click “Next”, then “Finish”.
185
185
<br>
186
186
187
-
3. You will then see the Behavior Defintion editor. You should see 3 seperate behavior definitions here, one for Travel, Bookings, and BookingSupplement.
187
+
3. You will then see the Behavior Defintion editor. You should see 3 separate behavior definitions here, one for Travel, Bookings, and BookingSupplement.
188
188
<br>
189
189
190
190
4. Let’s modify this definition. In this case, we don’t want a single implementation class for Travel, Booking, and BookingSupplement. Instead lets define the implementation classes specifically for each definition. First remove that from the first line so that it only contains the unmanaged key word.
@@ -221,7 +221,7 @@ action set_status_booked result [1] $self;
221
221
}
222
222
223
223
```
224
-
9. Next drop down the the second definition, the definition for Z_I_BOOKING_U_XXX. Add the follwing lines of code before the create keyword.
224
+
9. Next drop down to the second definition, the definition for Z_I_BOOKING_U_XXX. Add the following lines of code before the create keyword.
225
225
```abap
226
226
field ( read only ) TravelID, BookingID;
227
227
field ( mandatory ) BookingDate, CustomerID, AirlineID, ConnectionID, FlightDate;
@@ -230,7 +230,7 @@ action set_status_booked result [1] $self;
230
230
10. Now remove the create keyword, since we will handle the creation of bookings in association with the travel. So we only need the update and delete keywords.
231
231
<br>
232
232
233
-
11. After the delete keyword, add the following mapping statement.
233
+
11. After the association keyword, add the following mapping statement.
234
234
```abap
235
235
mapping for /dmo/booking
236
236
{
@@ -247,7 +247,7 @@ action set_status_booked result [1] $self;
247
247
248
248
```
249
249
250
-
12. Next, drop down tot he Z_I_BOOKINGSUPPLEMENT_XXX definition. Add the follwing lines of code before the create keyword.
250
+
12. Next, drop down to the Z_I_BOOKINGSUPPLEMENT_XXX definition. Add the following lines of code before the create keyword.
251
251
```abap
252
252
field ( read only ) TravelID, BookingID, BookingSupplementID;
253
253
field ( mandatory ) SupplementID, Price;
@@ -1898,4 +1898,4 @@ define service Z_SD_C_TRAVEL_U_XXX {
1898
1898
1899
1899
You've now created your Business Object data model, defined and implemented your Behaviors, created Projections over both, and exposed your data model as an OData service using the Unmanaged Scenario of the RESTful Programming Model
1900
1900
1901
-
Continue to - [Exercise 4 - ABAP RESTful Programming Model - Managed ](../ex4/README.md)
1901
+
Continue to - [Exercise 4 - ABAP RESTful Programming Model - Managed ](../ex4/README.md)
0 commit comments