37 lines
2.0 KiB
Markdown
37 lines
2.0 KiB
Markdown
# 1. Goal
|
|
The warehouse team counts the stock of each article in each storage bin. The team needs one table that stores the result of these counts. Other programs read the table, so the structure of the table is fixed.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- System: SAP ABAP Platform 2025 (SAP_BASIS 816), client 001.
|
|
- Package: $TMP.
|
|
- No table for this data exists. Do not use tables of SAP application components.
|
|
|
|
# 4. Contract
|
|
- Create the transparent database table {{P}}STOCK in package $TMP.
|
|
- The table contains these fields: CLIENT, BIN_ID, ARTICLE_ID, QUANTITY, UNIT_OF_MEASURE, SHELF_NO, LAST_COUNT_DATE, BLOCKED.
|
|
- Key fields: CLIENT, BIN_ID, ARTICLE_ID.
|
|
|
|
# 5. Business rules
|
|
1. One row of the table is the stock of one article in one storage bin of one client. The key fields CLIENT, BIN_ID and ARTICLE_ID identify the row. A second row with the same key values is not allowed.
|
|
2. CLIENT: data type CLNT, length 3. Key field. Not null.
|
|
3. BIN_ID: data type CHAR, length 8. Key field. Not null. The number of the storage bin.
|
|
4. ARTICLE_ID: data type CHAR, length 12. Key field. Not null. The number of the article.
|
|
5. QUANTITY: data type DEC, length 13, 3 decimals. The stock quantity. It is a quantity in the unit of measure that UNIT_OF_MEASURE contains.
|
|
6. UNIT_OF_MEASURE: data type UNIT, length 3. The unit of measure of QUANTITY.
|
|
7. SHELF_NO: data type NUMC, length 4. The shelf number in the storage bin.
|
|
8. LAST_COUNT_DATE: data type DATS. The date of the last count.
|
|
9. BLOCKED: data type CHAR, length 1. The value 'X' means that the storage bin is blocked for withdrawals. The value is initial if the storage bin is not blocked.
|
|
|
|
# 6. Constraints
|
|
- Release target: SAP_BASIS 816 (ABAP Platform 2025).
|
|
- Coding standards: Clean ABAP. Use ABAP SQL and ABAP Unit.
|
|
- Out of scope: do not create a CDS view, a report or a function module. Do not change other objects.
|
|
|
|
# 7. Acceptance
|
|
- The table {{P}}STOCK 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.
|