You have created the carpool application in SAP NetWeaver Developer Studio. It is listed in the Composite Application Explorer view.
In the following section, you create business objects and their attributes for:
· Employee
· Travel Location
· Travel
...
1. In the Composite Application Explore view, expand the carpool node and click the modeled package with the secondary mouse button.
2. Choose New Business Object.
3. In the Business Object name field, enter Employee.
The business object name must not contain any special characters or spaces between letters.
4. Select Create new structure and choose Finish.
5. Repeat steps 1-2 to create business objectsfor:
○ TravelLocation
○ Travel
The business objects you have created appear under the Business Objects node.
6. Choose the business objects node Employee and on the Structure tab page, choose Edit Main Structure.
7. On the Edit tab page, in the standard caf.core application navigate in the primitive structure and choose LONG.
8. Choose with the quick info text Add Association.
The new attribute appears under the Structure Fields list. To change the name of the attribute, click it and enter id as the value of the Name attribute in the Properties view.
9. On the Structure tab page of the Employee object editor, enable the Custom key indicator for the attribute id.
10. Repeat steps 6-9 to create attributes for the business objects:
○ Travel
○ TravelLocation
The information you need is listed in the tables below.
Business Object: Employee
Field Name |
Data Type |
Key |
Cardinality |
id |
primitive.LONG |
Yes |
1..1 |
lastName |
primitive.STRING |
No |
0..1 |
firstName |
primitive.STRING |
No |
0..1 |
primitive.STRING |
No |
0..1 |
Business Object: TravelLocation
Field Name |
Data Type |
Key |
Cardinality |
id |
primitive.LONG |
Yes |
1..1 |
name |
primitive.STRING |
No |
0..1 |
Business Object: Travel
Field Name |
Data Type |
Key |
Cardinality |
id |
primitive.LONG |
Yes |
1..1 |
startDate |
primitive.DATE |
No |
0..1 |
keeper |
Reference to Employee |
No |
0..1 |
Passenger |
Reference to Employee |
No |
0..n |
startLocation |
Reference to TravelLocation |
No |
0..1 |
targetLocation |
Reference to TravelLocation |
No |
0..1 |
Business objects can have associations to other business objects. They are listed as data types in the Travel table above. To add another business object as attribute, do the following:
i. Open the Associations tab page.
ii. Select the relevant business object and choose with the quick info text Add Association.
iii. From the Cardinality dropdown box, choose the relevant cardinality of the attribute.
11. To save your application, choose with the quick info text Save application.
You have created your first business objects.