PackagePackagetypeA library you install and call yourself.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

abap-form-translator

A runtime translation layer for Smartform and Adobe form labels, matching structure fields against a table maintained in a RAP Fiori app, so a label changes without SE63 or a transport.

Changing a label on a Smartform or an Adobe form normally means the SE63 translation workflow and a transport. This keeps the text out of the form: the components of a flat interface structure are matched by field name against the rows of a database table, ZABAP_FORM_TRANS, through RTTI, and the labels are maintained in a Fiori elements application built with RAP rather than in SE63, which puts a changed label into production without a transport request. Only flat structures are translated, not nested structures or internal tables, and the table is buffered, so a changed text reaches other application servers once the buffer synchronises rather than at once.

Facts

Last pushLicenceMIT

Where it sits

Lives in
Provides
LocalizationABAPLocalizationcapabilityServing labels, messages and translated content per user locale, including translatable model elements and per-tenant text overrides.
Flavors
Requires
abapGitabapGitartifactInstalls the repository into the ABAP system; the README names abapGit as the install method.

Who is behind it

George DrakosGeorge DrakosPersonMaintains this
In the atlas: maintains 4, contributes to 7
@greltel
maintainerLars HvamPersonContributes to this
In the atlas: maintains 13, contributes to 92, wrote 1
@larshp
Marc BernardPersonContributes to this
In the atlas: contributes to 26
@mbtools
2 contributors

What it declares

Every artifact

Type
Package
Origin
Independently maintained

As a package

Where it runs
Inside its host
Distributed through
abapGit

Connections2

README

quoted from greltel/abap-form-translator under MIT, read
greltel/abap-form-translator/README.mdOn GitHub

ABAP Form Translator

✅ Status: Release (2.0.0)

Open Source Contribution: This project is community-driven and Open Source! 🚀 If you spot a bug or have an idea for an enhancement, open an Issue or submit a Pull Request — see CONTRIBUTING.md.

ABAP Cloud ABAP Version Code Statistics License Tests Version

A lightweight, dynamic runtime translation tool for SAP forms, written in ABAP for Cloud Development. It decouples text management from form development: functional consultants maintain labels in a Fiori Elements app, and the print program picks them up at runtime — no SE63, no transport for a changed label.

Table of contents

  1. Key benefits
  2. What's new in 2.0.0
  3. Requirements
  4. Installation
  5. Usage
  6. The maintenance app
  7. Architecture
  8. Design decisions
  9. Tests
  10. License
  11. Contributors

Key benefits

  • No more SE63: forget the standard translation workflow for forms.
  • Zero hardcoding: keep the form logic clean — no IF sy-langu = 'D'. text = 'Kunde'. ENDIF.
  • Hot-swap texts: change a label in production without a transport request. The table is buffered, so a change becomes visible on other application servers after the buffer synchronisation interval (typically ~60 s). Inside a long-running session (mass print, batch job) call ZCL_FORM_TRANSLATION=>clear_buffer( ) to pick it up immediately.
  • Generic: works with any flat ABAP structure or form interface, matched by component name through RTTI.
  • Performance: table buffering plus a per-session translation buffer — zero impact on print times.
  • Fiori Elements app built with the ABAP RESTful Application Programming Model (RAP), draft-enabled, with a Copy Language action that duplicates a translation into another language straight from the list.
  • Authorization: read and maintenance access is governed by one authorization object, ZFORMTRA, checked in CDS access control and in the behavior implementation.
  • Tested: 66 ABAP Unit tests, 43 of which also run outside SAP on every push.

2026-03-07 23-40-52

What's new in 2.0.0

2.0.0 is the first release built as ABAP for Cloud Development, with authorization checks and a hardened behavior implementation. It is a breaking release for installations: see CHANGELOG.md for the details and the upgrade notes.

Requirements

  • SAP S/4HANA 2023 (ABAP 7.58) or later — on premise or private cloud.
  • A package with ABAP language version ABAP for Cloud Development. All objects carry that language version; the repository sets it for abapGit as well.
  • abapGit for the installation.

The runtime class can be called from any ABAP code — classic print programs and Smart Forms / Adobe Forms drivers included. Only the objects of this package need the cloud language version, not their callers.

Older systems or standard packages: the code itself is compatible with Standard ABAP. Set the abapGit repository option ABAP Language Version to Undefined before pulling, and expect no support for releases before 7.58 — the logon language is read through xco_cp=>sy->language( ), which is not available on every 7.57 system.

Installation

  1. Create a package (for example ZABAP_FORM_TRANSLATION) with ABAP language version ABAP for Cloud Development.
  2. In abapGit, create an online repository for https://github.com/greltel/abap-form-translator on that package and pull. Activate the objects if abapGit did not do it for you.
  3. Roles: add authorization object ZFORMTRA to a role. Activity 03 displays translations in the app, 01/02/06 create, change and delete them. The Copy Language action needs 01. The service binding ZUI_FORM_TRANS_BIN ships with SU22 default values, so PFCG proposes the object when the binding is added to a role.
  4. Fiori app: publish the OData V4 service binding ZUI_FORM_TRANS_BIN and either use the ADT preview or generate a List Report with SAP Fiori tools from the published service and deploy it to your launchpad. The repository ships the service, not a UI5 project.

Print-time reads of the table are not guarded by the access control on purpose: the user who prints a form needs no maintenance role. Only the app is checked.

Usage

In your Adobe / Smart Forms driver program
  1. Define a structure for your labels in the form's global definitions or in the driver program.
  2. Populate it with defaults (optional).
  3. Call the translator before the form function module.
TYPES: BEGIN OF form_labels,
         title        TYPE string,
         footer_note  TYPE string,
         customer_lbl TYPE string,
       END OF form_labels.

DATA(labels) = VALUE form_labels( title = 'Invoice' ).

DATA(translator) = CAST zif_form_translation( NEW zcl_form_translation( ) ).

" Texts in the logon language of the user, English filling the gaps.
translator->translate_form( EXPORTING formname      = 'ZINVOICE_FORM'
                            CHANGING  form_elements = labels ).

" labels now carries the texts maintained in the app - pass it to the form.

Pass langu to translate into a specific language, for example the language of the business partner the document is addressed to.

API reference

translate_form maps the rows of ZABAP_FORM_TRANS onto the components of your structure by field name (via RTTI).

ParameterDirectionTypeDefaultMeaning
formnameimportingzabap_form_trans_name–Key in ZABAP_FORM_TRANS. An empty value returns without changes. Matched case-insensitively.
languimportingzabap_form_trans_langulogon languageTarget language. When empty, the logon language of the user is used; when that cannot be resolved, the default language E.
enable_fallbackimportingabap_booleanabap_trueWhen on, fields without a text in the target language fall back to the default language E.
form_elementschangingany–Flat structure whose components are filled with the translated texts. Components that cannot hold text keep their value.

clear_buffer (static) invalidates the in-memory translation buffer.

The constructor accepts an optional zif_form_trans_user_context — the source of the logon language. You will only ever pass it in a unit test.

Only flat structures are supported. Nested structures and internal tables are not translated. A translation with an empty text leaves the component untouched.

Database table ZABAP_FORM_TRANS
FieldTypeKeyDescription
FORMZABAP_FORM_TRANS_NAME (CHAR 30)✔Form key passed as formname.
FIELDNAMEZABAP_FORM_TRANS_FIELD (CHAR 30)✔Component name in your structure.
LANGUZABAP_FORM_TRANS_LANGU (LANG)✔Language of the text.
DESCRZABAP_FORM_TRANS_DESCR (CHAR 50)Translated text.
LENGTHZABAP_FORM_TRANS_MAXLEN (INT2, 0–9999)Max length; a longer text is truncated at print time. 0 means no limit.

Form and field names are stored in upper case; the app rejects anything else, because HANA compares case-sensitively and the text could never be found at print time.

The maintenance app

The list report on ZC_FORM_TRANS is draft-enabled: create, edit and delete rows, search by form, field or language, and use the value helps for form and field names.

Copying a translation into another language

Select one or more rows, press Copy Language and pick the target language. Each selected row is duplicated into that language as a draft, keeping its description and max length. Rejected with a message:

  • the target language is empty, or is the language of the row itself
  • a translation already exists under the target key, active or draft
  • two selected rows of the same form and field aim at the same target language — there is no way to tell which text should win, so the whole selection is rejected rather than letting the first row silently decide
Validations
RuleTriggerMessage
Description must not be emptycreate, update, Prepare002
Max length between 0 and 9999create, update, Prepare001
Text longer than max lengthcreate, update, Prepare006 (warning, does not block)
Key must not exist yetcreate003
Form and field name upper casecreate007
Authorization
OperationZFORMTRA activity
Display (list, value helps)03
Create, Copy Language01
Edit / Update02
Delete06

Denied operations report messages 008 (create) and 009 (change / delete).

Architecture

Three layers, each testable on its own:

LayerObjectsRole
Print timeZIF_FORM_TRANSLATION, ZCL_FORM_TRANSLATION, ZIF_FORM_TRANS_USER_CONTEXT, ZCL_FORM_TRANS_USER_CONTEXTReads the table, resolves the language, maps texts onto the caller structure. The user context adapter is the only platform dependency.
RulesZCL_FORM_TRANS_RULESPure functions: validation and copy rules, free of RAP and persistence.
MaintenanceZI_FORM_TRANS (root, draft), ZC_FORM_TRANS (projection), ZBP_I_FORM_TRANS, ZDD_COPY_LANG_POPUP, value helps, ZIF_FORM_TRANS_AUTHORITY, ZCL_FORM_TRANS_AUTHORITY, DCLs, ZFORMTRA, ZUI_FORM_TRANS_O4, ZUI_FORM_TRANS_BINRAP business object, authorization, OData V4 service.

Inside the behavior pool, lcl_form_trans_factory resolves the authority check; tests inject a double through it. Handler methods are called directly by the test classes (friends of the handler), EML is reserved for two smoke tests.

Design decisions

  • ZCL_FORM_TRANSLATION is not FINAL and reads the database in a protected method. An injected reader interface would cost two more objects for one SELECT; tests substitute the read by subclassing. The logon language, in contrast, is injected, because without that seam the "no language given" path could not be tested.
  • ZCL_FORM_TRANS_RULES is a static class. The rules are pure functions with no collaborators; there is nothing to double, so nothing to inject.
  • Authorization is global, not per instance. ZFORMTRA carries only ACTVT; a per-form authorization would add a field and an instance check — easy to add later, not needed now.
  • The logon language comes from XCO (xco_cp=>sy->language( )), the one place in the package that reads the session, behind ZIF_FORM_TRANS_USER_CONTEXT.
  • The table has delivery class C. Translations are transportable customizing by default; production maintenance through the app is still possible.
  • Object names are frozen. Renaming shipped tables and views would force a data migration on every installation; new objects follow the naming of the existing ones.

Tests

66 ABAP Unit tests run in ADT:

ClassTestsCovers
ZCL_FORM_TRANSLATION17RTTI mapping, truncation, language resolution, fallback, buffer
ZCL_FORM_TRANS_RULES25every validation and copy rule, including ambiguity
ZCL_FORM_TRANS_USER_CONTEXT1forwards the logon language
ZBP_I_FORM_TRANS23global authorization, validations, feature control, Copy Language, save sequence
Running the tests off-stack

The classes without RAP dependency also run outside the ABAP system, transpiled to JavaScript with abaplint, so every push is verified without an SAP system:

npm ci
npm run check

check runs abaplint (Clean ABAP rules plus a syntax check against the released ABAP Cloud API) and all 43 transpiled tests of ZCL_FORM_TRANSLATION, ZCL_FORM_TRANS_RULES and ZCL_FORM_TRANS_USER_CONTEXT, backed by an in-memory SQLite database so SELECT and CL_OSQL_TEST_ENVIRONMENT behave as in the system. Nothing is skipped off-stack. The behavior pool tests need the RAP runtime and run in ADT only.

License

This project is licensed under the MIT License.

Contributors

Created by George Drakos.

MIT, read

History

Latest

v2.0.0

Removed 2, Features 5, Changed 7, Other 4

Notes

First release built as ABAP for Cloud Development. Breaking for existing installations — read the upgrade notes.

Added
  • Authorization object ZFORMTRA (activity only) with CDS access control on every view and a global authorization check in the behavior implementation. Denied operations report messages 008 and 009.
  • ZIF_FORM_TRANS_AUTHORITY / ZCL_FORM_TRANS_AUTHORITY: the authority check behind an interface, injected into the handler through a local factory.
  • ZIF_FORM_TRANS_USER_CONTEXT / ZCL_FORM_TRANS_USER_CONTEXT: the logon language behind an interface; ZCL_FORM_TRANSLATION takes it as an optional constructor parameter, so the "no language given" path is testable.
  • Direct handler tests for the global authorization, every validation, the feature control and the Copy Language action (23 tests on the behavior pool).
  • Off-stack gate hardened: abaplint syntax check against the released ABAP Cloud API (2305 snapshot), Clean ABAP rules, a CI guard for the #CHANGE_SET grouping of the Copy Language button, Dependabot.
Changed
  • All objects carry ABAP language version ABAP for Cloud Development; the abapGit repository sets cloudDevelopment.
  • Minimum release is SAP S/4HANA 2023 (ABAP 7.58).
  • Validation validateUniqueKey reads the persisted keys with one SELECT per request instead of one per instance.
  • Copy Language messages show the ISO 639 code of the language (EL, DE) instead of the internal key.
  • ZCL_FORM_TRANS_RULES=>check_copy_request takes a copy_request structure instead of six scalar parameters.
  • The behavior implementation of the Copy Language action is split into queue_copies, report_rejection and create_drafts.
  • Message texts in the tests use string literals in backticks; internal tables are filled with INSERT … INTO TABLE throughout.
Removed
  • Dead exception handling around the logon language and the XCO language formatting.
  • Four EML-driven tests of the save sequence that the direct handler tests cover; two smoke tests remain.
Upgrade notes
  • Move the objects into a package with ABAP language version ABAP for Cloud Development (or set the abapGit option ABAP Language Version to Undefined to keep a standard package).
  • Every user of the app needs ZFORMTRA: 03 to display, 01/02/06 to maintain. Without a role the list is empty and create is denied.
  • Callers of ZCL_FORM_TRANS_RULES=>check_copy_request (unlikely outside this package) have to pass a copy_request structure.
  • The protected type ZCL_FORM_TRANSLATION=>translations became a sorted table with a unique key on the field name.
  1. v1.3.0

    Notes

    Standard ABAP releases; see the GitHub releases.

Localization
  1. abap_btocs_deeplDeepL translation plugin for the B-Tocs ABAP SDK
  2. abap_btocs_libtrlLibreTranslate plugin for the B-Tocs ABAP SDK
  3. SAP Translation HubTranslation service for software texts and documents
  4. ABAP_DeepL_clientABAP client for the DeepL translation service
  5. LISAMCP server for reading and writing ABAP object translations
  6. ABAP_TRANSLATION_HUBReport pushing ABAP objects to SAP Translation Hub and back
  7. ZOTR_UTILITYABAP framework reading texts from SAP's online text repository
  8. ZABAP_TRANSLATIONSExcel export and import of ABAP package or program texts
  9. XLF TranslatorEditor for the translations in an uploaded XLIFF file

Details

Sources3
dotabapdiscovered herechecked
github.com/greltel/abap-form-translatortree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viadotabap
first seen in the atlas
ecosystem and domainabap, ui-and-frontend-bridge
abaplint
issues under its own abaplint configuration0
lines3,204
statements1,870
objects36
files21
analysed, main
abaplint version2.120.84
Flavors1
ABAP Cloud
“ABAP Cloud/Clean Core compatibility.Passed SCI check variant S4HANA_READINESS_2023 and ABAP_CLOUD_READINESS” — greltel/abap-form-translator — README, Design Goals-Featureschecked
Contributors2

From the repository’s contributor list, .

History in the atlas1
  1. First seen.
For your agent
Ref
artifact:greltel-abap-form-translator
JSON
/artifacts/greltel-abap-form-translator.json
MCP
Connecting an agent