Symptom
You are configuring one of the code replication related iflows from package "SAP Sales Cloud and SAP Service Cloud Version 2 Integration for Master Data with SAP S/4HANA or SAP S/4HANA Cloud" , there is a step "Get CNS Code" to do a GET call to the V2 system in case of Initial Load scenario.
Environment
SAP Sales & Service Cloud v2 Integration with SAP S4HANA
Resolution
Below mentioned iflows does a GET call to v2 for Initial Load scenarios and user credentials are expected here. For this GET call, the communication user automatically generated in communication system cannot be used instead an API User with a dedicated Business Role with READ access to relevant business services is needed.
List of Iflows and corresponding Business service names(as displayed in v2 within the business role creation screen) to be given access
- Replicate Cash Discount Terms from SAP S4HANA - sap.crm.md.service.businessPartnerService
- Replicate Company Legal Form from SAP S4HANA - sap.crm.md.service.businessPartnerService
- Replicate Customer Group Form from SAP S4HANA - sap.crm.md.service.businessPartnerService
- Replicate Customer Price List Type from SAP S4HANA - sap.crm.md.service.businessPartnerService
- Replicate Delivery Blocking Reason from SAP S4HANA - sap.crm.md.service.businessPartnerService
- Replicate Delivery Priority from SAP S4HANA - sap.crm.md.service.businessPartnerService
- Replicate Department from SAP S4HANA - sap.crm.md.service.businessPartnerRelationshipService
- Replicate Distribution Channel from SAP S4HANA - sap.crm.md.service.organizationalUnitService
- Replicate Division from SAP S4HANA - sap.crm.md.service.organizationalUnitService
- Replicate Functional Title from SAP S4HANA - sap.crm.md.service.businessPartnerRelationshipService
- Replicate Incoterms Classification from SAP S4HANA - sap.crm.md.service.businessPartnerService
- Replicate Industrial Sector from SAP S4HANA - sap.crm.md.service.businessPartnerService
- Replicate Invoicing Blocking Reason from SAP S4HANA - sap.crm.md.service.businessPartnerService
- Replicate Price Specification Customer Group from SAP S4HANA - sap.crm.md.service.businessPartnerService
- Replicate Region Codes from SAP S4HANA - sap.crm.service.i18nService
While configuring the iflow, there is an instruction "CNS-BUSINESS-USER" under the field "Credential Name" as a heads-up that explains the need to use a API user for the iflows. The corresponding business service names can be found in the service path in Address field.
Notes :
- Ensure only READ access is given to the above mentioned services and not WRITE access, I.e.. When creating a business role, add the above services and chose "UnRestricted" for "Read Access" and "Restricted" for "Write Access".
- Use this dedicated business role for the dedicated business user / api user created for S4 Integration purpose.
- Check this KBA "Error "Certificate Email is different from the User Email" While Uploading Certificate To Business User" to use certificate based authentication for business user
- The Client certificate issued by SAP CPI can be assigned to the API user and there is no need to get a dedicated certificate like in the case of business user mentioned above.
- If a communication user is used instead of a dedicated API user - messages in SAP CPI will fail with "403" error
Keywords
"Code List Replication" "Code Replication from S4 to V2" "org.apache.camel.component.ahc.AhcOperationFailedException: HTTP operation failed invoking https://******.us1.test.crm.cloud.sap/sap/c4c/api/v1/organizational-unit-service/divisions?$select=code with statusCode: 403" , KBA , CEC-CRM-INT , Integration for SAP Sales/Service Cloud , Problem
SAP Knowledge Base Article - Public