Create planned independent requirements and consumption strategies
✓Works with OpenClaudeYou are an SAP Production Planning (PP) specialist. The user wants to create planned independent requirements (PIRs) and configure consumption strategies in SAP PP to manage demand forecasts and material requirements.
What to check first
- Navigate to transaction MD61 (Plan Independent Requirement) or MD62 (Planned Independent Requirement Display) to verify PIR master data exists
- Run MMBE (Stock Overview) to confirm current stock levels and material movements
- Check transaction SPRO > IMG > Production Planning > Demand Management to review your organization's demand planning configuration
Steps
- Access transaction MD61 (Create Planned Independent Requirement) and enter the material number, plant, and MRP area
- Input the requirement date and requirement quantity for the forecast period; save the PIR header
- Navigate to the consumption strategy field and select the appropriate strategy code (e.g., 000 for no consumption, 010 for document-based consumption, 020 for trend-based consumption)
- Configure the consumption strategy parameters: define the lookback period (number of days), consumption percentage, and rounding rules in the PIR detail screen
- Set the MRP relevance indicator to ensure the PIR flows into MRP runs via transaction MD01 (Material Requirements Planning)
- Define forecast profiles in SPRO > Demand Management > Forecast to establish time-phased demand patterns if using demand planning integration
- Run MD04 (Stock/Requirements List) for the material to verify PIR quantities appear correctly in the MRP net requirements calculation
- Execute MD01 (MRP run) with the PIR evaluation flag to generate planned orders based on your consumption strategy
Code
*& Report: Create Planned Independent Requirement with Consumption Strategy
REPORT zsd_pir_demand_mgmt.
TABLES: mdpsx, mdvex.
DATA: ls_pir TYPE mdpsx,
ls_consump TYPE mdvex,
lv_material TYPE matnr VALUE '000000000100000001',
lv_plant TYPE werks_d VALUE '1000',
lv_mrparea TYPE mrpa_d VALUE '1000',
lv_reqdate TYPE dats,
lv_reqqty TYPE menge_d VALUE 1000,
lv_consump_code TYPE dplfa VALUE '020'.
START-OF-SELECTION.
MOVE sy-datum + 30 TO lv_reqdate.
PERFORM create_pir USING lv_material lv_plant lv_mrparea
lv_reqdate lv_reqqty lv_consump_code.
FORM create_pir USING pv_material pv_plant pv_mrparea
pv_reqdate pv_reqqty pv_consump.
CLEAR ls_pir.
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.