Cloud Integration with Translation Hub
Share

Introduction:

In this blog post, I will demonstrate how to connect Cloud Integration with Translation Hub. As a use case, consider a scenario where a sender system submits an order request. If the order creation fails, the system expects the error message to be returned in both English and Japanese.

 

Translation Hub:

For an overview of the SAP Translation Hub service and its features, refer to discovery center.

 

Step 1:

Create an instance for a service named SAP Translation Hub (technical name: document-translation) and generate its corresponding service key.

pic1.png

From the service key, retrieve ‘documenttranslation.url’, ‘uaa.clientid’, ‘uaa.clientsecretand ‘uaa.url’, which will be later used in integration scenario.

pic2.png

Step 2:

Explore document translation api at Business Accelerator Hub.

For the model parameter, two values are supported: default and llm. The default model uses SAP-trained Neural Machine Translation (NMT). For a list of supported languages, refer to the SAP Translation Hub documentation: Supported Languages

The llm falls under the generative AI category and can be used when a target language is not supported by the SAP-trained NMT model. For example, to translate text into Bengali.

pic3.png

 

Cloud Integration:

Step 1:

Create a security material of type ‘OAuth2 Client Credentials’.

Pic4.png

Step 2:

Design the iFlow as illustrated below.

pic5.png

The Content Modifier is used to set the message header and body.  As only the translated text is required, the ‘Accept’ header is set to ‘application/octet-stream’.

pic6.png

The request body is configured as shown below:

pic7.png

Configure the HTTP receiver adapter to connect with document translation api as shown below.

pic8.png

Step 3:

Test the iFlow endpoint using an API testing tool. In the request payload, ‘orderId’ is a mandatory field as defined in the XML Validator step; therefore, any payload that does not include ‘orderId’ is routed to an exception subprocess.

pic9.png

Please note that all the data are fictitious.

 

Conclusion:

This blog post demonstrates a prototype for integrating Translation Hub with Cloud Integration.

 

  Read More Technology Blog Posts by Members articles 

#abap

By ali

Leave a Reply