Dyeing and Finishing Recipe Versioned Upload and Management Program
Short answer: A custom program that loads lab-approved dyeing and finishing recipes (dyestuffs, chemicals, concentrations, liquor ratio) into SAP as bills of material per colour, versioned with a change number. Every recipe change becomes a new dated version; production orders take the recipe valid on that day and the old recipe stays in the history.
- Estimated effort
- M · 7–10 working days
- System
- ECC and S/4HANA
- Tables
- 6
- Scope
- Global · 1 industries
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
CS01/CS02 maintain the bill of material manually, item by item; they do not convert concentrations (% on weight of fabric or g/l) into quantities for the base quantity and do not show the difference between the old and new recipe. Recipes from the lab therefore often stay outside SAP, and costing and stock consumption do not reflect reality. The program calculates the recipe and loads it with a difference list and a change number.
Who uses it? Dye house and finishing supervisors, colour lab, production master data and costing teams.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| MASTMaterial to BOM Link | Material-to-BOM link; created with the first recipe | Read / write | ECC + S/4 |
| STKOBOM Header | BOM header: alternative, base quantity, validity | Write | ECC + S/4 |
| STPOBOM Item | Recipe items: dyestuff and chemical quantities | Write | ECC + S/4 |
| AENRChange Master | Change number and validity date for versioning | Read | ECC + S/4 |
| MKALProduction Versions of Material | Check that the production version points to the right alternative | Read | ECC + S/4 |
| MARAGeneral Material Data | Component existence and deletion flag check | Read | ECC + S/4 |
BAPIs and functions used
- CSAP_MAT_BOM_CREATECreate Material BOM. Creates the first BOM for a colour without a recipe
- CSAP_MAT_BOM_READDisplay Material BOM. Reads the valid recipe version for the difference list
- CSAP_MAT_BOM_MAINTAINMaintain Material BOM. Saves the new recipe version with the change number
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| P_FILE | Recipe file (XLSX or CSV) | Single value | — | Yes | C:\temp\recete_2026-11.xlsx |
| P_WERKS | Plant | Single value | MAST-WERKS | Yes | 1000 |
| P_STLAN | BOM usage | Single value | MAST-STLAN | Yes | 1 |
| P_AENNR | Change number | Single value | AENR-AENNR | Yes | 500000000412 |
| P_TEST | Test mode (difference list only) | Checkbox | — | No | X |
Input file columns
The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.
| # | Column | Target field | Required |
|---|---|---|---|
| 1 | Colour / product material | MAST-MATNR | Yes |
| 2 | Alternative | STKO-STLAL | No |
| 3 | Base quantity | STKO-BMENG | Yes |
| 4 | Base unit | STKO-BMEIN | Yes |
| 5 | Lab recipe no. | By rule Recipe number from the lab system; written to the BOM header text | No |
| 6 | Component (dyestuff/chemical) | STPO-IDNRK | Yes |
| 7 | Concentration | By rule Value in % on weight of fabric or g/l | No |
| 8 | Concentration type | By rule OWF (% on weight of fabric) or GL (g/l) | No |
| 9 | Liquor ratio | By rule Fabric to bath ratio, e.g. 1:8 | No |
| 10 | Component unit | STPO-MEINS | Yes |
| 11 | Valid from | AENR-DATUV | Yes |
Sample upload file
| 1 | Colour / product material * | Alternative | Base quantity * | Base unit * | Lab recipe no. | Component (dyestuff/chemical) * | Concentration | Concentration type | Liquor ratio | Component unit * | Valid from * |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | BYK-NAVY-118 | 01 | 100 | KG | LAB-26-0418 | DYE-RB-221 | 1.85 | OWF | 1:8 | KG | 12/01/2026 |
| 3 | BYK-NAVY-118 | 01 | 100 | KG | LAB-26-0418 | DYE-YL-114 | 0.42 | OWF | 1:8 | KG | 12/01/2026 |
| 4 | BYK-NAVY-118 | 01 | 100 | KG | LAB-26-0418 | CHM-SALT-01 | 60 | GL | 1:8 | KG | 12/01/2026 |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Row | Calculated Row number in the file |
| 2 | Material | MAST-MATNR |
| 3 | Alternative | STKO-STLAL |
| 4 | Component | STPO-IDNRK |
| 5 | Old quantity | Calculated STPO-MENGE in the valid version |
| 6 | New quantity | STPO-MENGE |
| 7 | Change number | AENR-AENNR |
| 8 | Status | Calculated Added, changed, unchanged, removed or error |
| 9 | Message | Calculated Check or function return message |
Sample result list
| Row | Material | Alternative | Component | Old quantity | New quantity | Change number | Status | Message |
|---|---|---|---|---|---|---|---|---|
| 2 | BYK-NAVY-118 | 01 | DYE-RB-221 | 1.72 | 1.85 | 500000000412 | Changed | Concentration raised from 1.72% to 1.85% |
| 3 | BYK-NAVY-118 | 01 | DYE-YL-114 | 0.42 | 0.42 | 500000000412 | Unchanged | |
| 4 | BYK-NAVY-118 | 01 | CHM-SALT-01 | 40 | 48 | 500000000412 | Changed | 60 g/l × liquor 1:8 → 48 kg per 100 kg fabric |
| BYK-NAVY-118 | 01 | DYE-RD-305 | 0.08 | 0 | 500000000412 | Removed | Not part of the new recipe |
How does the program work?
- The file exported from the lab or dye dispensing system is read: colour/product material, recipe number, dyestuffs and chemicals, concentration and its type (% on weight of fabric or g/l), liquor ratio.
- Concentrations are converted into quantities for the BOM base quantity (e.g. 100 kg fabric): for % on weight of fabric, quantity = base × % / 100; for g/l, quantity = base × liquor ratio × g/l / 1000.
- The components are checked to exist in MARA without a deletion flag; the change number given must be open and valid in AENR.
- If the material has no BOM in MAST, CSAP_MAT_BOM_CREATE creates the first alternative. If it has one, CSAP_MAT_BOM_READ reads the valid version, a difference list (added, removed, changed components) is prepared and CSAP_MAT_BOM_MAINTAIN saves the new version under the change number with its validity date.
- If colour variants are kept as separate alternatives (STKO-STLAL), the program checks that the related production version (MKAL) points to that alternative and warns if not.
- In test mode only the difference list is shown; in a real run the result of every row is logged.
Performance notes
Read the materials and components in the file from MARA and MAST in one pass. Read the BOM of each colour material once and save all its lines in a single maintenance call; do not call per line.
Features
- Test mode (check without posting) Test mode shows the old and new recipe side by side; nothing is saved.
- Line-by-line result and error log
- Download failed lines as a separate file
- Export to Excel An empty upload template can be downloaded as Excel.
Authorization objects
- C_STUE_WRKBOM change authorization by plant
- C_STUE_BERAuthorization by BOM authorization group
- C_AENR_BGRAuthorization to use the change number
Frequently asked questions
What if the liquor ratio differs by machine?
The quantity of chemicals given in g/l depends on the liquor ratio. A separate alternative can be kept per machine group, or the g/l chemicals can be recalculated with the machine's liquor ratio and order quantity when the production order is created. The second option needs extra development and is estimated separately.
Does it work for companies using PP-PI master recipes?
Yes. Components are still kept in the BOM and loaded the same way. If process parameters such as temperature and time should also be written to the master recipe, the scope grows; that part is assessed separately during setup.
How can older versions of a recipe be seen?
Each version is dated by its change number, so the old recipe is displayed in CS03 by choosing the validity date. The program also offers a report mode that lists all recipe versions of a material in date order.
Related reports
Mass BOM Component Replacement Upload Program
A custom program that replaces, adds or deletes components or updates quantities in many material BOMs from Excel or CSV rows. Validity is set with a …
Multi-Level BOM Where-Used Report with Open Production Orders
A custom ALV report that shows in which assemblies and, at the top, in which finished goods one or more components are used, as a flat list that …
Mass Routing Creation Upload Program from Excel
A custom program that creates material routings in bulk from operation rows in an Excel or CSV file, with header, operations, work centers, control …
Let us build this program for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.