58 lines
2.2 KiB
Markdown
58 lines
2.2 KiB
Markdown
# 1. Goal
|
|
The trampoline park records each jump session of its visitors in one database
|
|
table. The booking desk writes the sessions. The reporting tools read the
|
|
sessions. Create this database table.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- Package $TMP, client 001.
|
|
- The park has no table for the jump sessions.
|
|
- The table is a transparent table.
|
|
|
|
# 4. Contract
|
|
- Create the transparent database table {{P}}JUMP in package $TMP.
|
|
- The table has exactly these fields:
|
|
|
|
| Field | Type | Key | Not null |
|
|
| --- | --- | --- | --- |
|
|
| client | ABAP client, length 3 | yes | yes |
|
|
| session_id | CHAR, length 10 | yes | yes |
|
|
| visitor_id | CHAR, length 10 | no | no |
|
|
| jump_date | DATS, length 8 | no | no |
|
|
| jump_minutes | INT4, length 10 | no | no |
|
|
| locker_no | NUMC, length 4 | no | no |
|
|
| fee_amount | DEC, length 9, 2 decimal places | no | no |
|
|
| paid | CHAR, length 1 | no | no |
|
|
|
|
- Enhancement category: not extensible.
|
|
- Delivery class: A. Data maintenance: restricted.
|
|
|
|
# 5. Business rules
|
|
1. One row of the table is one jump session.
|
|
2. client and session_id are the key fields. A session_id is unique for each
|
|
client.
|
|
3. client and session_id are not null. All other fields can be initial.
|
|
4. visitor_id identifies the visitor. It has 10 characters.
|
|
5. jump_date is the day of the session. Its format is YYYYMMDD.
|
|
6. jump_minutes is the number of minutes of the session. It is a whole number.
|
|
7. locker_no is the number of the locker of the visitor. It has 4 characters.
|
|
8. fee_amount is the price of the session. It has 9 digits and 2 decimal places.
|
|
9. paid is a flag with one character. The value 'X' means that the visitor paid
|
|
the fee. An initial value means that the visitor did not pay.
|
|
10. A second row with the same client and the same session_id is not possible.
|
|
The insert of this row gives the return code 4.
|
|
|
|
# 6. Constraints
|
|
- Release target: SAP_BASIS 816 (ABAP Platform 2025).
|
|
- Coding standards: Clean ABAP. No syntax error. No ATC priority 1 or 2
|
|
findings.
|
|
- Out of scope: no other objects. Do not change any other object.
|
|
|
|
# 7. Acceptance
|
|
- The table {{P}}JUMP is active.
|
|
- The table has the fields, the key fields and the data types of the contract.
|
|
- The hidden tests pass.
|
|
- Write ABAP Unit tests in a global test class. Use CL_OSQL_TEST_ENVIRONMENT.
|