Page 1 of 1

SAPSCRIPT STX command in HEX to Zebra Printer

PostPosted: Mon May 13, 2013 9:50 am
by axxter
Hello togehter,

for a connection with a labeling roboter (Zebra ZPL-2 printing unit) I have to insert hexadecimal control characters STX ( HEX 02 ) and ETX ( HEX 03 ) into our spool order. I tried HEX/ENDHEX as well as the ASCII characters in the form but it didn´t work. Does anyone know how to manage this?

I hope I made myself clear - I´m a newbie...

http://en.wikipedia.org/wiki/Control_character

Many thanks,

Sebastian

Re: SAPSCRIPT STX command in HEX to Zebra Printer

PostPosted: Mon May 13, 2013 11:34 am
by Sharpshooter
Zebra have software to generate the form with the proper commands. It is called "Bar 1 for R/3". See OSS note 179534.

Dave

Re: SAPSCRIPT STX command in HEX to Zebra Printer

PostPosted: Tue May 14, 2013 7:29 am
by axxter
This tool does not provide a solution :(

Re: SAPSCRIPT STX command in HEX to Zebra Printer

PostPosted: Tue May 14, 2013 8:21 am
by Gothmog
You can get your hexadecimal control character in a character variable like this:
Code: Select all
DATA: g_char TYPE c,
      g_hex  TYPE x.
FIELD-SYMBOLS: <char>.

g_hex = '02'.
ASSIGN g_char TO <char> CASTING TYPE x.
<char> = g_hex.
You can then concatenate it with the rest of your characters.
Now, to know if it'll be written correctly to the spool using sapscript, you'll have to test it.
Note that it will be displayed as # in a spool preview like SP01.