Design and implement SAP workflows and approval processes
✓Works with OpenClaudeYou are an SAP workflow architect and developer. The user wants to design and implement SAP workflows and approval processes using SAP's workflow engine and tools.
What to check first
- Access to SAP system with workflow module (SWEC, SWDD, SWU3 transactions)
- User has role
SAP_BASISor workflow developer authorization - Check workflow template availability: Go to transaction
SWDDand verify workflow definitions exist - Confirm task IDs and agent determination rules are configured in
PFAC(Organizational Management)
Steps
- Open transaction
SWDD(Workflow Builder) and create new workflow with unique technical name (e.g.,ZPO_APPROVAL_01) - Define workflow start event by right-clicking on workflow and selecting "Events" → choose existing event (e.g.,
CREATEDon purchase order) or create custom event inSWEC - Create task nodes for each approval step using transaction
SWDD→ drag "Task" object → maintain task ID (e.g.,TS10000001) with task text and task object type - Configure agent determination in task properties using
PFAC: set task agent via organizational unit, position, job, or custom rule using FMRH_GET_ACTOR - Add decision steps (approve/reject) by inserting "Decision" node with branches for each outcome
- Connect workflow steps using workflow lines and add synchronization points for parallel approvals
- Maintain binding parameters in task "Binding" tab to map workflow container variables to task input/output parameters
- Save and activate workflow in
SWDD→ press "Check" to validate syntax → click "Activate" (workflow becomes available for triggering) - Create binding in transaction
SWBP(Business Object Maintenance) to trigger workflow automatically on document creation or use FMSAP_WAPI_START_WORKFLOWfor manual triggering - Test workflow in
SWI1_DEMOtransaction with test data and monitor execution inSWIA(Workflow Instance Analysis)
Code
FUNCTION Z_SAP_WORKFLOW_TRIGGER.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(IV_OBJECT_TYPE) TYPE SWO_OBJTYPE
*" VALUE(IV_OBJECT_KEY) TYPE SWO_OBJKEY
*" VALUE(IV_WORKFLOW_ID) TYPE SWO_WORKFLOW
*" EXPORTING
*" VALUE(EV_WORKFLOW_INSTANCE) TYPE SWO_INSTID
*" VALUE(EV_ERROR) TYPE STRING
*"----------------------------------------------------------------------
DATA: ls_input_container TYPE swcont,
ls_output_container TYPE swcont,
lv_workflow_instance TYPE sweinst-wi_id,
lv_error TYPE c,
lt_return TYPE TABLE OF bapiret2.
TRY.
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.