39 lines
1.5 KiB
Markdown
39 lines
1.5 KiB
Markdown
# 1. Goal
|
|
The CDS view entity {{P}}I_FILM_REVENUE shows the revenue of each film in a
|
|
cinema chain. Users report that a film appears several times in the view, once
|
|
for each screening. Fix the view so that it shows one row for each film.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- Table {{P}}SCREEN (screening), package $TMP. Key: SHOW_ID (CHAR 10).
|
|
Fields: FILM (CHAR 10), SHOW_DATE (DATS), HALL (CHAR 4), STATUS (CHAR 1).
|
|
- Table {{P}}TICKET (ticket), package $TMP. Key: SHOW_ID (CHAR 10),
|
|
TICKET_NO (INT4). Fields: PRICE (DEC 15,2, price of one ticket).
|
|
- The CDS view entity {{P}}I_FILM_REVENUE is in package $TMP. It joins
|
|
{{P}}SCREEN and {{P}}TICKET.
|
|
|
|
# 4. Contract
|
|
- The CDS view entity {{P}}I_FILM_REVENUE stays in package $TMP.
|
|
- Elements, with these names: FILM (key), TICKET_COUNT, REVENUE.
|
|
- No authorization check (#NOT_REQUIRED).
|
|
|
|
# 5. Business rules
|
|
1. Show one row for each film that has at least one ticket. Do not show a film
|
|
without tickets.
|
|
2. TICKET_COUNT is the number of tickets sold for the film.
|
|
3. REVENUE is the sum of the prices of all tickets of the film.
|
|
4. All other behavior of the view stays the same.
|
|
|
|
# 6. Constraints
|
|
- Release target: SAP_BASIS 816.
|
|
- Out of scope: do not change {{P}}SCREEN, {{P}}TICKET and {{P}}SEED_CINEMA.
|
|
- Coding standards: Clean ABAP. No ATC priority 1 or 2 findings.
|
|
- Out of scope: do not create other objects.
|
|
|
|
# 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.
|