Show TOC

Hexadecimal Data: HEX, ENDHEXLocate this document in the navigation structure

Use

You use this command to send printer commands in a printer language directly to a printer that supports that language. SAPscript cannot interpret data between HEX and ENDHEX and therefore places it directly in the output flow. This allows objects with a pixel-oriented format (for example, graphics) to be printed as part of a SAPscript text. The HEX and ENDHEX command pair enclose the printer commands and data as hexadecimal text, so that the printer formatting routines interpret each successive pair of characters as a single hexadecimal value in the range of 0 to 255. The characters 0 to 9 and A to F for representing the values 10 to 15 are valid hexadecimal characters. The text may also include comment lines (these begin with /* in the format column of the line editor), which will not be interpreted as hexadecimal data but are simply passed over by the formatting routines.

/: HEX TYPE druckersprache/grafik
         

The HEX command denotes the start of the hexadecimal data. Subsequent text lines are interpreted as described above. The parameter TYPE is mandatory. The following printer languages are currently supported: POST (Postscript), PRES (Kyocera Prescribe) and PCL (HP Printer Control Language). BMON (black/white raster image) and BCOL (color raster image) can be used as graphic parameters.

/: HEX TYPE druckersprache/grafik [XPOS xposition] [YPOS yposition]
         

The output cursor is set to the absolute position indicated by the specified X and Y position parameters before the hexadecimal data is printed. If either the X or the Y position is not specified, then 0 will be assumed for this parameter.

/: HEX TYPE druckersprache/grafik [HEIGHT höhe] [LEFT linker Einzug]
         

The HEIGHT parameter determines the amount of space to be reserved on the page for the output of the hexadecimal data. Any text following the ENDHEX command will be printed below this point. If the LEFT parameter is also specified, then the output of the hexadecimal data will is indented from the left margin by the specified amount.

Example

/: HEX TYPE PCL HEIGHT '7.5' CM LEFT '2.25' CM

/* Creator: report ZQVNTE30 date 19940705 time 125129 user SAPSCRIPT

/= 1B2A7230461B2A743735521B2A7231411B2A62304D1B2A62343057FFFFFFFFFFFF

/= FF1B2A62343057FFFFFFFFFFFFC0007D00DFC0F7D0000000000000000000000017

/: ENDHEX

This data is printed only by an HP PCL printer (for example, HP LaserJet). 7.5 cm of space is allocated on the page for the output of the data and the output cursor is indented 2.25 cm to the right of the form window edge.

Caution

You can use the RSTXLDMC program to upload correctly formatted pixel data to the SAP system and to prepare it as a HEX-ENDHEX control command. This can then be saved as normal SAPscript text.