48 lines
1.9 KiB
Markdown
48 lines
1.9 KiB
Markdown
# 1. Goal
|
|
Fix the CDS view entity {{P}}I_DIVE_STATS in package $TMP. The view shows the
|
|
diving activity of each diver. The operations team reports two symptoms:
|
|
- The view shows one row for each dive of a diver, not one row for each diver.
|
|
- DIVE_COUNT is always 1.
|
|
The view must show one row for each diver, and DIVE_COUNT must show the number of
|
|
dives of the diver.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- Table {{P}}DIVER (diver), package $TMP. Key: DIVER_ID (CHAR 10).
|
|
Field: DIVER_NAME (CHAR 40).
|
|
- Table {{P}}SITE (dive site), package $TMP. Key: SITE_ID (CHAR 10).
|
|
Fields: SITE_NAME (CHAR 40), DEPTH_M (INT4, depth of the site in metres).
|
|
- Table {{P}}DIVE (dive), package $TMP. Key: DIVE_ID (CHAR 10).
|
|
Fields: DIVER_ID (CHAR 10), SITE_ID (CHAR 10), DIVE_DATE (DATS).
|
|
- The CDS view entity {{P}}I_DIVE_STATS exists in package $TMP and is active.
|
|
- The class {{P}}SEED_DIVE fills the three tables with test data and shows the
|
|
view.
|
|
|
|
# 4. Contract
|
|
- Fix the CDS view entity {{P}}I_DIVE_STATS in package $TMP.
|
|
- Elements, with these names: DIVER_ID (key), DIVER_NAME, DIVE_COUNT, DEEPEST_M.
|
|
- No authorization check (#NOT_REQUIRED).
|
|
|
|
# 5. Business rules
|
|
1. The view shows one row for each diver that has at least one dive. A diver
|
|
without dives does not appear.
|
|
2. DIVE_COUNT is the number of dives of the diver. A dive whose site is not in
|
|
{{P}}SITE still counts as one dive.
|
|
3. DEEPEST_M is the greatest DEPTH_M of the sites of the dives of the diver. A
|
|
dive without a site adds nothing to DEEPEST_M.
|
|
4. DIVER_NAME is the name of the diver.
|
|
5. All other behavior stays the same.
|
|
|
|
# 6. Constraints
|
|
- Release target: SAP_BASIS 816.
|
|
- Out of scope: do not change {{P}}DIVER, {{P}}SITE, {{P}}DIVE and
|
|
{{P}}SEED_DIVE.
|
|
- Coding standards: Clean ABAP.
|
|
|
|
# 7. Acceptance
|
|
- The view is active and has no syntax error.
|
|
- The hidden tests pass.
|
|
- Write ABAP Unit tests with CL_CDS_TEST_ENVIRONMENT in a global test class.
|