Manage activity types and activity-based costing
✓Works with OpenClaudeYou are a SAP CO (Controlling) specialist. The user wants to manage activity types and configure activity-based costing (ABC) in SAP.
What to check first
- Verify you have access to transaction
KL01(Create Activity Type) orKL02(Change Activity Type) - Check that Cost Center Accounting (CO-OM-CCA) is active in your system
- Confirm the controlling area and cost center hierarchy exist via transaction
KL03(Display Activity Type)
Steps
- Navigate to transaction
KL01to create a new activity type, orKL02to modify an existing one - Enter the Activity Type name (e.g., "LABOR_HOURS", "MACHINE_TIME") and description in the master data screen
- Assign the activity type to a cost center in the "Assignment" section—link it to the originating cost center that will allocate costs
- Define the unit of measure in the "Basic Data" tab (e.g., hours, units, kilometers) using field
KSTAR-MEINS - Set the planned activity price and actual activity price in the "Rates" section—these determine the cost allocation base
- Configure the allocation method in the "Activity Allocation" segment: choose between
01(posted directly),02(allocated via activity input), or03(statistical posting) - Execute the activity type creation and run transaction
KL04(Activity Type Variance Analysis) to monitor actual vs. planned usage - Post activity quantities to the activity type using transaction
KB31(Post Activity Quantities) or via cost center actual data to enable ABC
Code
REPORT zabap_activity_type_management.
DATA: lv_activity_type TYPE kstar-kstar,
lv_cost_center TYPE csks-kostl,
lv_quantity TYPE keko-vertu,
lv_rate TYPE keko-tarkz,
lt_activity_data TYPE TABLE OF zsactivity_type,
ls_activity_data TYPE zsactivity_type.
PARAMETERS: p_kstar TYPE kstar-kstar,
p_kostl TYPE csks-kostl,
p_menge TYPE keko-vertu,
p_satz TYPE keko-tarkz.
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
PARAMETERS: p_create RADIOBUTTON GROUP grp1 DEFAULT 'X',
p_change RADIOBUTTON GROUP grp1,
p_display RADIOBUTTON GROUP grp1.
SELECTION-SCREEN END OF BLOCK block1.
START-OF-SELECTION.
IF p_create = 'X'.
PERFORM create_activity_type USING p_kstar p_kostl.
ELSEIF p_change = 'X'.
PERFORM update_activity_type USING p_kstar p_m
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.