SAP - Smart Forms Guide
SAP - Smart Forms Guide
18
Introduction SAP
Trade marks
All the specified brands and trademarks represent registered brands or trademarks of their owners. They may
not be specifically identified. The lack of identification permits to a conclusion as to that it does not involve a
registered brand or trademark.
Carl Valentin is a Silver Member of the SAP Printer Vendor Program and under this program renders support for
machine types as provided and the ABAP-PDL driver.
This documentation is an integral part of this support.
E-mail [email protected]
Internet www.carl-valentin.de
SAP Index
Index
Index ..................................................................................................................................................................... 3
1 Introduction ....................................................................................................................................................... 4
1.1 Notes............................................................................................................................................................... 4
1.2 SAP – First steps .............................................................................................................................................. 4
1.3 Restrictions ..................................................................................................................................................... 4
1.4 Basic considerations prior to logging onto PVD .............................................................................................. 5
1.5 Building or opening the form ......................................................................................................................... 7
2 Defining fonts to be used................................................................................................................................ 10
2.1 Style Editor................................................................................................................................................... 10
3 Building Forms ................................................................................................................................................ 12
3.1 Smart Forms Editor ...................................................................................................................................... 12
3.2 Form testing ................................................................................................................................................. 16
4 Adaptions in the Form .................................................................................................................................... 21
4.1 Large fonts ................................................................................................................................................... 21
4.2 Font sizes - Zoom factor ............................................................................................................................... 21
4.3 Other TrueType fonts .................................................................................................................................. 21
4.4 Asian font types ........................................................................................................................................... 21
5 Frame and Lines .............................................................................................................................................. 22
6 Barcodes ......................................................................................................................................................... 25
6.1 Height of the barcodes ................................................................................................................................ 25
6.2 Ratio barcodes ............................................................................................................................................. 26
6.3 Positioning .................................................................................................................................................... 26
6.4 Human readable line .................................................................................................................................... 28
6.5 2D Barcodes .................................................................................................................................................. 28
6.6 Defining a new barcode ................................................................................................................................ 29
6.7 Size of barcodes ............................................................................................................................................ 30
6.8 More Barcodes............................................................................................................................................. 30
7 Graphic – Logos and Bitmaps.......................................................................................................................... 31
7.1 Insert graphic ............................................................................................................................................... 31
7.2 Uploading new graphics .............................................................................................................................. 32
7.3 Renderer ...................................................................................................................................................... 35
8 Binary Colour Print .......................................................................................................................................... 37
8.1 Colour text ................................................................................................................................................... 37
8.2 Colour separation with graphics .................................................................................................................. 38
9 Using printer commands ................................................................................................................................ 39
10 Securing Form ............................................................................................................................................... 40
11 Supported Font Types ................................................................................................................................... 43
11.1 TrueType fonts – Unknown font types ....................................................................................................... 44
12 Creating New Form Sizes .............................................................................................................................. 44
12.1 Adding form size ......................................................................................................................................... 45
12.2 Creating new form size ............................................................................................................................... 47
13 Conversions – Units ...................................................................................................................................... 48
Introduction
1.1 Notes
There are various note numbers e.g. (SAP note 1280910) in the following descriptions.
These note numbers can be used in the SAP system to display internal documentation. In the following link,
Number is to be replaced by the number of the note.
https://launchpad.support.sap.com/#/notes/Number
1.3 Restrictions
The Carl Valentin ABAP-PDL driver does not support the following features:
4 Building a new form 05.18
SAP Introduction
The language must be selected when logging on, e.g. EN for English and DE for German.
On opening or building a form, the language with which work is normally undertaken should be
selected. After all, it may not be possible under certain circumstances to print a form under DE if built in EN
since no text information is available. The form would remain blank.
Although the original language is displayed on the form and is to be translated into all or selected languages,
this does not work in practice. The content of the other language is either blank or is being printed in the
original language.
The name of an existing form to be opened can be entered here and opened with Display.
On the other hand, if a new form is to be built, then continue with Create.
To be able to specify the above particulars, one or two preparatory steps are to be undertaken in other
transactions.
Given that a completely new form size is to be created, make use of the notes further down in the Create new
form sizes.
It is easy to select an existing form size. To this end, click into the corresponding input box and then in the
output box behind it.
A text can be directly entered in most of the input boxes. In many cases an extra button appears behind
It makes a difference as to whether A5 or DINA5 is used. You obtain a printed error notification if the
format is not present in the device type.
NOTE!
Barcodes are defined under Standard settings and type fonts under Font.
For each font size etc. a code of its own is to be created.
NOTE!
Only those barcodes and font types supported by the respective driver are to be selected.
The style must be activated after all the changes have been carried out.
3 Building Forms
The size can be adapted with the mouse (moving) or by entering the required value to 14.8 x 21.0 cm with DIN
A5:
To create another window (object), select Create – Window in the context menu of the main window.
Precision positioning is done in the Output options as this is difficult in the Editor (Form Painter). This allows the
size and position of the new window to be adapted and moved here.
The window content is defined next. A new text is created, for instance, with the context menu:
The appropriate codes defined beforehand in the Style need to be used for a formatted text. Undertake the
following entry should, for instance, the AL code for Helvetica have been used in the Style Editor:
<AL>… Text…</>
Ensure that the correct (previously generated) style is selected for the form attributes.
The content of the individual boxes can unfortunately not be seen in the Editor (Form Painter).
All windows and contents are to be positioned and defined in this way.
This can now be done if the new form has not been saved yet (Local Object):
With the form generated, one then proceeds with Test/Execute F8:
In the event of an error, the next display might, for instance, indicate the following error message:
In the event of an error, one must return to the Form Editor via the green button.
There are two cases of error. The first one (probably marked red) involves debugging in the Editor.
In the second one, as already shown, it is sufficient to go one step back and return to Test/Execute.
In the following dialog an Output device (Printer) is to be selected (begins with Y or Z).
The Print now option is also to be highlighted.
Afterwards either printing is done or a print preview is displayed.
It may take a few seconds before the next print dialog is displayed.
The standard printer set up on the local PC is displayed in the print dialog.
A generic text drive should be used to obtain a prn file. 0therwise, the correct printer can be used for direct
printing.
On the Windows PC the generated prn file can be sent to the printer.
A text can also be framed, for instance, inside a window. For the definition, the text is opened with a double
click and the tick marked at Lines With in the Output options. The resulting frame hight depends on the text
height.
The best thing is to click on the Details button if a certain spacing is required between the lines and the object.
The spacing can be individually adjusted here. If the box is 7 x 2 cm and with 0.2 cm distance each (bottom (0.1
cm), the box frame is 7.4 x 2.3 cm.
However, if only one line is drawn, then spacing to the lower line needs to be correspondingly raised.
6 Barcodes
A distinction is to be made between new (yellow) and old (light blue) technology (SAP Note 645158) and
between 1D and 2D barcodes. Only with new technology barcodes the preview works to a certain degree. The
old technology only displays wildcard characters
The available barcodes can be displayed with transaction /o SE73. This entails highlighting the System Barcodes
in the start dialog and afterwards clicking on Display.
Unclear details
If barcode C128A is to be used, a character format - in this example C8 - must be assigned to it in the Style
Editor:
The fatal aspect here is that now both presentations display incorrect values. Yellow highlighted:
h=0.5 in, thus a height of 0.5 inch and thus 12.7 mm. On the other hand, H00150 is in the white area. This
signifies height 150 1/600 inch, thus 6.35 mm. The third non-sensical value is within the style at Height 20 mm.
The result of bringing about compatibility with the SAP test print-outs (SAP Note 1280910) is the need to use
H00150 which is correct. This is to be taken in account in positioning and defining new barcode types. As such,
the details in the style are clearly false.
6.3 Positioning
The barcode lower edge conforms with the upper edge of the window. The apparent assumption of the SAP
Designer is that a normal text is involved.
If the barcode is to go up to the upper edge of the label, then its window needs to be set correspondingly
lower. A window height of e.g. 0.5 cm is adequate in this case.
If a frame is to be used around the barcode, this must be set in the box or the hight of the barcode must be
considered. With an EAN13, with height 13 mm, the upper frame must have 15 mm distance (2 mm distance to
the upper edge).
As a result, the Print view tallies to the greatest possible extent with the printout.
Printout
6.5 2D Barcodes
In contrast to 1D barcodes, the window height must at least fit - otherwise there is no printout.
The lower edge of the barcode is located approximately in the centre of the window. This means the
positioning in the Editor needs to be correspondingly moved down. Thus, the preview and the printout
approximately match.
PDF417
NOTE!
Used for the size of the PDF417 are the parameters of Narrow Module Width for the symbol size and
the ratio of Narrow Module Width to Single Row Height for the ratio of width to height. Linear
Height is not used; instead a max. 2 cm window height is assumed in SAP.
NOTE!
The presentation in the print preview is based on an unknown ZPL emulation within the SAP which
permits no inferences to be drawn as to the adjustable values. Hence, the printout will practically
never be identical.
Normally 00 is in # of Columns and Rows, signifying Set automatically for the driver. This means calculating all
values based on the text length. A value which is higher than the calculated one for SecurityLevel is taken on.
Normally the SecurityLevel is also based on the text length.
The # of Columns parameter allows the number of the data columns to be raised. The # of Rows parameter
should remain at 0 unless the matching value is known It is exactly the same vice versa. The height of the
barcode can be determined with the # of Rows parameter. # of Columns should remain at 0 if it is changed.
NOTE!
All values of the barcode cam also be specified with the printer command.
6.6 Defining a new barcode
If there are not enough barcodes on hand, a new barcode can be designed. Select Modify on the start page.
From the general list, click F5 Create.
One needs to know from the details which units are postulated and what the values means
Narrow Module Width Narrowest unit of the barcode Value (+ 1) in 1/600 inch
Bar Ratio Ratio 20, 25, 30 produces e.g. 2:1, 5:2, 3:1
The smallest unit is the Narrow Module Width. A 6/600 inch value produces 2 pixels for a 300 DPI printer The
driver would calculate a 9:3 ratio. This means 3 pixels for the thin unit and thus at a 3.0:1 ratio 9 pixels for the
width unit of the barcode.
1/600 inch and thus 6.35 mm would arise as the height.
In order to clearly define a ratio barcode such as Code 39 or Code 2/5 Interleaved, as, for instance, 5:2, the two
values can be specified via BC_THICK (5) and BC_THIN (2).
A double click on the new GRAPHIC1 entry opens the General Attributes:
In the search dialog, masking can be set or one can go directly to Execute F8:
Quality and resolution determine whether an image is shown in a larger manner on the form. The
reason for this difference is to be found in colour information size (bits per pixel).
Whilst the monitor only has 96 DPI, the printer has 300 DPI. This means that in contrast to the printout,
presentation on the display screen can, for instance, be three times as large. To avoid this, the printer
resolution can be specified at the General Attributes of the image.
However, bear in mind here that the image only matches one printer type in the case of printers with different
resolutions. No statement on the quality of the image can then come from the preview image.
A double click on BMAP opens an input box on the right-hand side, in which the graphic name is entered. The
graphic file can be selected with the Import F5 button.
The SAP system does not recognize a color image, this is to be specified.
In the selection dialog the file name, under Network select Client\ and change on the local PC to the pictures.
Click on Permit in the following query to enable the SAP system to access the local PC.
Given there is no data interchange when the client is selected from the dialog, the file explorer can be used to
firstly upload the file onto the SAP system. The file to be installed can, for instance, be stored in its own
document folder on the SAP system:
Bear in mind with the pictures that the higher the quality of the graphic, the higher is the grade of the
printing result. A high-grade black/white picture (1 bit per pixel) may possibly have a better print
quality than the renderer integrated in the driver.
7.3 Renderer
The renderer determines the way in which colour and grey tone images are converted into black/white photos.
In this way, the quality, for instance, of logos and other graphics can be influenced.
The following renderers are supported at the moment:
1, 2, and 3 various Dithering processes
4 Black/white
The renderer can be switched over with the RENDERER printer command and applies to all the graphics on the
form.
The Using printer commands section shows how this command can be used. One of the abovementioned
numbers is to be used as the attribute value.
COLOR_TOL is for setting the tolerance. This value determines a tolerance with which comparable colours are
assigned to the colour range.
The RGB_VALUE command is for using an alternative colour value. This value is to be specified in the Hex
format. Each colour value must have 2 points and therefore a total of 6.
An RGB value can, for instance, be easily taken from a character program:
Ensure here that the attribute name is written correctly and that the attribute value is specified in ‘inverted
commas‘.
* Given that a Device type -I (ISO 8859-1) is used as the basis and the code page has been changed over to 4110
(UTF-8), then the editing of Asian characters can be activated with this attribute name (font package needed).
10 Securing Form
A form can be downloaded from the SAP system and uploaded to it.
For this purpose, in the Smart Forms dialog, firstly select the form and then under Utilities select the Download
Form command:
A double click on the entry wanted opens the overview with the fonts which are available.
This one and all the other unknown font types are re-directed to the Swiss Light Printer Font 5.
By way of the Full administration button (text) you can have the Device Types displayed.
The device type (e.g. YCVP-DUO) is selected from the list which is shown afterwards and its attributes
displayed.
Clicking the Preparations (F6) button gets you the current list of form sizes available in the device type.
Although forms which are wider than the print head width can be used, they are automatically width-
limited by the driver. Therefore, the content should be limited to the print head width.
To add a new form, you firstly need to change over the list to Change
The form to be supported as a new one is selected from the following list:
Here you can either copy and change existing forms or create new ones.
As described in the section above, the newly created form can subsequently be added to the printer type.
Conversions – Units
13 Conversions – Units
Different units are used in dialogues and definitions - for instance, for barcodes. It is advisable to know what
the values mean in determining the printed height or width of the narrowest element of a barcode.
DPI Dots per Inch, that is the number of pixels per 25.4 mm
x TWIP x * 1764 / 10 mm or x *
1764 / 1000 1/100 mm
Thus a height of 180 1/600 inch with a barcode signifies 7.614 mm.