Files

52 lines
2.1 KiB
Markdown

# 1. Goal
The report {{P}}HELPDESK_OLD in package $TMP shows the support tickets of a
service desk. The report works, but its source code is old and hard to
maintain. Refactor the report in place. The behaviour of the report stays the
same.
# 2. Open questions
None.
# 3. Context
- The executable program {{P}}HELPDESK_OLD already exists in package $TMP and
is active. Its source code is the specification of the behaviour. Read the
source code before you change it.
- The report reads the table {{P}}TICKET. The table contains data.
Fields:
- TICKET_ID (INT4, key): the number of the ticket.
- TEAM (CHAR 12): the support team that owns the ticket.
- PRIORITY (CHAR 1): the priority of the ticket.
- OPENED_ON (DATS): the day on which the ticket was opened.
# 4. Contract
- Refactor the executable program {{P}}HELPDESK_OLD in package $TMP. The name
of the program and its public interface do not change.
- Selection screen, unchanged:
- Parameter P_FROM, type DATS, mandatory.
- Parameter P_TO, type DATS, mandatory.
- Select-option S_TEAM for the team.
- The report shows the result with CL_SALV_TABLE. The output table has these
columns with these names: TEAM, TICKETS, URGENT.
# 5. Business rules
The behaviour of the report stays the same. The current source code of
{{P}}HELPDESK_OLD defines the behaviour: which tickets are included, the
values of the output columns, and the order of the output lines. Read the
source code and keep all of it.
# 6. Constraints
- Release target: SAP_BASIS 816 (ABAP Platform 2025).
- Coding standards: Clean ABAP.
- Read the ticket data with one database access. Do not read the database
in a loop.
- Keep the methods below 40 statements.
- Pass large parameters by reference.
- The refactored program has no ATC finding of priority 1 or priority 2.
- Out of scope: do not change the table {{P}}TICKET.
# 7. Acceptance
- The program {{P}}HELPDESK_OLD is active and has no syntax error.
- The behaviour of the program is unchanged.
- The hidden tests pass.
- Write ABAP Unit tests as local test classes in the program.