- Static bundle checks (name length, seed type, reserved words, contract test classes, testclasses_file), local abaplint parser check before SAP, max_tokens, robust JSON parse - Runner: G2 for CDS views with parameters, contract_check detail in report - G0020 and G0013 fixed by review and revalidated (oracle 100, null 0) - Pilot results in docs/faz1-tasarim.md 11e; handover notes merged into CLAUDE.md and docs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
47 lines
1.9 KiB
Markdown
47 lines
1.9 KiB
Markdown
# 1. Goal
|
|
Evaluate a production confirmation. Calculate the scrap percentage and the
|
|
severity of the scrap. The confirmation program calls one module for each
|
|
confirmation. The new module must have the same interface as the sample module,
|
|
because the confirmation program calls all modules in the same way.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- Function group {{P}}FG_PROD exists in package $TMP.
|
|
- Function module {{P}}PRD_SAMPLE exists in this group. It is the sample
|
|
confirmation module. Its interface is the interface that all confirmation
|
|
modules must use.
|
|
|
|
# 4. Contract
|
|
- Create the function module {{P}}PRD_SCRAP in function group {{P}}FG_PROD.
|
|
- Use exactly the interface of {{P}}PRD_SAMPLE: the same parameter names, kinds,
|
|
types, and exceptions.
|
|
|
|
# 5. Business rules
|
|
1. If the confirmed quantity is less than or equal to 0, raise the exception
|
|
INVALID_QUANTITY.
|
|
2. If the scrap quantity is less than 0, raise the exception INVALID_QUANTITY.
|
|
3. If the scrap quantity is greater than the confirmed quantity, raise the
|
|
exception SCRAP_TOO_HIGH.
|
|
4. The scrap percentage is the scrap quantity divided by the confirmed quantity,
|
|
multiplied by 100. Round the result half up to 1 decimal. Write the result to
|
|
the scrap percentage parameter.
|
|
5. Set the severity from the rounded scrap percentage of rule 4:
|
|
- equal to 0: `OK`
|
|
- greater than 0 and less than or equal to 5: `LOW`
|
|
- greater than 5 and less than or equal to 20: `HIGH`
|
|
- greater than 20: `CRITICAL`
|
|
6. If the severity is `HIGH` or `CRITICAL`, set the rework quantity to the scrap
|
|
quantity. In all other cases, do not change the rework quantity.
|
|
|
|
# 6. Constraints
|
|
- Release target: 7.58.
|
|
- Coding standards: Clean ABAP. Keep every method below 40 statements.
|
|
- Out of scope: do not change {{P}}PRD_SAMPLE.
|
|
|
|
# 7. Acceptance
|
|
- The function module is active and has no syntax error.
|
|
- The hidden tests pass.
|
|
- Write ABAP Unit tests for the function module in a global test class.
|