SAP CPI – Interview Questions and Answers (6+ Years Experience)
1. What are key architectural components of SAP Integration Suite?
Answer:
• Cloud Integration (CPI) – For process integration (iFlows)
• API Management – For designing, exposing, and securing APIs
• Integration Advisor – For AI-assisted message mapping and document definitions
• Open Connectors – For prebuilt connectors to non-SAP SaaS apps
• Event Mesh – For event-driven integrations (publish/subscribe)
• Extension Suite / BTP Services – For application extensions and business rules
2. Explain the role of ProcessDirect adapter and when to use it.
Answer:
• Enables internal, synchronous communication between iFlows.
• Allows reusability and modular architecture.
• Headers, properties, and body are inherited automatically.
• Preferred over HTTP for better performance and security within CPI.
3. What is the best way to manage configuration across DEV/QA/PROD?
Answer:
• Use Externalized Parameters in iFlows.
• Use Value Mapping or Environment-specific parameters via Runtime Configuration.
• For larger landscapes, manage with Transport Management Service (TMS) using
parameter configuration values.
• Automate with CI/CD pipelines if possible using CPI APIs.
4. How do you handle large files or high-throughput messages in CPI?
Answer:
• Use Streaming Mode in Splitter and Aggregator steps.
• Enable Payload Compression.
• Optimize message logging (disable in production where possible).
• Offload data to Data Store and process in chunks.
• Apply parallel processing (Multicast, Process Call in loop).
5. Explain CSRF and how it’s used in HTTPS iFlow calls.
Answer:
• CSRF (Cross-Site Request Forgery) prevents malicious POST/PUT/DELETE calls.
• In HTTPS sender adapter, when CSRF protection is enabled, clients must:
o First send a GET with header X-CSRF-Token: Fetch
o Then reuse the returned token and session cookie in the modifying request
• Typically used when iFlows are exposed to browsers or third-party APIs
6. What are common Groovy script use cases in CPI?
Answer:
• Dynamic payload manipulation (JSON/XML transformations)
• Date and time formatting
• Custom validations
• Dynamic property/header setting
• Custom authentication (e.g., OAuth token generation)
• Complex error handling logic
7. How do you implement error handling in CPI at scale?
Answer:
• Use Exception Subprocess for scoped error capture.
• Use Message Store or Data Store for storing failed messages.
• Send alerts via Email, SAP Alert Notification, or Webhook.
• Use Groovy to extract error details and structure log messages.
• Create a centralized error handler iFlow (called via ProcessDirect).
8. What are best practices for securing CPI iFlows and APIs?
Answer:
• Use OAuth 2.0 client credentials over basic auth.
• Protect endpoints with CSRF, API Keys, or SAP API Management.
• Store certificates and credentials securely in the Keystore.
• Limit access via roles/authorization groups.
• Use TLS (HTTPS) for all endpoints.
9. What monitoring tools have you used with CPI?
Answer:
• SAP Cloud Integration Monitoring (Message Monitor, MPL, Trace)
• SAP BTP Cockpit for system health and logs
• Custom monitoring iFlows using OData APIs
• SAP Application Logging Service for structured logging
• Alert Notification Service, Email, or Slack alerts via webhook
10. How do you handle multi-tenant deployments in CPI?
Answer:
• Use separate subaccounts for DEV, QA, and PROD with Transport Management
Service.
• Manage tenants centrally from the Global Account.
• Externalize URLs, credentials, and parameters per environment.
• Automate deployments using TMS APIs or CI/CD pipelines.
11. How does SAP CPI support event-driven architecture?
Answer:
• Through SAP Event Mesh, which enables:
o Async communication via publish/subscribe model
o Decoupling of event producers and consumers
o Integration with S/4HANA, CAP applications, and SAP BTP services
• CPI consumes or publishes events via AMQP adapter
12. What are the limitations or challenges you've faced with CPI?
Answer:
• Lack of strong versioning control (no Git-like branching)
• Limited debugging and simulation options (especially in prod)
• Script library management can get messy without governance
• Limited payload size (10 MB default; can be increased)
13. How do you call external APIs securely from CPI?
Answer:
• Use HTTP receiver adapter with:
o OAuth 2.0 (Client Credentials / JWT)
o API Keys
o Mutual TLS (client certs)
• Handle token management in Groovy or separate authentication iFlow
• Store sensitive information in the Keystore or Secure Parameter Store
14. How do you optimize performance of CPI integrations?
Answer:
• Avoid excessive logging in production.
• Enable streaming where applicable.
• Minimize Groovy usage in high-frequency flows.
• Use parallel processing carefully (avoid race conditions).
• Split large messages and batch process using Data Store.
15. What’s the difference between Process Call and Local Integration Process?
Answer:
Feature Local Integration Process Process Call
Defined in same iFlow (can be external)
Reusable across iFlows
Performance Faster (no IPC overhead) Slightly heavier
Use case Modularize within same iFlow Call reusable logic or subflows
16. How do you integrate CPI with non-SAP SaaS apps like Salesforce, Workday?
Answer:
• Use Open Connectors for pre-built integrations
• Use REST/OData adapters with OAuth 2.0
• Use API Management to simplify and secure communication
• Handle data mapping via Message Mapping or Groovy
Bonus: Real-Time Scenario-Based Questions
Question Focus
You need to process a 200MB file in CPI —
Streaming, SFTP chunking, Data Store
what’s your strategy?
An HTTP API fails intermittently with 500 error Exception subprocess, retry logic, response
— how to handle it? logging
How do you version and maintain Groovy Script Collections, centralized repositories,
scripts across iFlows? CI/CD
Question Focus
How to enable audit logging and message Use Message Store, enable Logging level
reprocessing? "Trace", configure MPL