Hexadecimal Data: HEX, ENDHEX
Use this command to send printer commands in a printer language directly to a printer that supports that language. SAPscript does not interpret the data enclosed by the HEX and ENDHEX command pair, but inserts it unchanged into the output stream. This technique 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), which will not be interpreted as hexadecimal data but are simply passed over by the formatting routines.
/: HEX [TYPE printer_language]
The HEX command denotes the start of the hexadecimal data. Subsequent text lines are interpreted as described above. If the TYPE parameter is present, the data will be sent to the printer only if the printer understands the specified printer language. The following printer languages are currently supported: POST (Postscript), PRES (Kyocera Prescribe) and PCL (HP Printer Control Language).
/: HEX [TYPE printer_language] [XPOS x_position] [YPOS y_position]
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 printer_language] [HEIGHT height] [LEFT left_indentation]
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.
/: HEX TYPE PCL HEIGHT '7.5'
CM LEFT '2.25' CM
/* Creator: report ZQVNTE30 date 19940705 time 125129 user SAPSCRIPT
This data is printed only by an HP PCL printer (fro 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.
You can use the RSTXLDMC program to upload correctly formatted pixel data to the R/3 system and to prepare it as a HEX-ENDHEX control command. This can then be saved as normal SAPscript text.