ERPClimb logoERPClimb
SmartForms
ABAP Developmentintermediate 7 min read

Smart Forms Part 7: Texts, Translations and Language Handling

Preview · a free account unlocks the full lesson

Key takeaway

Handle texts in Smart Forms: text elements, text modules (SMARTFORMS), include texts from SO10 and document texts (READ TEXT objects like VBBK), translation with SE63, language selection via CONTROL PARAMETERS-LANGU and NAST-SPRAS, and formatting with Smart Styles.

In this lessonShow sections

Visual overview

Smart Forms Part 7: Texts, Translations and Language Handling — learning sheetFlow: Create a text module ZTM_BANK_DETAILS and use it in the footer window → Add an include text node for the billing header text (object VBBK, ID 0002, name &IS_HEADER-VBELN&) → Translate the form into another language in SE63 and print with that language. Key ideas: TEXT ELEMENTS; TEXT MODULES (SMARTFORMS → Text module); INCLUDE TEXTS (SAPSCRIPT TEXTS); LANGUAGE HANDLING. Watch out: Hard-coded text elements in one language make every new country a form change — use text modules and include texts.ERPClimb.com / ABAP / LESSON 7/8 / LEARNING SHEETSmart Forms Part 7: Texts, Translations and LanguageHandling1 · HOW IT FLOWS1Create a text moduleZTM_BANK_DETAILS and useit in the footer window2Add an include text nodefor the billing headertext (object VBBK, ID…3Translate the form intoanother language in SE63and print with that…2 · KEY IDEAS EXPLAINEDText ElementsStatic text in a text node, with fields(&GS_ITEM-ARKTX&). Translatable with theform, but not reusable.Text Modules (Smartforms → Text Module)Reusable text (e.g. company footer, legal terms)used in several forms.Translated centrally with SE63; changed once forall forms.Include Texts (Sapscript Texts)Standard texts SO10: text name, ID ST, objectTEXT, language.Document texts: object VBBK (sales/billing headertexts), VBBP (item), EKKO/EKPO (purchasing); name= document number (+ item); text ID e.g…Language HandlingOutput control passes NAST-SPRAS →CONTROL_PARAMETERS-LANGU in the driver.Form attributes: original language,"translate to all languages" or selectedlanguages.3 · REMEMBER · WATCH OUTRememberThree text sources: text elements (typed in the node), text modules(reusable, translatable objects), include texts (SO10 standard texts…Output language comes from CONTROL_PARAMETERS-LANGU (in outputcontrol: NAST-SPRAS); the form falls back to its original language if…Translate forms and text modules with SE63; standard texts in SO10 perlanguage.!Watch outHard-coded text elements in onelanguage make every new country aform change — use text modules andinclude texts.4 · IN A REAL PROJECTA company expanded into three new countries and needed invoice legal texts in each language. The legal textwas a hard-coded text element in English in five forms. The team moved it into a text module translated inSE63 and switched the driver to pass NAST-SPRAS. New countries now need only a translation, not form changes…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

Part 6 of this series printed data; most business forms also carry legal texts, terms, and document-specific notes, often in several languages, so this lesson covers how to handle text and translation properly. There are three sources of text.

Text elements are static text typed directly into a text node, which can include fields such as &GS_ITEM-ARKTX&; they get translated along with the form itself, but aren't reusable elsewhere.

Text modules, created under SMARTFORMS → Text module, hold reusable text — a company footer or legal terms, for example — shared across several forms, translated centrally in SE63, and changed once for every form that uses them.

Include texts, also called SAPscript texts, cover two cases: standard texts maintained in SO10, identified by a text name, an ID such as ST, object TEXT, and a language; and document texts, tied to objects like VBBK and VBBP (sales and billing header and item texts) or EKKO/EKPO (purchasing), named by the document number plus item, with a text ID such as 0001 or 0002.

Inside an include text node, the text name can itself be a variable, such as &IS_HEADER-VBELN&, the language can be a variable too, such as &IS_HEADER-SPRAS&, and there's an option for "No error if text does not exist."

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Code example
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

Keep exploring

Referenced SAP objects

Reviewed reference pages for the objects this page mentions.

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.