Snapshot: new training tasks (balanced generation), docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
53
tasks_gen/train/G1919/spec.md
Normal file
53
tasks_gen/train/G1919/spec.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# 1. Goal
|
||||
A mountain rescue service records each callout of its rescue teams. The service
|
||||
must store the callouts in a database table. A report and an OData service read
|
||||
the callouts later. Therefore the table needs a fixed structure.
|
||||
|
||||
# 2. Open questions
|
||||
None.
|
||||
|
||||
# 3. Context
|
||||
- Package $TMP, client 001. No transports.
|
||||
- The table is new. No other object of this task exists.
|
||||
- A callout is the work of one rescue team for one incident.
|
||||
- The client and the callout ID identify one callout.
|
||||
|
||||
# 4. Contract
|
||||
- Create the database table {{P}}RESCUE in package $TMP.
|
||||
- The table contains these fields, in this order:
|
||||
client, callout_id, callout_date, location, duration_min, team_size,
|
||||
rescued_count, fee_amount, currency_code.
|
||||
|
||||
# 5. Business rules
|
||||
1. The key fields of the table are client and callout_id.
|
||||
2. client has the type abap.clnt and is not null.
|
||||
3. callout_id has the type abap.char(10) and is not null. A callout ID is
|
||||
unique for one client.
|
||||
4. callout_date has the type abap.dats and is not null. It is the day of the
|
||||
callout.
|
||||
5. location has the type abap.char(30). It is the place of the incident. The
|
||||
location can be empty.
|
||||
6. duration_min has the type abap.int4. It is the duration of the callout in
|
||||
minutes.
|
||||
7. team_size has the type abap.int4. It is the number of rescuers.
|
||||
8. rescued_count has the type abap.int4. It is the number of persons that the
|
||||
team rescued.
|
||||
9. fee_amount has the type abap.dec(13,2). It is the fee for the callout.
|
||||
10. currency_code has the type abap.cuky. It is the currency of fee_amount.
|
||||
fee_amount is an amount and refers to the currency field of the same table.
|
||||
11. The table keeps one row for each pair of client and callout_id. A second
|
||||
insert with the same pair returns sy-subrc = 4.
|
||||
|
||||
# 6. Constraints
|
||||
- Release target: 8.16.
|
||||
- Use only built-in types: abap.clnt, abap.char, abap.dats, abap.int4,
|
||||
abap.dec, abap.cuky.
|
||||
- The table is not extensible. Delivery class A. Data maintenance is
|
||||
restricted.
|
||||
- Write clean ABAP. Do not create ATC priority 1 or priority 2 findings.
|
||||
- Out of scope: all other objects in package $TMP.
|
||||
|
||||
# 7. Acceptance
|
||||
- The table {{P}}RESCUE is active and has no syntax error.
|
||||
- The hidden tests pass.
|
||||
- Write ABAP Unit tests with CL_OSQL_TEST_ENVIRONMENT in a global test class.
|
||||
Reference in New Issue
Block a user