Purpose
Demo ZCL_XTT_DEMO_100 replaces image placeholders in XLSX, DOCX, Word XML, and PDF templates. Use a placeholder whenever the template controls the frame, size, position, border, or other presentation details.
For a fixed number of images, create empty placeholders and replace their binary content at runtime. XML formats commonly embed image data as Base64; Office Open XML stores images as package parts.
Create an image in ABAP
For a simple rectangular image, expose it like any other report field.

Use one ZCL_XTT_IMAGE instance per generated picture:
img TYPE REF TO zcl_xtt_image, " <--- IMAGE
At minimum, pass the binary content as IV_IMAGE TYPE XSTRING.
" Create new instance
<ls_icon>-img = zcl_xtt_image=>create_image( iv_image = lv_image ).
Optionally provide the file extension and dimensions.
" Create new instance
<ls_icon>-img = zcl_xtt_image=>create_image( iv_image = lv_image
iv_ext = '.gif'
iv_width = lv_width
iv_height = lv_height ).
Use a styled placeholder
Keep visual properties in the document template rather than encoding format-specific styling directives in a marker. XTT replaces the image content and preserves the placeholder’s presentation.
Excel
You can identify an image through its alternative text, but this is difficult for a template maintainer to discover.

Naming the shape after the ABAP field makes the mapping easier to inspect.

The clearest option is to place the field marker in the same cell as the image placeholder.

Excel

Word
Word also supports alternative text, bookmarks, and hyperlinks, though each can be easy to miss during maintenance.

Using a visible note makes the marker easier to find.

Word

In Adobe LiveCycle Designer, convert the placeholder to an Image field.

The marker may be assigned in the XML Source view.

Alternatively, store it in the URL property, noting that this mapping is less visible to the template editor.

