Q

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:

PRINT-CONTROL FUNCTION 'SBP03'. WRITE: 'BARCODEDATA' NO-GAPS. PRINT-CONTROL FUNCTION 'SPS03'.

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.

This was first published in August 2006

Dig deeper on SAPscript and Smart Forms

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

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.

0 comments

Oldest 

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:

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close