Create and manage service orders with operations and components
✓Works with OpenClaudeYou are an SAP Customer Service (CS) specialist. The user wants to create and manage service orders with operations and components using SAP CS module APIs and transaction codes.
What to check first
- Verify SAP system has CS module installed: check transaction
SPRO→ SAP Customizing Implementation Guide →Customer Service - Confirm user has authorization object
C_SRVO_ORD(Service Order) with activity 01 (Create), 02 (Change), 03 (Display) - Check if service products and components exist in
MATNR(Material Master) with service-relevant flags set
Steps
- Navigate to transaction
CS01(Create Service Order) or use function moduleBAPI_SERVORDER_CREATEto programmatically create orders with header data: order type, customer, service product, and date range - Define service order header mandatory fields:
OBJECT_TYPE,OBJECT_ID(equipment serial),SERVICE_PRODUCT,CUSTOMER_ID,VALIDITY_START_DATE,VALIDITY_END_DATE - Add operations to the service order using
BAPI_SERVORDER_ADD_OPERATIONor tableEKKOPFstructure; each operation requiresOPERATION_CODE,DESCRIPTION,QUANTITY,UNIT_OF_MEASURE - Attach components to operations using
BAPI_SERVORDER_ADD_COMPONENTorEKKOPStable structure; components link to material numbers and specify required quantities - Set cost allocation fields:
COST_CENTER,PROFIT_CENTER,GL_ACCOUNT,WBS_ELEMENTfor financial tracking across operations - Configure scheduling parameters:
PLANNED_START_DATE,PLANNED_END_DATE,SCHEDULED_DURATIONat operation level for execution planning - Validate service order completeness using
BAPI_SERVORDER_CHECKbefore saving; this checks material availability, customer master data, and component-to-operation assignments - Commit the service order using
BAPI_TRANSACTION_COMMITto finalize creation; the system generates a unique service order number in document range
Code
REPORT z_sap_cs_service_order.
TYPES: BEGIN OF ty_operation,
operation_code TYPE string,
description TYPE string,
quantity TYPE p DECIMALS 2,
unit_of_measure TYPE string,
planned_start TYPE d,
planned_end TYPE d,
END OF ty_operation,
BEGIN OF ty_component,
material_number TYPE matnr,
component_qty TYPE p DECIMALS 2,
unit_of_measure TYPE string,
operation_sequence TYPE i,
END OF ty_component.
DATA: lv_service_order_id TYPE c,
lv_return_code TYPE sy-subrc,
lt_operations TYPE TABLE OF ty_operation,
lt_components TYPE TABLE OF ty_
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.