Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Enablement of Kyma Runtime

Prerequisite on SAP Business Technology Platform is the Kyma Runtime, as entire uses cases is based on Kyma, make sure that is enabled on your SAP BTP sub-account. User should be administrator on SAP BTP for Global Account where changes taking place. An SAP Sales Cloud tenant required as well.

Image

Enablement SAP Sales Cloud (C4C) on SAP Business Technology Platform

These are the step to set up SAP Sales Cloud/Sales for Customer catalog service on BTP.

On SAP Business Technology Platform Cockpit under global account.

  • Select System Landscape -> Systems; Click the Register System button;

    • Give a name at your choice
    • For type select from the list SAP Cloud for Customer

    Image

  • Click the Register button. After registering a new record will come up in Pending status.

    Image

  • Select System Landscape -> Formations; Click the Create Formation button;

    • Give a name at your choice
    • Select the sub-account where the service extension will be created
    • Select early created system.

    Image

Setup SAP Sales Cloud (C4C) System

Login into SAP Sales Cloud/Sales for Customer(C4C) portal using admin user and password, by using a similar URL https://myXXXXXX.crm.ondemand.com .

Navigate under Administrator -> General Settings -> Communication Systems.

Image Image Image

On the opened tab All Communication Systems click the New button from top right. On the new form introduce all required information about the system including the ID of the system. For current example gave the ID US_SALES_MIDDLEWARE_DEMO (feel free to give any name you want). As value for Host Name field should be the Kyma host URL (https://console.XXc2fb6.kyma.shoot.live.k8s-hana.ondemand.com), replace console with gateway , will become https://gateway.XXc2fb6.kyma.shoot.live.k8s-hana.ondemand.com.

Image

System is in In Preparation state/status. The target is to be into the Active state/status. Select the system record and activate it by clicking the Actions -> Set to Active

Image


Navigate under Administrator -> General Settings -> Communication Arrangements

Image

On the opened tab All Communication Arrangements click the New button from the top right. A wizard dialog will be opened.

  • Select from Communication Scenarios, the OData Services for Business Objects record.
  • Click the button Next from the bottom right.
  • For System Instance ID, Select the system created earlier for this example US_SALES_MIDDLEWARE_DEMO.
  • Click the button Next from the bottom right.
  • Select best fit Authentication Method; I selected User ID and Password. The User ID is autogenerated as _US_SALES__0, can be changed, as well specify the password by clicking the Edit Credentials button, we will need them later on. Select Services Used fitting to your uses case (selected are activity, activityplanprocessing, contact).
  • Click the button Next from the bottom right.
  • Review and click the button Finish from eth bottom right.

Now you should be able to see the created arrangements on the list. Image


Navigate under Administrator -> General Settings -> Event Notification

Image

On the opened tab under All Consumers click the Add button from the top right.

  • For the field Type select SAP BTP Extensions. Give a convenient for you name, used SALES_MIDDLEWARE_DEMO_KYMA.

  • For the field Remote Environment URL go to BTP Cockpit and take the token url. Copy the generated url token by click the key on registered early by you system.

    Image

    Image

  • For the field Callback User take existent or create a new technical user into SAP Sales Cloud and specify here the username.

  • For the field Callback Password take the password of chosen technical user.

  • Click the button Save from bottom right.

  • Click new created consumer record SALES_MIDDLEWARE_DEMO_KYMA and activate it by clicking Actions -> Activate; State should change from Inactive -> Active

Image

  • Select consumer record SALES_MIDDLEWARE_DEMO_KYMA and add subscriptions on the Subscriptions dialog and click the button Add. On popped dialog configure event subscription for which you are interested into to receive events on BTP Kyma Message broker or Cloud Foundry:

    • As Business Object select Account
    • As Node select Root
    • Enable Created, Updated
    • Click the button Save Keep adding as much as you consider the subscription for which you want to receive events.

After these steps on BTP System Landscape -> Systems, the registered system should be in Registered state.

Image


Kyma Runtime Cockpit Operations

On Kyma Console/Cockpit click on Applications/Systems, your should be able to see integrated early created system under name mp-sap-cloud-for-customer-test, and in state/status SERVING.

Image


Details should look like:

Image


Bind this system to a specific K8S namespace by clicking + Create Binding and select the K8S namespace, where the service will be deployed, we are using "default" namespace.


Navigating to selected namespace into Service Management -> Catalog. You should be able to see the service.

Image

Details of created service:

Image


Provision the Service Class in the selected (example is using default) Namespace, by clicking the + Add button, and give a more friendly name.

Image

Image


Deploy the lambda function by following the guidance from deployments


To have calls from Kyma Function toward SAP Sales Cloud OData API, make sure that exist a service binding usage of your services c4c-address-verification under created service instance.


Now is time to add triggers for events. Using Kyma Console/Cockpit “Discovery and Network -> Services”. Select “c4c-address-verification” service. Click on the button “+ Create Event Subscription”, select following events only: Account.Root.Created and Account.Root.Updated.


Check the logs of pod using Kyma Console/Cockpit or command line, seeing that everything is on green:

kubectl logs -f <name of pod instance> c4c-address-verification

SAP Sales Cloud Operations

As last step ensure that lambda function was deployed on Kyma Runtime without any errors, Event Subscription was attached to it. Operation on SAP Sales Cloud for Account could be done, by manipulating the addresses, and watching how the address is verified and updated.

Dependencies