Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
35 lines
1.4 KiB
Markdown
35 lines
1.4 KiB
Markdown
# 1. Goal
|
|
The CDS view entity {{P}}I_SO_CUST in package $TMP contains duplicate join logic.
|
|
Refactor the view in place. Replace the duplicate join logic with one association.
|
|
The behavior of the view must stay the same.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- {{P}}I_SO_CUST is a legacy CDS view entity in package $TMP. Read its source code.
|
|
- The base tables are {{P}}SO (sales order) and {{P}}CUST (customer), package $TMP.
|
|
- Other programs and services read the view. The public interface must not change.
|
|
|
|
# 4. Contract
|
|
- The view entity {{P}}I_SO_CUST keeps these elements: ORDER_ID (key), CUSTOMER_NAME,
|
|
COUNTRY, NET_AMOUNT, AMOUNT_CLASS.
|
|
- Do not change the element names or the element types.
|
|
- The view stays in package $TMP.
|
|
|
|
# 5. Business rules
|
|
The behavior of the view must stay the same. Read the legacy source code to learn the
|
|
behavior. Every row that the view returns today must be returned after the refactoring,
|
|
with the same values. This includes orders that have no matching customer.
|
|
|
|
# 6. Constraints
|
|
- Release target: 8.16.
|
|
- Out of scope: do not change {{P}}SO and {{P}}CUST.
|
|
- Coding standards: Clean ABAP, no ATC priority 1 or 2 findings.
|
|
|
|
# 7. Acceptance
|
|
- The view is active and has no syntax error.
|
|
- The hidden tests pass.
|
|
- The duplicate join logic is replaced by one association.
|
|
- Write ABAP Unit tests with CL_CDS_TEST_ENVIRONMENT in a global test class.
|