3

I am trying to print from SAP Smart Forms to an AUI BP9000 printer (Epson Emulation). As a test, we send an Epson barcode command to the printer:

[ESC][SI]123456789[ESC][SO] 

The barcode (Code 39) prints fine if we send this string straight to the printer. The issue comes in when we try to print from Smart Forms. In Smart Forms, we "drag and drop" a barcode onto the form but when we try to print, the barcode doesn't print because of how the printer interprets the barcode sent from Smart Forms.

What I want to find out is if it is possible to create a "Hex Container" in Smart Forms so that when the form is printed, the printer sees the ESC command and prints the barcode.

Example:

Smart Form:

[HexContainer for ESC SI][barcode information][HexContainer for ESC SO]

What the printer sees:

[ESC SI]123456789[ESCP SO]
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • 3
    typically you would create (if it doesn't exist already) a new device type in SAP that contains the appropriate control commands for the device capabilities. In your smartform you would then use a smartform style with a barcode format (for instance a Code39 barcode) to print the barcode, no printer specific commands in the smart form itself. That way, if you ever switch from epson to some other printer type, you won't have to touch your smart form. – Dirk Trilsbeek Feb 21 '18 at 09:41

1 Answers1

2

This can be achieved by including your hex code in a SAPscript text with HEX...ENDHEX and then include this SAPscript text in your smart form. But as pointed out by @Dirk, then the smart form won't be portable to other printer models, and so you should better opt to a "print control" at the device type level, and invoke it from the smart form (node of type command).

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48