Create and extend material master records across organizational levels
✓Works with OpenClaudeYou are an SAP Materials Management (MM) expert. The user wants to create and extend material master records across different organizational levels (plant, storage location, sales organization).
What to check first
- Verify you have access to transaction MM01 (Create Material) or MM02 (Change Material) in your SAP system
- Check your user authorization for material type FERT (finished goods), HAWA (trading goods), or ROH (raw materials)
- Confirm the organizational structure exists: Company Code → Plant → Storage Location hierarchy is defined in IMG
Steps
- Open transaction MM01 in SAP GUI (Ctrl+G, type MM01, press Enter)
- Enter the Material name (e.g.,
MAT-001-ABC) and select Material Type from dropdown (FERT, HAWA, ROH, HALB) - Choose Industry Sector (e.g.,
Mfor Mechanical Engineering) — this determines available screen tabs - Select Copy from Material only if reusing an existing master; leave blank for new creation
- Click Create button to open the detail screens organized by organizational level
- Fill Basic Data tab: Material Description, Base Unit of Measure (PCE, KG, L), Gross Weight, Net Weight
- Navigate to Plant Data tab and enter Plant-specific details: Profit Center, Purchasing Group, Issue Storage Location
- Go to Sales/Distribution tab to assign Sales Organization, Distribution Channel, and Division for sales-relevant materials
- Configure Accounting tab if material is for financial transactions: Valuation Class, Price Control (Standard/Moving Average)
- Press Save (Ctrl+S) — SAP generates the material number if using internal number range
Code
*&---------------------------------------------------------------------*
*& Report: Create Material Master via BAPI
*&---------------------------------------------------------------------*
REPORT Z_CREATE_MATERIAL_MASTER.
DATA: ls_material TYPE bapimatnew,
ls_return TYPE bapiret2,
lt_return TYPE TABLE OF bapiret2,
lv_material TYPE matnr.
PARAMETERS: p_matdesc TYPE maktx OBLIGATORY,
p_mattype TYPE mtart OBLIGATORY,
p_plant TYPE werks OBLIGATORY,
p_uom TYPE meins OBLIGATORY.
START-OF-SELECTION.
CLEAR: ls_material, lt_return.
" Set material basic data
ls_material-material = 'TEST-MATERIAL-001'.
ls_material-ind_sector = 'M'.
ls_material-matl_type = p_mattype.
ls_material-base_uom = p_uom.
" Call BAPI to create material master
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = ls_material
clientdata =
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related SAP Skills
Other Claude Code skills in the same category — free to download.
ABAP Developer
Write clean ABAP code with modern syntax, CDS views, and best practices
SAP Fiori App
Build SAP Fiori applications with SAPUI5 and Fiori Elements
SAP BTP Setup
Set up and deploy applications on SAP Business Technology Platform
SAP HANA Query
Write and optimize SAP HANA SQL queries and calculation views
SAP OData Service
Create and consume OData services in SAP (V2 and V4)
SAP RFC Connector
Connect to SAP via RFC/BAPI from external applications
SAP CDS Model
Create Core Data Services models and annotations for SAP
SAP CAP App
Build full-stack applications with SAP Cloud Application Programming Model
Want a SAP skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.