{"audience":"Dye house and finishing supervisors, colour lab, production master data and costing teams.","authorization_objects":[{"note":"BOM change authorization by plant","object":"C_STUE_WRK"},{"note":"Authorization by BOM authorization group","object":"C_STUE_BER"},{"note":"Authorization to use the change number","object":"C_AENR_BGR"}],"components":[],"countries":[],"effort_days_max":10,"effort_days_min":7,"effort_size":"M","faq":[{"a":"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.","q":"What if the liquor ratio differs by machine?"},{"a":"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.","q":"Does it work for companies using PP-PI master recipes?"},{"a":"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.","q":"How can older versions of a recipe be seen?"}],"features":[{"code":"test_run","label":"Test mode (check without posting)","note":"Test mode shows the old and new recipe side by side; nothing is saved."},{"code":"log","label":"Line-by-line result and error log","note":""},{"code":"error_file","label":"Download failed lines as a separate file","note":""},{"code":"excel","label":"Export to Excel","note":"An empty upload template can be downloaded as Excel."}],"functions":[{"name":"CSAP_MAT_BOM_CREATE","role":"Creates the first BOM for a colour without a recipe"},{"name":"CSAP_MAT_BOM_READ","role":"Reads the valid recipe version for the difference list"},{"name":"CSAP_MAT_BOM_MAINTAIN","role":"Saves the new recipe version with the change number"}],"gap":"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.","id":"pp-dyeing-finishing-recipe","industries":["textile"],"input_columns":[{"derived":false,"label":"Colour / product material","required":true,"rule":"","target_field":"MATNR","target_table":"MAST"},{"derived":false,"label":"Alternative","required":false,"rule":"","target_field":"STLAL","target_table":"STKO"},{"derived":false,"label":"Base quantity","required":true,"rule":"","target_field":"BMENG","target_table":"STKO"},{"derived":false,"label":"Base unit","required":true,"rule":"","target_field":"BMEIN","target_table":"STKO"},{"derived":true,"label":"Lab recipe no.","required":false,"rule":"Recipe number from the lab system; written to the BOM header text","target_field":null,"target_table":null},{"derived":false,"label":"Component (dyestuff/chemical)","required":true,"rule":"","target_field":"IDNRK","target_table":"STPO"},{"derived":true,"label":"Concentration","required":false,"rule":"Value in % on weight of fabric or g/l","target_field":null,"target_table":null},{"derived":true,"label":"Concentration type","required":false,"rule":"OWF (% on weight of fabric) or GL (g/l)","target_field":null,"target_table":null},{"derived":true,"label":"Liquor ratio","required":false,"rule":"Fabric to bath ratio, e.g. 1:8","target_field":null,"target_table":null},{"derived":false,"label":"Component unit","required":true,"rule":"","target_field":"MEINS","target_table":"STPO"},{"derived":false,"label":"Valid from","required":true,"rule":"","target_field":"DATUV","target_table":"AENR"}],"kind":"program","language":"en","lastmod":"2026-11-17","logic":"1. 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.\n2. 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.\n3. The components are checked to exist in MARA without a deletion flag; the change number given must be open and valid in AENR.\n4. 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.\n5. 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.\n6. In test mode only the difference list is shown; in a real run the result of every row is logged.","module":"PP","object_type":"upload","output_columns":[{"calculated":true,"formula":"Row number in the file","label":"Row","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Material","source_field":"MATNR","source_table":"MAST"},{"calculated":false,"formula":"","label":"Alternative","source_field":"STLAL","source_table":"STKO"},{"calculated":false,"formula":"","label":"Component","source_field":"IDNRK","source_table":"STPO"},{"calculated":true,"formula":"STPO-MENGE in the valid version","label":"Old quantity","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"New quantity","source_field":"MENGE","source_table":"STPO"},{"calculated":false,"formula":"","label":"Change number","source_field":"AENNR","source_table":"AENR"},{"calculated":true,"formula":"Added, changed, unchanged, removed or error","label":"Status","source_field":null,"source_table":null},{"calculated":true,"formula":"Check or function return message","label":"Message","source_field":null,"source_table":null}],"parameters":[{"example":"C:\\temp\\recete_2026-11.xlsx","kind":"parameter","label":"Recipe file (XLSX or CSV)","name":"P_FILE","ref_field":"","required":true},{"example":"1000","kind":"parameter","label":"Plant","name":"P_WERKS","ref_field":"MAST-WERKS","required":true},{"example":"1","kind":"parameter","label":"BOM usage","name":"P_STLAN","ref_field":"MAST-STLAN","required":true},{"example":"500000000412","kind":"parameter","label":"Change number","name":"P_AENNR","ref_field":"AENR-AENNR","required":true},{"example":"X","kind":"checkbox","label":"Test mode (difference list only)","name":"P_TEST","ref_field":"","required":false}],"part_of":[],"performance":"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.","quote_url":"https://nekuhub.com/en/request-a-quote/?report=pp-dyeing-finishing-recipe","related":["pp-bom-component-mass-change-upload","pp-bom-where-used-open-orders","pp-routing-mass-upload"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Changes the BOM manually; no concentration calculation and no difference upload from a file.","tcode":"CS02"},{"note":"Creates a new BOM item by item; no bulk transfer from the lab recipe.","tcode":"CS01"}],"summary":"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.","tables":[{"access":"read_write","join_on":"","role":"Material-to-BOM link; created with the first recipe","table":"MAST","variant":"both"},{"access":"write","join_on":"STKO-STLNR = MAST-STLNR AND STKO-STLAL = MAST-STLAL","role":"BOM header: alternative, base quantity, validity","table":"STKO","variant":"both"},{"access":"write","join_on":"STPO-STLNR = STKO-STLNR","role":"Recipe items: dyestuff and chemical quantities","table":"STPO","variant":"both"},{"access":"read","join_on":"AENR-AENNR = parameter","role":"Change number and validity date for versioning","table":"AENR","variant":"both"},{"access":"read","join_on":"MKAL-MATNR = MAST-MATNR AND MKAL-WERKS = MAST-WERKS","role":"Check that the production version points to the right alternative","table":"MKAL","variant":"both"},{"access":"read","join_on":"MARA-MATNR = STPO-IDNRK","role":"Component existence and deletion flag check","table":"MARA","variant":"both"}],"title":"Dyeing and Finishing Recipe Versioned Upload and Management Program","url":"https://nekuhub.com/en/programs/dyeing-and-finishing-recipe-versioned-upload-program/","vendor_id":"nekudos"}