This blog will detail the setup of an SAP Commerce mock application as a microservice in the Kyma environment. The xf-application-mocks contain lightweight substitutes for SAP applications to ease the development and testing of extension and integration scenarios. In conjunction with the SAP Cloud Platform Extension Factory, the efficient implementation of application extensions is supported without the need for real SAP applications being accessible during development.
If you are new to the C/4HANA Extensibility topic please see this blog to get started.
Open the SAP C/4HANA Cockpit and choose the Extensibility menu option and then open the console of your Kyma instance.
First verify that the Cluster Add-ons for the mock apps is existing by choosing the menu option Cluster Addons and verify that there is an entry pointing to
In the next steps we will utilize the SAP Cloud Platform Extension Factory to establish a connection between the mocking application and the Kyma instance. This will allow us to use the mocking application to send events to Kyma and utilize the mocking APIs.
Open the SAP C/4HANA Cockpit and choose the Extensibility menu option and then choose your Kyma instance
This will bring us to the Runtime Details where you can initiate the system registration by choosing the Add button found on the Registered Systems list.
Provide a Name for the System and choose Register to save the entry.
Choose the Copy key button which will place the URL needed to connect the systems to your system’s clipboard.
With the key copied, proceed back to the mocking application to complete the system connection.
In the commerce mock application choose the Connect button and paste the token url into the field.
You should now see the systems connected. Use the Batch Registration button or the individual Register buttons to register the APIs.
This should now be reflected in the commerce-mock application within Kyma under the Provided Services & Events table.
Check out this blog to learn how to trigger a Lambda function with an event or this blog to learn how to trigger a microservice with an event