This website is not affiliated with, sponsored by, or approved by SAP AG.

SAPSCRIPT STX command in HEX to Zebra Printer

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

SAPSCRIPT STX command in HEX to Zebra Printer

Postby axxter » Mon May 13, 2013 9:50 am

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
axxter
 
Posts: 2
Joined: Mon May 13, 2013 9:37 am

Re: SAPSCRIPT STX command in HEX to Zebra Printer

Postby Sharpshooter » Mon May 13, 2013 11:34 am

Zebra have software to generate the form with the proper commands. It is called "Bar 1 for R/3". See OSS note 179534.

Dave
Good luck!
Sharpshooter
 
Posts: 1171
Joined: Wed Mar 17, 2010 12:01 pm
Location: In the dark

Re: SAPSCRIPT STX command in HEX to Zebra Printer

Postby axxter » Tue May 14, 2013 7:29 am

This tool does not provide a solution :(
axxter
 
Posts: 2
Joined: Mon May 13, 2013 9:37 am

Re: SAPSCRIPT STX command in HEX to Zebra Printer

Postby Gothmog » Tue May 14, 2013 8:21 am

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.
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1943
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home


Return to SAPscript/Smartforms

Who is online

Users browsing this forum: No registered users and 3 guests





This website is not affiliated with, sponsored by, or approved by SAP AG.