Ask the Expert

Strange ESC sequences within a SAPscript form

We are trying to print a barcode using ABAP with the SAPscript form. Coding looks fine, but the barcode comes out scrambled on paper. Looking into the PCL file on the print server, we can see the ESC sequence to start the barcode. But before the first character of the real barcode data we found some other strange ESC sequences that look like positioning commands. ABAP code looks like this:


Where do these "positioning commands" come from? We also see such positioning commands right in the middle of the text. It looks like a maximum of ten characters can be WRITTEN without any repositioning. Even the WRITE command sends 60 or more characters.

    Requires Free Membership to View

I have not encountered your specific situation before. Yet, there have been times where something creeps into a SAPscript form (e.g., a command or a strange set of characters) and I am not quite sure how it got there.

My preferred troubleshooting approach -- which I would recommend here -- is to use the SAPscript debugger. It allows stepping through or tracing the form flow, and thus provides an excellent way to flush out the underlying problem. To switch on the debugger from the initial SAPscript screen, click on utilities --> activate debugger. Note that you will need to produce your form in the foreground to step through or trace it. It is not necessary to send it to a physical printer as a print preview should suffice.

This was first published in August 2006

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: