Show TOC

 Adapting the Label Layout

Prerequisites

SAPscript currently does not support a printer driver for special label printers. Most of the label printers available on the market today have their own special control languages that are not supported by the printer drivers available in the SAP standard system. However, you can call up such label printers through SAPscript if certain prerequisites are fulfilled. The method used here is described below and followed by concrete examples:

Note Note

You will find more information in SAPNet under the following notes:

0008928 List of supported printers / device types

0043423 Modification of a device type for label printing

0136846 Label printing using Avery Dennison TTX 450

0137069 Label printing with UBI EasyCoder 501 XP

0137372 Label printing with Printronix T3204

0137431 Label printing with CAB Apollo 2

0137614 Label printing with TEC B-572-QP

End of the note.

Process Flow

Application programs that use SAPscript normally use SAPscript (form definition) to control the layout of the print output and to replace variables in the form with current field values from the print program. Since there are currently no printer drivers for label printing, the layout for such labels cannot be controlled through SAPscript, but variable replacement can. The way to achieve full label printing on these special printers using an external label design program and SAPscript is described below:

  1. Label design with a PC program

    You use an external PC program (Windows design program) to create the label for the required printer. The complete layout of the label and the required fields that the SAP system later fills with data are defined using this program.

  2. Downloading the print data

    The design program must allow the download of the print file that is normally sent to the printer. This file contains the printer commands used for printing the label on the special printer. Only the current variable values need to be replaced later on.

  3. Uploading the print file into a SAPscript form

    The print file that was just created is uploaded into a SAPscript form. For this purpose, the system uses the upload function available in the SAPscript editor, uploads the file, for example, into the standard text editor (Transaction SO10), and then copies the file using the standard text copy functions into the MAIN window of the SAPscript form to be used. The format of the file to be uploaded must be "ASCII", that is, it can only contain printable characters as well as carriage return, linefeed, and possibly also form feed. In addition, the file must not contain more than 80 characters per line, since otherwise inappropriate new lines will be created during the upload.

    Note Note

    If the print file contains additional binary control characters (for example, ESCAPE, 0x1B), you cannot use the method described here.

    End of the note.
  4. Inserting SAPscript variables into the print file

    You must now enter variables of the print program (program symbols) in the SAPscript form in those places where variable data is to appear in the label. These variables are supplied at runtime with the current field values from the application program.

  5. Adapting the form

    With most label printers, the SAPscript form must also be adapted, that is, the MAIN window must be enlarged to the complete page size and all other windows must be deleted. Also, the MAIN window should, in most cases, only contain a single text element, namely the text just uploaded with the printer commands. To reduce new line breaks to a minimum, you can set the script type in the form header to COURIER 6 point.

  6. Creating/uploading a suitable device type

    As a rule, you must use a special device type (a variant of the device type ASCIIPRI) to ensure that the form will be printed correctly on a label printer. For the examples explained below, SAP will provide these device types and will also deliver them in the SAP standard system. To test the procedure with other label printers, you can normally use the device type ASCIIPRI.

  7. Definition of an output device

    As a last step, you must call up transaction SPAD to set up an output device (printer) in the SAP system to which the special device type or ASCIIPRI is assigned. The application program must now use this output device to print out the labels. The label printer itself is connected up to the SAP system using one of the standard available connection types in the SAP system (local print to application server / remote print via Ipd server / remote print via Windows PC and SAPIpd/Frontend print).

    Note Note

    The following notes in SAPNet describe in detail the procedure for the printer model given in each case. This procedure can probably be executed in the same way for other, similar label printers of the same manufacturer; this depends only on the support given by the PC design program for the required printer.

    136846 Avery TTX 450

    137431 CAB Apollo 2

    137069 UBI Easycoder 501 XP

    137372 Printronix T 3204

    137614 TEC B-572-QP

    End of the note.