2.0 KiB
2.0 KiB
1. Goal
A mobile window cleaning company records each cleaning job. Store the jobs in one database table. Later reports and services read this table.
2. Open questions
None.
3. Context
- Package: $TMP.
- The table is new. There is no other object for this task.
- The company writes one row for each cleaning job.
- A job has a customer, the hours of work, the calculation mode, the date of the order, the number of panes, the group of the job and the net value.
4. Contract
- Create the transparent database table {{P}}WINJOB in package $TMP.
- The table has these fields, in this order: client, job_id, customer, work_hours, calc_mode, order_date, pane_count, group_code, net_value.
- The key fields are client and job_id.
5. Business rules
- The fields have these data types:
- client: the client field. Key field. Not null.
- job_id: character, length 10. Key field. Not null.
- customer: character, length 10.
- work_hours: integer. The hours of work.
- calc_mode: character, length 2. The calculation mode.
- order_date: date. The date of the order.
- pane_count: integer. The number of panes.
- group_code: character, length 4. The group of the job.
- net_value: packed number, length 15, 2 decimals. The net value of the job.
- The key of the table is the client and the job id together. A job id is unique for one client.
- All key fields are not null. The other fields can be null.
- The field order in the table is the field order in the contract.
6. Constraints
- Release target: SAP_BASIS 816 (ABAP Platform 2025).
- Coding standards:
- Clean ABAP.
- Use the field names of the contract.
- Do not use ABAP SQL reserved words as field names. For example, do not use hours, mode, order, date, count, group or value.
- Out of scope: do not create other objects. Do not change SAP objects.
7. Acceptance
- The table {{P}}WINJOB is active and has no syntax error.
- The hidden tests pass.
- Write ABAP Unit tests in a global test class. Use CL_OSQL_TEST_ENVIRONMENT.