SAP Online Text Repository (OTR): SAP OTR Tcodes, Tables, Function and Translation

SAP Online Text Repository (OTR): SAP OTR Tcodes, Tables, Function and Translation

What’s OTR in SAP ?

“The Online Text Repository (OTR) is a central storage location for texts, and provides services for editing and managing these texts.

The main task of the OTR is to support the creation and translation of texts. The OTR makes translation of texts possible. Terminology is more uniform and texts can easily be reused.

This means texts are of high quality right from the start. This also considerably reduces costs for text corrections, such as for spelling mistakes, inconsistent terminology, incorrect style, and so on. Terminology changes can be done from a central location.
The object itself is separated from the texts. Any changes to the object do not influence the texts, and the other way round. This means you can translate the texts independently of the object.” (1)

The OTR is currently supported by the following applications:

  • Web Dynpro for ABAP
  • Business Server Pages
  • Exception Builder
  • HTTP Services
  • Web Services
  • Enhancement Tools

SAP OTR Tcodes

The main OTR Tcodes in SAP are:

  • SOTR_EDIT
  • SE63_OTR

SOTR_EDIT

The transaction code SOTR_EDIT is the Editor for OTR Texts. You can Display, Create and Change OTR Objects using this tcode.

To keep it simple, here a screenshot of what the SOTR_EDIT Transaction looks like:

SOTR_EDIT is the Editor for OTR Texts

SE63/ SE63_OTR

To just remember that the Standard SAP Transaction SE63 is the main transaction for Translation Editor.

To find OTR objects, navigate through
Other Texts > Object Type Selection (Object Groups) > A5 User Interface Texts > LOTR OTR Long Texts

The most Common SAP Function Modules

Here the list of the most useful SAP Function Modules for OTR:

  • SOTR_GET_TEXTS_WITH_KEYS
  • SOTR_GET_CONCEPT
  • SOTR_DELETE_CONCEPT
  • SOTR_OBJECT_GET_OBJECTS
  • SOTR_OBJECT_GET_OBJECTS
  • SOTR_CREATE_CONCEPT
  • OTR_TOOLS_GET_TEXT_VIA_ALIAS

SOTR_GET_TEXTS_WITH_KEYS

SOTR_GET_TEXTS_WITH_KEYS: Holen von Texten anhand der Concept ID und dem Kontext

SOTR_GET_CONCEPT

The SAP Function module SOTR_GET_CONCEPT will Get all entries to an OTR concept.

Here the signature of SOTR_GET_CONCEPT:

SOTR_DELETE_CONCEPT

In order to Delete an OTR concept, you can use the standard Function SOTR_DELETE_CONCEPT.

The signature of SOTR_DELETE_CONCEPT is:

SOTR_OBJECT_GET_OBJECTS

In order to determining the vector to a category of OTR Object, you should use SOTR_OBJECT_GET_OBJECTS.

Here the signature of SOTR_OBJECT_GET_OBJETS:

SOTR_CREATE_CONCEPT

The standatd function to create an OTR Concept is Creating an OTR concept.

Here the signature of SOTR_CREATE_CONCEPT:

OTR_TOOLS_GET_TEXT_VIA_ALIAS

The Standard Function Module OTR_TOOLS_GET_TEXT_VIA_ALIAS will retrieve the text from Alias.

SAP OTR Tables Related

The main SAP OTR tables are:

  • SOTR_HEAD: Header Table for OTR Texts
  • SOTR_TEXT:  Text Table in the OTR
  • OTR_COMM:  OTR: Comment for Concept
  • OTR_VOTE: OTR: Voting Result
  • SOTR_ALIA: Global Alias Name Management in the OTR
  • SOTR_ALIAU: Global Alias Name Management in the OTR
  • SOTR_HEADU: Header Table for Strings in the OTR
  • SOTR_INDEX: Index of OTR Entries for Terminology
  • SOTR_LINK: Concaneted OTR Texts
  • SOTR_TEXTU: Text Table in the OTR with Strings
  • SOTR_USE: Where-Used List for OTR Texts
  • SOTR_USEU: Where-Used List for Strings in the OTR

Let’s focus on the main tables SOTR_HEAD and SOTR_TEXT.

SOTR_HEAD Table

The table SOTR_HEAD is Header Table for OTR Texts.
Note that the key for SOTR_HEAD is the CONCEPT ( Key for Logical Object in OTR ).

The List of fields of SOTR_HEAD are:

    • CONCEPT : Key for Logical Object in OTR
    • PAKET : Package
    • CREA_LAN : Language Key
    • TRALA_TYPE : OTR Translation Class
    • ALIAS_NAME : Unique Alias Name for OTR Concept
    • CREA_NAME : User Name
    • CREA_TSTUT : Timestamp (date and time) related to UTC (GMT)
    • CHAN_NAME : User Name
    • CHAN_TSTUT : Timestamp (date and time) related to UTC (GMT)
    • LST_IMPORT : Date data element for SYST
    • SYSTEM_ID : Name of SAP System
    • TRALA_VEC : Language Vector for Translation Administration
    • CATGY_VEC : Vector of Assigned Categories
    • OBJID_VEC : Vector of Object Types
    • TEXT_TYPE : Type of Referenced Texts

SOTR_TEXT Table

The Text of OTR can be found in SOTR_TEXT table (Text Table in the OTR).

For each entry in SOTR_TEXT, there is 3 keys:

  • CONCEPT: Key for Logical Object in OTR
  • LANGU: Language Key
  • OBJECT: Key for Physical Object in OTR

SAP OTR Translation

As OTR is finally a text, SAP offers a standard way to Internatinalize the text. Find also a custom ABAP report usefull to translate OTRs in an WebDynPro ABAP.

Check also

OTR Translation via Standard SAP Tcode

It is possible to translate WDY text elements via standard SAP transaction.

  1. Open your Web Dynpro view you want to translate via SE80
  2. Menu: Goto >> Object directory entry. You’ll see object, notice it.
  3. Start transaction SE63
  4. Menu: Translation >> ABAP Objects >> Transport Object
  5. Type in your noticed object at field “Transport Entry of Object” and press Edit.
  6. You’ll see ever single text under your paket entry.

Custom ABAP Code for OTR Translation for WDA (2)

Here the custom ABAP Code that can be used for OTR Transactions ( only OTRs used in WDA).
The following ABAP code is originally posted on SDN.

References & Sources:

You may Also like: