Skip to Content
Author's profile photo Jerry Wang

A Prototype to integrate SAP C4HANA and S4HANA as a Smart Service Solution

The original version of this article is written in Chinese for a local Partner workshop in China. Now I translate it into English so that more guys could read it šŸ™‚
This year SAP has announced the coming of new in-memory customer experience (CX) suite solution, C/4HANA, which consists of the five cloud solution below.
As many Chinese partners keep asking the details of these five cloud, I have made a little bit more explanation here.
(Sorry for Chinese, as I don’t have enough time to manually translate every article of mine into English).
More questions are asked from our partners: is there any concrete use case which demonstrates the integration scenario between C/4HANA and S/4HANA?
Here I can provide one example. This show case as a prototype is developed by SAP Chengdu Digital Innovation Space located in China. The appearance of the building could be found below:
Please kindly note that some features described in this blog are just developed for prototype only, which are not available in SAP standard product for the moment.
Let’s first have a look at the scenario of this show case. We choose SAP Cloud for Customer(C4C) which belongs to Service Cloud in C/4HANA and integrates it with SAP S/4HANA.
Two Personas in user story:
ę›¾ęµ·ē‘ž – end user,who would like to buy a Mechanical Arm. I will use ā€œę›¾ęµ·ē‘ž” to represent end user in the left part of this blog.
ę›¾ęµ·ē‘ž will use Wechat app in his mobile phone to use all services provided by this prototype.
Wechat is a very popular mobile application in China, which has more than 1 BILLION active user per month.
ęŽę™“åˆš – a service agent who works for the Mechanical Arm Manufacture, responsible for Arm installation as field service.
Here below is user story:
1. A customer named ę›¾ęµ·ē‘ž has ordered a Mechanical Arm in the web and subscribed the official account(公众号) of Mechanical Arm Company in Wechat怂
( not latest data, only till 2016 Q3 )
Based on the information maintained by ę›¾ęµ·ē‘ž in the order( such as name and mobile phone number), as long as he subscribed the Wechat account, the Wechat message server will receive this subscription event and then can trigger the account creation in SAP system.
A new account will be created for ę›¾ęµ·ē‘žć€‚Based on the real situation, you could choose to create it in C4C or S/4HANA.
If you would like to trigger the account creation in C4C via Wechat subscribe event, you can refer to this blog Integration of WeChat and C4C Service Ticket on HTML5 Client for detail.
On the other hand, if you would like to have account creation in S/4HANA, you can expose the S/4HANA account creation API via SAP Cloud Connector plus SAP Cloud platform, so that the application in internet network can consume those services hosted in corporate network.
  • For Neo environment, refer to this guide.
  • For CloudFoundry environment, refer to this guide.
2. The worker of Mechanical Arm company has packaged the device into a big box, and paste a QR code as a label onto the box. The QR code contains the serial number of this very device. Every sold device has a corresponding equipment instance created in S/4HANA system created in tcode IE01, and the serial number is one field in equipment model.
Once the package is transported to ę›¾ęµ·ē‘ž’s site, he scanned the QR code via Wechat.
Once the QR code is scanned, another event will be triggered in Wechat message server, which will then trigger a pre-configured function module in S/4HANA, which stores the serial number and ę›¾ęµ·ē‘ž’s account information together. With this automatic step, the relationship between serial number of sold device and ę›¾ęµ·ē‘ž is established, without any manual input of Mechanical Arm company’s service agents in S/4HANA.
3. Now ę›¾ęµ·ē‘ž can schedule an installation date via self-service in Wechat. Open the schedule UI, the current location of ę›¾ęµ·ē‘ž is automatically detected by GPS module of mobile phone and filled in UI.
The field service agents list is populated by C4C backend service which can automatically match the available agents based on the schedule date filled by ę›¾ęµ·ē‘ž.
Finally ę›¾ęµ·ē‘ž picked ęŽę™“åˆš and confirm the schedule. Here below is employee data for ęŽę™“åˆš maintained in C4C.
Once the on-site installation schedule is confirmed by ę›¾ęµ·ē‘žļ¼Œthere is a message popped up in ęŽę™“åˆš’s C4C application in his mobile phone to notify that a new task is coming for him.
The message text is: ä½ ęœ‰ę–°ēš„å·„å•ć€‚ē”Øęˆ·é¢„å®šäŗ†äøŠé—Øå®‰č£…ęœåŠ”ļ¼ŒčÆ·åŠę—¶ęŸ„ēœ‹å·„å•čÆ¦ęƒ…ć€‚
Translated in English: You have a new task. A customer has scheduled a on-site installation service, please check task detail in time.
ęŽę™“åˆš taps the notification to enter the task detail view in C4C mobile application.
When it comes to the installation date, beforeęŽę™“åˆšstarts to come to ę›¾ęµ·ē‘ž’s site, he clicks the button highlighted above in C4C application toolbar to share his real position to ę›¾ęµ·ē‘žć€‚
Now in ę›¾ęµ·ē‘ž’s Wechat he can see the distance between him and ęŽę™“åˆš in the map, which is refreshed every 5 seconds.
5. Now ęŽę™“åˆš has reached ę›¾ęµ·ē‘ž’s site and after some hard work, he has finished the device installation. Now ęŽę™“åˆš opens his C4C mobile application, press button “push bill” to send the current bill which contains detail expense to ę›¾ęµ·ē‘žć€‚
In S/4HANA there is some cross-selling condition records maintained for this installed arm device, for example the corresponding cleaner(å–·å˜“å†²ę“—ęžŖ) for the arm.
Those cross-selling parts are retrieved from S/4HANA and displayed in ęŽę™“åˆš’s C4C application. ęŽę™“åˆš persuades ę›¾ęµ·ē‘ž to buy this cleaner as well.
So final bill pushed to ę›¾ęµ·ē‘ž’s Wechat also includes this cleaner.
ę›¾ęµ·ē‘ž receives bill in his Wechat, checks and pays the bill.
6. after ę›¾ęµ·ē‘ž has payed the bill, he receives one survey regarding his satisfaction of current installation service.
For this scenario, we make use of survey model in S/4HANA, develop a function module which encapsulates S/4HANA survey API and expose it to Wechat via SAP Cloud Connector.
Once ę›¾ęµ·ē‘ž has filled survey in Wechat, the survey result is written back to S/4HANA.
Regarding how to submit S/4HANA Survey result, please refer to my blog Use ABAP code to fill CRM Survey question and submit.

Prototype architecture

Legend explanation

1. The white block represents the developed content for this prototype, consisting of:
  • new code, for example the C4C API endpoint and S/4HANA API endpoint in the graph points to the new function modules we created in ABAP Netweaver for this prototype.
  • new configuration, for example some new destination configuration created in SAP Cloud Platform.
  • new data model, for example new CDS view created in S/4HANA to store user survey result data. Then besides SAP standard survey display UI, we can develop our own analytics UI to render survey result using various open-source UI library consuming these new CDS view as data source. For one attempt please refer to my blog Develop your own Chart to visualize your CRM Survey result.
2. The light green block means the message server for Mechanical Arm company’s subscription account, which is deployed in Ali Cloud Platform.
3. The dark green block means the standard functionality in SAP product.
  • Account Management: after ę›¾ęµ·ē‘ž has subscribed Mechanical Arm company’s Wechat account, there is a new account generated in C4C, which consumes the OData service provided by C4C Account Management.
  • Service Ticket: the task sent to ęŽę™“åˆš and the bill received by ę›¾ęµ·ē‘ž are also technically implemented via Service Ticket BO in C4C.
  • Offline Pricing: For simplicity reason in this prototype we didn’t use the on-line pricing solution in C4C which integrates with S/4HANA.
  • Product Master: Product Master used in C4C task and bill are replicated from S/4HANA via HANA Cloud Integration.
4. The grey block means the SAP products involved in this prototype:
  • C4C
  • S/4HANA
  • SAP Cloud Connector
  • SAP Cloud Platform
The four roles in this prototype, ę›¾ęµ·ē‘žļ¼ŒęŽę™“åˆšļ¼ŒC4C and S/4HANA have the following interactions demonstrated via sequence diagram:
Hope this prototype could give you some basic understanding about how S/4HANA and C/4HANA could be combined as an integrated solution for our users.
I will upload the video of this prototype into this blog soon.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jayant Saini
      Jayant Saini

      Nice blog Jerry. Great business scenario solution which can be implemented vastly in service industry.