VeloX Docs

S/4HANA plugins

LongText Converter

Convert compressed SAP long text RAW data into readable text lines.

Overview

The LongText Converter plugin is in the S/4HANA group on the left panel of the Designer. It is a converter: place it between a source and a target.

The plugin takes SAP long texts in compressed RAW format (the hexadecimal CLUSTD cluster data, for example read from table STXL) and converts them into text lines with a format field (TDFORMAT) and a text line (TDLINE). It doesn't connect to SAP: the conversion runs locally in VeloXm. The decompression library is installed with VeloXm, so you don't need anything else.

How to use

  1. Add the LongText Converter plugin to the canvas.
  2. Open Settings and set the options. See Settings.
  3. Open Fields and select the import and export fields you need. Use Select All to select all fields.
  4. Map the import fields to a source, for example an SAP table read or an Excel file. RAW Data (Hex) is required.
  5. Map the export fields to the next plugin.

Only the fields you select in Fields appear on the canvas and in the output. The Notes button opens notes you can keep with the plugin.

Settings

Setting Description
Group by keys Joins the RAW data of all rows that have the same keys before conversion: Client, Application object, Name, Text ID, and Language Key. Use it when one long text is split over several source rows. Selected by default.
Unicode Decodes the text as Unicode. Selected by default. Clear it for texts from non-Unicode systems.

When Group by keys is selected, rows of the same text are joined in the order they arrive from the source. Make sure the source returns them in the right order, for example sorted by the STXL counter field SRTF2.

Group by keys uses only the key fields that you map. If you don't map any key field, all source rows are joined into one text.

When Group by keys is cleared, each source row is converted on its own. Use this only when every row holds a complete compressed text.

Import and export fields

Field Description Import Export
MANDT Client Yes Yes
TDOBJECT Application object Yes Yes
TDNAME Name Yes Yes
TDID Text ID Yes Yes
TDSPRAS Language Key Yes Yes
CLUSTD RAW Data (Hex) Yes (required) Yes
TDFORMAT Format Field — Yes
TDLINE Text Line — Yes

The plugin returns one row for each text line. Key fields are repeated on every line. The export field RAW Data (Hex) is filled only on the first line of each text.

Field options

Click an import field to set its options:

  • Default Value – the value to use instead of, or in addition to, the source value:

    • No Default Value. – always use the source value.
    • Ignore Source. – always use the default value.
    • Only If Source Empty. – use the default value only if the source value is empty.

    A D flag appears on the field when a default value is used.

  • Convert To Upper Case – converts the value to upper case. A U flag appears on the field.

The field settings also show Add Leading Zeros. The converter does not apply this setting to the import values.

Click the export field Text Line and select Remove End Spaces to remove trailing spaces from each text line. The S flag appears on the field.

Run-time behavior

  • The plugin skips rows for which the source returns no RAW Data (Hex) value (null), and all rows if RAW Data (Hex) is not mapped.
  • An empty text value is not skipped: it fails the hexadecimal check. Use Only If Source Empty. with a default value, or filter such rows in the source.
  • The run fails with an error if the RAW data contains characters that are not hexadecimal, if the data is not compressed, or if the data can't be decompressed. One invalid text stops the whole run.
  • For each line, Format Field gets the first two characters of the decompressed line and Text Line gets the rest of the line.
  • The plugin works the same way in simulation mode, because it doesn't write data anywhere.
  • Each run is written to the technical log under the name RAW LongText Converter, with the plugin version. If the run fails, the log row is marked as an error with the exception text.
Esc