Technical Articles
ABAP Texts Translation with SAP Translation Hub
SAP is being used all over the world and in almost all the languages and that brings an important aspect of Translation of Texts to all the required languages. We have been doing so in ABAP using transaction SE63 by maintaining translations to all required languages manually.
To accelerate and automate the process, SAP has launched SAP Translation Hub and Document Translation services.
Core features of SAP Translation Hub
- SAP Translation text repository
- SAP Machine Translations
- Possibility to integrate Own language Translations
- Over 40 languages supported
- Integration with SAP and non SAP systems
SAP Translation Hub offers following solution capabilities:
- User Interface Translations ( Using Translation Hub service)
- Document Translation ( Using Document Translation Service)
Apart from UI-Based workflows for translation, there are APIs available for Translation of short texts, Document translation etc. and more details can be checked on SAP API HUB
Check this for step by step process on how to Setup of Translation Hub Service on BTP.
Check this for step by step process on how to set up Document Translation Service on BTP
Check this for how to translate document using Document Translation service
Check this for how to translate SAP Fiori Apps using Translation Hub service
In ABAP also, we create text for for all the object types that we create, be it Data Elements, Domains, Selection Text, Forms etc. and we need to maintain translations for all those text in required languages in SE63.
SAP Translation Hub can be integrated with Backend on-premise systems to translate the text in a faster way. There are two ways to use Translation Hub for ABAP translations:
- Translate ABAP short texts via the SAP Translation Hub workflow
- Translate ABAP short texts with Report RS_LXE_MLTR_GET_TEXTS_FOR_OL
In this Blog, we are going to see how we can do translations using Translation Hub Workflow
Prerequisite
Translation Hub service is already enabled and Translation hub Workflow UI is accessible
Setting up Cloud Connector.
Cloud connector need to be set up to connect to the backend system where we want to do translations and expose the LXE* Function modules to be used by translation hub to access the objects text.
Create a Destination in BTP Cockpit
Once the cloud connector is connect and backend system is available, we need to create an RFC destination in Clod cockpit with desired authentication.
Create an ABAP Object List in Backend System.
Now we need to create a list of objects for which we want to translate the short texts. Follow the steps below :
- Navigate to transaction “LXE_MASTER” and click on “Object Lists” under Evaluations Tab
- Click on create new object list and give any name and save.
- There are multiple options to select the objects in the list like via collections, transports, Transportable objects etc. Lets add individual object
- Enter the Object details. In this case, I have select a program to translate the text elements for. Click Save
- Next, select the object list created and click on Schedule and select the server on which job need to be scheduled.
- We can see the Job status marked with “X” when completed. Now our object list is ready to be translated in Translation Hub
Create ABAP Project in Translation Hub UI.
- Navigate to the Translation Hub Workflow UI and create an ABAP Project
- Enter the Project Name, Source and Target language . Selected the ABAP system we connected to earlier and select the Object list created in backend and we want to translate.
- We can enable Post translation editing, review and approval process before pushing translations to backend if needed.
- Click on “translate without send“
- Once Translation is finished, we will get the message and the status will be updated in status field.
- If translation is successful, we can see translation under “Translations” tab. Click on Translations Tab.
- We can see the translated text and can modify post translation is enabled.
- We can also see the Translation Provider. In this case it is MTR ( Machin Translation). there could be SAP Translations and Company Specific translation (cMLTR) also if maintained.
- For each translation, there is Quality index also shown , to give an idea on the confidence on translation.
- If all good, click on “Send to ABAP” to push translations to backend.
- In the backend , go to the object and check translations
- We can see all the translation are updated in backend successfully.
So, this way we can translate the object list into multiple languages using translation hub.
Using the second option , we can connect to translation hub via HTTP connection and can translate using Standard report “RS_LXE_MLTR_GET_TEXTS_FOR_OL” directly in backend without using the Workflow UI. Check part 2 for details on using Report method.
Keep Learning & Keep Sharing.
Thanks for sharing Vijay.
This is a great blog on how to utilize SAP Translation Hub for ABAP text.
Michael
Thanks Michael Duerr!
Thank you Vijay Sharma for sharing. 👍
Hi All,
The RFC destination has to be created following the link below.
https://help.sap.com/viewer/sth-latest/efa3f450f46a42bd8413cba2e70d84a9.html
The step provided in the blog was not working.
Thanks
-Aman
Beginning January 2023, there is a requirement to send Invoices to Saudi government in Arabic in a specific XML format. We have done prototype, but one of the requirements is to use Arabic for all readable fields. We have enabled Document and Reporting Compliance (5XU) and AIF (application integration framework) to generate XML invoices. Can this English to Arabic translation process be inserted? REading above steps looks like it works for static data, not dynamic.
Hi Hubbel,
SAP delivered a localized e-invoicing solution for SAP ECC and S/4HANA customers in Saudi Arabia (KSA)
For international address versions activation, please check the SAP note 316331.
Please find the link of Language Handling and Installation Procedure (Link)
Best regards,
Latif
Product managemnet team - MENA
Hi Mohamed - These links are for ECC and on Prem S4. We are a public cloud (S4HC) client. I don't see any reference for S4HC. Thanks for checking but curious why no documentation for S4HC?
Hi Vijay
Thank you Vijay for the great blog. It's really helpful.
Does SAP Translation Hub also support translation of Workflows, Adobe forms and Customizing objects ?
I tried to translate Workflow & Adobe forms but it did not work.
Same issue here. I've got objects in OBJLIST job, but in the app :
"Error In Execution" => "2. ERROR - No text in ABAP Object List."
My objects are Fiori spaces and pages : Short Text A5 UIPC and UISC
I tried with workbench objects and it worked well
Hi Rajana, Severin,
SAP Translation Hub supports the translation of self-developed short texts that are marked as S-type. The translation support is basis release specific, so we recommend customers to check in their relevant system in the table LXE_ATTOB for the text types marked with "S". The remaining text types in that table are not supported (e.g. ABAP long text).
Best regards,
Ana
Hi Ana,
These texts are in type S but not detected in Translation Hub:
Any information about them?
Thanks
Hi Severin,
They should theoretically be supported, but I am afraid I cannot answer that without further testing - let me discuss it internally first and come back to you.
Best regards,
Ana
Hi Severin,
I can confirm the discrepancy that you have in your own system. Unfortunately, at the moment, these texts cannot be translated, but we are going to investigate internally if and how they can be enabled for translation.
Best regards,
Ana
Thank you Ana, keep me posted 🙂