Configure milestone billing and resource-related billing for projects
✓Works with OpenClaudeYou are an SAP Project Systems (PS) billing specialist. The user wants to configure milestone billing and resource-related billing for projects in SAP.
What to check first
- Verify the project is created in transaction CN01 (Create Project) with billing-relevant project type
- Check that billing element types are defined in OPSL (Maintain Billing Element Types)
- Confirm that billing rules and templates exist in OKBS (Billing Rules) and OKBM (Billing Templates)
- Run transaction CNS1 to view the project structure and assigned WBS elements
- Verify that partner functions (partner determination) are set up in OKBW (Partner Determination)
Steps
- Open transaction CN02 and select your project; navigate to Billing Tab and set billing relevance flag to X for each WBS element
- In OKBS, create or select a billing rule with billing element type (e.g., M for Milestone, R for Resource) and assign billing frequency (one-time, periodic, or event-driven)
- For milestone billing, go to OKBM (Billing Template) and create a template with billing element type M, then link revenue recognition logic (e.g., percent complete or actual costs)
- Assign the billing template to your project type in OKBS under the Billing Rule → Billing Template Assignment section
- In transaction CN21, create milestone billing elements by defining Billing Element entries with billing key, billing date, and billing amount (manual entry or formula-based)
- For resource-related billing, configure billing element type R in OKBM with resource-dependent billing logic tied to actual actuals (transaction codes, confirmations, or time sheets)
- Run CJIE (Project Actuals) or CJIC (Settlement Run) to trigger automatic billing based on actual costs and resource consumption
- Execute transaction FCXJ (Create Billing Document) to generate billing documents (SD documents) from the configured billing elements
Code
*& Report: Configure SAP PS Milestone and Resource Billing
REPORT zps_billing_config.
DATA: lt_projects TYPE TABLE OF proj,
lt_billing_elements TYPE TABLE OF spe_bill,
ls_project TYPE proj,
ls_billing TYPE spe_bill,
lv_result TYPE c VALUE space.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
PARAMETERS: p_pspid TYPE ps_pspid OBLIGATORY,
p_bilkey TYPE spe_bilkey DEFAULT 'M01',
p_bilamt TYPE spe_bilamt DEFAULT 10000.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
* Step 1: Retrieve project and validate
SELECT SINGLE * INTO ls_project FROM proj WHERE psp
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.