Problem solve Get help with specific problems with your technologies, process and projects.

Strange ESC sequences within a SAPscript form

When trying to print a barcode, this user is getting positioning commands within his ESC sequence causing a scrambled print.

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.

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.

Dig Deeper on SAP selection and implementation

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.