Stage 2 summary at 50 accepted trajectories
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
45
tasks_gen/train/G1091/spec.md
Normal file
45
tasks_gen/train/G1091/spec.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# 1. Goal
|
||||
The CDS view entity {{P}}I_PO_VALUE shows the value of each purchase order of
|
||||
an electronics company. The view gives a wrong result. When two purchase orders
|
||||
have the same order number in two different fiscal years, the view shows a
|
||||
total that is too high and an item count that is too high for both orders.
|
||||
Fix the view. Each row must use only the items of its own purchase order.
|
||||
|
||||
# 2. Open questions
|
||||
None.
|
||||
|
||||
# 3. Context
|
||||
- The CDS view entity {{P}}I_PO_VALUE is in package $TMP. It is active. It reads
|
||||
the tables {{P}}PO_HEAD and {{P}}PO_ITEM.
|
||||
- Table {{P}}PO_HEAD (purchase order header), package $TMP.
|
||||
Key: PO_NO (CHAR 10), FISCAL_YEAR (CHAR 4).
|
||||
Fields: SUPPLIER (CHAR 10), PO_DATE (DATS).
|
||||
- Table {{P}}PO_ITEM (purchase order item), package $TMP.
|
||||
Key: PO_NO (CHAR 10), FISCAL_YEAR (CHAR 4), ITEM_NO (INT4).
|
||||
Fields: QUANTITY (INT4), PRICE (DEC 15,2, the price for one unit).
|
||||
- An order number is unique only inside one fiscal year. Two purchase orders can
|
||||
have the same PO_NO in two different fiscal years.
|
||||
- Read the current source of the view before you change it.
|
||||
|
||||
# 4. Contract
|
||||
- Fix the CDS view entity {{P}}I_PO_VALUE in package $TMP. The name of the view
|
||||
and the names of the elements do not change.
|
||||
- Elements: PO_NO (key), FISCAL_YEAR (key), SUPPLIER, ITEM_COUNT, TOTAL_VALUE.
|
||||
- The authorization check stays #NOT_REQUIRED.
|
||||
|
||||
# 5. Business rules
|
||||
1. A purchase order is identified by PO_NO together with FISCAL_YEAR.
|
||||
2. A row uses only the items of its own purchase order. Items of another
|
||||
purchase order with the same PO_NO must not change ITEM_COUNT and must not
|
||||
change TOTAL_VALUE.
|
||||
3. All other behavior of the view stays the same.
|
||||
|
||||
# 6. Constraints
|
||||
- Release target: 8.16 (SAP_BASIS 816, ABAP Platform 2025).
|
||||
- Coding standards: Clean ABAP. Keep the view simple.
|
||||
- Out of scope: do not change the tables {{P}}PO_HEAD and {{P}}PO_ITEM.
|
||||
|
||||
# 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.
|
||||
Reference in New Issue
Block a user