Wednesday, 30 November 2022

Whatsapp Integration in SAP S/4 HANA On-Premise

Introduction:


In this blog I am going to share you my experience about whatsapp integration. Nowadays people are running beyond their level, Whatsapp Integration Module is the effective product module. Also people use for their business as well as personal use. It increases business profitability and helps business in strategizing goals to stand out from the competition. Whatsapp is using everywhere in the world for fast communication.

making this solution more secure than a conventional email.

How this going to work?


Just think about a situation where you want to know your order status, either you would login to your system or you ask someone. Always have your laptop or computer with you and opening your outlook, this makes you to get tired the whole day.

Here is the TWILIO….


Twilio is the cloud communication platform. This platform is used by thousands of business and millions of developers, this receive sms, text, phone calls, video. Once we connect SAP with TWILIO, it post the data to whatsapp more quickly. This makes the business much faster than the mail conversation.

Below you can see flow of Process.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

◉ Create the trial account in Twilio

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

Save the Code for configure with your whatsapp number.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

Configure the twilio with your whatsapp number. Just enter the code to join like route-ten.

Example : –

PO Process:


Based on our requirement I have done,

Once PO is created and when it release in me29n the PDF of PO details send to the supplier whatsapp number.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

◉ Implement the BADI and write the code in the method POST. This is the BADI to trigger the PO release.
◉ Inside the method call the form and convert it to PDF.
◉ After done the coding for form development.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

◉ Use the above function module and convert to Binary,
◉ Here we have to declared the Custom Table to Save the Binary string, date time and other details.
◉ In the variable lv_url pass the Twilio URL and Accountsid Number.
◉ Set the Number to receive the data from twilio number.
◉ And set the content type as ‘application/x-www-form-urlencoded’.
◉ This content type is nothing but the data send in to a single block in the HTTP message body.

Send to the twilio and Receiver to the whatsapp number and we can get the response back from twilio.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

◉ The same process is to send the PDF data.
◉ Here we have to use the media URL (our host and odata url)
◉ Set the Content Type

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

OData Creation:

Step: 1

Create the entity type and entity set.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

Step: 2

create one Edm type in the property and tick the check box Create Update sort and filter.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

◉ In the DPC exit go to the abap workbench.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

Step: 3

In the DPC exit Class insert the code in the GET STREAM method by clicking the redefine method for get the data in the custom table.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

Step: 4

◉ Before the GET STREAM coding Create the table to store the XString value, MIME type and all value you want to store.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

◉ Declare the Custom table name for get the value from the table.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

Step: 5

◉ Activate the method, Generate the object runtime and register the OData service.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

Step: 6

◉ Click the SAP Gateway client and check the URl.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

Step: 7

Go to the Tcode : SICF and save the logon settings.

Default host -> sap -> Opu -> OData -> sap -> click your registered service name.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

◉ Enter the logon data and save the service. Now you are ready to get the pdf in whatsapp once PO is released.

Step: 8

Once the PO is released in ME29N based on the supplier phone number that you maintain in the BO the PDF form send to the supplier number with the PO details.

Finally we get the output.

SAP HANA, SAP HANA Tutorial and Materials, SAP HANA Career, SAP HANA Prep, SAP HANA Preparation, SAP HANA Career, SAP HANA Jobs, SAP HANA Skills, SAP HANA Guides

No comments:

Post a Comment