Configure and execute Material Requirements Planning (MD01/MD02)
✓Works with OpenClaudeYou are an SAP Production Planning expert. The user wants to configure and execute Material Requirements Planning (MRP) runs using transactions MD01 and MD02 in SAP.
What to check first
- Verify the planning scenario is active: navigate to SPRO > Production Planning > Master Planning > Planning > Maintain Planning Scenario
- Confirm demand (sales orders, forecast, independent demand) exists in the system using transaction MD61 or MD62
- Check that the MRP profile is assigned to materials via transaction MM01 (Material Master > MRP section > MRP Profile field)
- Verify BOM structure is complete using transaction CS01 (Bill of Materials)
Steps
- Open transaction MD01 (Single-Item MRP Run) or MD02 (Multi-Level MRP Run) in the SAP command field
- Enter the Plant code (e.g., "1000") and Planning Scenario (typically "000" for standard planning)
- For MD01: input the Material number to plan individually; for MD02: specify a Selection Profile to plan multiple materials
- Set the Planning Date (PLANDAT) — this is the date MRP generates planned orders from
- Choose planning mode: set Creation indicator to plan independent demand, and Scope indicator to determine horizon (e.g., net change planning)
- Configure MRP parameters: MRP Type (net change vs. regenerative), Lot Size Rule (from Material Master), and Safety Stock
- Execute the run using the green checkmark or pressing F8; the system generates planned orders in table PLAF
- Review results in transaction MD04 (Stock/Requirements List) to verify planned order dates, quantities, and exception messages
Code
REPORT zmd01_mrp_execution.
DATA: lv_plant TYPE werks_d VALUE '1000',
lv_matnr TYPE matnr,
lv_scenario TYPE plnsc_name VALUE '000',
lv_plandate TYPE dpldt,
lv_scope TYPE dplrf VALUE '2',
lv_mrptyp TYPE dplmrptyp VALUE '1'.
PARAMETERS: p_plant TYPE werks_d,
p_matnr TYPE matnr,
p_date TYPE dpldt,
p_mode TYPE dplmrptyp.
START-OF-SELECTION.
lv_plant = p_plant.
lv_matnr = p_matnr.
lv_plandate = p_date.
lv_mrptyp = p_mode.
CALL FUNCTION 'MP_PLANNING_RUN'
EXPORTING
i_plant = lv_plant
i_scenario = lv_scenario
i_planning_date = lv_plandate
i_mrp_type = lv_mrptyp
i_scope = lv_scope
i_delete_existing = 'X'
IMPORTING
e_run_id = DATA(
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.