Skip to Content

About me

I have huge product and system development experience including databases and data warehouses development, apps and system programming from microcontrollers to big automation projects, also, it includes complicated system engineering. Most of my career I was lead developer or team lead.

For last 8 years I’m working at SAP segment. Currently, I’m SAP Solution Architect at Skybuffer team, mostly in our own product development.

As we are developing own products and met a need to make our products multilingual, we found out SAP Translation Hub service and decided to use in our case.

As Translation Hub is not so widely used yet and there is not so much information about it, I’ve decided to share my experience with SAP Community.

 

Introduction

This article shows an easy and fast way of creating multilingual ABAP applications in order to correspond to best-practice methods and “to speak the Customer’s language”.

Here SAP Translation Hub and ABAP system configuration is described. Additionally, useful methods to manipulate languages in the ABAP system are shown.

 

Prerequisites

First, we shall comply with some prerequisites in Translation Hub Service on SAP Cloud Platform, our ABAP system and Cloud Connector.

 

Cloud Connector

We shall configure a subaccount in SAP Cloud Connector for our S-user to make it possible to connect directly SAP Cloud and our ABAP system

There we shall configure Cloud To On-Premise system mapping for RFC connection. There we shall grant access to function modules with LXE_ prefix as shown below.

 

SAP Cloud Platform Cockpit

We shall create Destination in the service of Translation Hub. Its name shall look like STH_<S-user> as shown below (to be considered obsolete from 23.03.2018)

For a newer Translation Hub version, that name shall be as STH_<S-user>_<System ID>_<Client Number> to have an ability to use multiple ABAP systems for translation.

We can check if our ABAP system is accessible from Cloud.

 

ABAP Back-End System

The ABAP system is to be a Unicode system. We can check it in SAP Logon GUI in System -> Status menu item

Functional Modules necessary for RFC calls are to be there (if not, implement SAP Note 2349776).

Create a technical user (its name is specified in the Translation Hub Destination) of Communications Data type and assign Required Authorization to this role. Check that authorization with Translation Hub Documentation.

Use LXE_MASTER t-code to create an Object list for translation.

Put the Object List description and add Objects to translate into it. Use LIMU REPT object type for ABAP Text Elements. For Classes names you should add “=” symbols so that the name is 30 symbols long and then add “CP” in the end. You can include any other objects like Data Elements, for example, to translate them, too.

Save and generate the Object List.

Wait until Status turns into X – Generation Complete

Now you can use that Object List in Translation Hub to translate all the included objects.

Create ABAP project in SAP Translation Hub

Run Translation Hub Service and create an ABAP project

Starting from 23 March 2018, there will be a field to choose Destination to our ABAP system as described:

Try to choose Object List, but there is no one found

So, now we can choose Object List from our ABAP system, translate it, postprocess if needed and send it back to our system translated into the chosen languages.

 

Best-practices for multilingual ABAP development

Always use English as the default language for all your ABAP development.

Avoid using text constants in your code. Use text elements instead.

If possible, output screen fields or print fields shall not be fixed in width to fit any length of the text as it can change from one language to another.

A Text Pool of Text Elements is initialized each time a program object is created (Report is started, or Class Instance is created). It is initialized in the current User Session language. So, if you need to use Text Elements in a language other than the current one (to prepare emails for different receivers, for example), use SET LANGUAGE statement to do it. If the Text Pool is not switched successfully, it returns SY-SUBRC non-zero value, use some default language value in such case.

You must use that statement in each report or class separately. As the statement switches only current Text pool and does not change any Pool in super class or called report, you must switch it inside each program object you use.

To reset Text Pool to current User Session language just use SET LANGUAGE SY-LANGU statement.

Conclusion

This article describes a simple and straightforward way of integrating ABAP development of multilingual applications into SAP Translation Hub. That speeds up and streams out line development process and makes it possible to get application that speaks a business user’s language.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply