SmartForms
ABAP Developmentintermediate

Smart Forms Part 7: Texts, Translations and Language Handling

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.

Explanation

📌 KEY POINTS
✅ Three text sources: text elements (typed in the node), text modules (reusable, translatable objects), include texts (SO10 standard texts or document texts like VBBK/VBBP).

✅ Output language comes from CONTROL_PARAMETERS-LANGU (in output control: NAST-SPRAS); the form falls back to its original language if no translation exists.

✅ Translate forms and text modules with SE63; standard texts in SO10 per language.

⚠️ Hard-coded text elements in one language make every new country a form change — use text modules and include texts.

━━━━━━━━━━━━━━━━━━━━
▶ WHERE WE ARE

Part 6 printed data. Most business forms also contain legal texts, terms and document-specific notes — in several languages.

━━━━━━━━━━━━━━━━━━━━
▶ 1. TEXT ELEMENTS

Static text in a text node, with fields (&GS_ITEM-ARKTX&). Translatable with the form, but not reusable.\n\n━━━━━━━━━━━━━━━━━━━━\n▶ 2. TEXT MODULES (SMARTFORMS → Text module)\n• Reusable text (e.g. company footer, legal terms) used in several forms.

  • Translated centrally with SE63; changed once for all forms.

━━━━━━━━━━━━━━━━━━━━
▶ 3. INCLUDE TEXTS (SAPSCRIPT TEXTS)

  • Standard texts SO10: text name, ID ST, object TEXT, language.
  • Document texts: object VBBK (sales/billing header texts), VBBP (item), EKKO/EKPO (purchasing); name = document number (+ item); text ID e.g. 0001/0002.
  • In an include text node: text name can be a variable (e.g. &IS_HEADER-VBELN&), language &IS_HEADER-SPRAS&; "No error if text does not exist" option.

━━━━━━━━━━━━━━━━━━━━
▶ 4. LANGUAGE HANDLING

  • Output control passes NAST-SPRAS → CONTROL_PARAMETERS-LANGU in the driver.
  • Form attributes: original language, "translate to all languages" or selected languages.
  • Missing translation → original language text appears — check in QA per country.

━━━━━━━━━━━━━━━━━━━━
▶ 5. SMART STYLES

  • SMARTSTYLES: paragraph formats (fonts, spacing, tabs) and character formats (bold, barcode).
  • Assign at form level; override per node when needed.

━━━━━━━━━━━━━━━━━━━━
▶ STEP BY STEP

  1. Create a text module ZTM_BANK_DETAILS and use it in the footer window.
  2. Add an include text node for the billing header text (object VBBK, ID 0002, name &IS_HEADER-VBELN&).
  3. Translate the form into another language in SE63 and print with that language.

✅ CHECKPOINT: you can use reusable, translatable texts and print forms in the document language.

Code example

ABAP Code
* ===== Include text node for a billing header text =====* Text type   : Include text* Text name   : &IS_HEADER-VBELN&     (billing document number)* Text object : VBBK* Text ID     : 0002* Language    : &IS_HEADER-SPRAS&* [x] No error if no text exists * ===== Driver: language from output control =====* ls_control-langu = nast-spras. * ===== Reading a document text in the driver (alternative: pass as table) =====FORM read_header_text USING    iv_vbeln TYPE vbeln_vf                               iv_spras TYPE spras                      CHANGING ct_lines TYPE tline_tab.  DATA lv_name TYPE tdobname.  lv_name = iv_vbeln.  CALL FUNCTION 'READ_TEXT'    EXPORTING      id       = '0002'      language = iv_spras      name     = lv_name      object   = 'VBBK'    TABLES      lines    = ct_lines    EXCEPTIONS      not_found = 1      OTHERS    = 2.  IF sy-subrc <> 0.    CLEAR ct_lines.                     " no text: print nothing  ENDIF.ENDFORM. * ===== Text sources =====* Text element  : typed in the node, translated with the form (SE63)* Text module   : SMARTFORMS -> Text module, reusable, SE63 translation* Include text  : SO10 standard texts (object TEXT, ID ST) or document texts (VBBK/VBBP/EKKO)

Real project scenario

A company expanded into three new countries and needed invoice legal texts in each language. The legal text was a hard-coded text element in English in five forms.
The team moved it into a text module translated in SE63 and switched the driver to pass NAST-SPRAS. New countries now need only a translation, not form changes, and legal updates are done once.

Common mistakes

  • Hard-coded texts duplicated across forms.
  • Driver ignoring NAST-SPRAS.
  • Include texts without "no error if missing".
  • Wrong text object/ID/name for document texts.
  • Untested translations (fallback to original language).

Best practices

  • Text modules for reusable texts.
  • Include texts for document and standard texts.
  • Language from output control.
  • Smart Styles for consistent formatting.
  • Test each language in QA.

Interview angle

Questions: "Which text types exist in Smart Forms?", "How do you print a sales order header text?", "How is the output language determined?"
Strong answer: text elements, text modules (reusable, SE63 translation), include texts (SO10 or document texts VBBK/VBBP with ID/name/language, READ_TEXT in driver); language via CONTROL_PARAMETERS-LANGU from NAST-SPRAS, fallback to original language; Smart Styles for formatting.

Practice this lesson

Quick check

1. A legal text appears in English on a French invoice although the headers are French. Likely cause?

2. Why should hardcoded text be avoided in SmartForms?

3. Multiple language versions are best handled via:

Interview questions

1. A German customer received an invoice with German headers but English legal text. What causes mixed languages and how do you fix it?

Answer it in your own words first, then compare.

2. How do you support 30 country-specific invoice variants?

Answer it in your own words first, then compare.

Practice more with Interview AI →

Reference-verified: the steps are checked against official SAP documentation and tutorials, and object and field names in the sample code are checked for consistency. The code has not been compiled or run on an SAP system by ERPClimb. Syntax marked release-dependent varies by SAP release, so check it in your own system.

More lessons in this topic

Interview questions on this topic

Related SAP topics