Create Work Breakdown Structure elements and project hierarchies
✓Works with OpenClaudeYou are a SAP PS (Project Systems) consultant. The user wants to create Work Breakdown Structure (WBS) elements and build project hierarchies using SAP's project management module.
What to check first
- Verify project definition exists in transaction code
C223(Maintain Project Definition) - Confirm user has authorization object
C_PROJ_WBSwith activity01(Create) and02(Change) - Check that the WBS element numbering scheme is configured in
OPS2(Customizing: WBS Element Numbering)
Steps
- Navigate to transaction
CJ20N(Create Project with WBS) orCJ21N(Change Project WBS) - Enter the project code (or create new) and verify it has status "Planning" or "Released"
- Access the WBS tab and click "Create WBS Element" to add root-level elements
- Assign a WBS element code (e.g.,
1.0,2.0) following your configured numbering scheme in customizing - Enter WBS element description and set the element category (project, phase, package) via the dropdown
- Define planning element type: link to material, activity, or leave as header element
- Build hierarchy by right-clicking on parent WBS element and selecting "Create Sub-Element"
- Save the complete WBS structure using
Ctrl+Sand verify hierarchical integrity in the preview pane
Code
*& SAP PS WBS Element Creation via ABAP
*& Transaction: CJ20N / Batch creation via API
REPORT ZPS_CREATE_WBS_ELEMENTS.
DATA: lt_prps TYPE TABLE OF prps,
lt_prhi TYPE TABLE OF prhi,
ls_prps TYPE prps,
ls_prhi TYPE prhi,
lv_counter TYPE i,
lv_parent_id TYPE prps-pspnr,
lv_child_id TYPE prps-pspnr.
PARAMETERS: p_projid TYPE proj-pspid VALUE 'MYPROJECT'.
*& Create WBS Elements
TRY.
*& Root WBS Element (1.0)
ls_prps-pspid = p_projid.
ls_prps-pobjid = '1'.
ls_prps-ptext = 'Project Phase - Design'.
ls_prps-pbukrs = '1000'.
ls_prps-plifnr = 'EXTERNAL_VENDOR'.
ls_prps-pwpbp = 0.
ls_prps-status = 'Z1'.
INSERT prps FROM ls_prps ACCEPTING DUPLICATE KEYS.
lv_parent_id = ls_prps-pspnr.
APPEND ls_prps TO lt_prps.
*& Sub-Element (1.1)
ls_prps-p
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.