18.1.11

SAP Note 17895 - Adapting print list formats for customers

Symptom:

The customer wants to change one or more of the SAP standard ABAP list formats (X_PAPER, X_65_80, X_65_132, X_44_120, X_58_170, X_65_255) for a certain device type, or add new formats, because he/she does not like the font or line spacing, for example.

Other terms

Format type, list print, device type

Reason and Prerequisites

Customer would like information on how to implement such a change.

Solution
Important:The following description does not apply to most newer PCL-5 and PostScript device types, because they use the so-called list printer driver. The first device types with list printer drivers were HPLJ4000, HPLJ8000, POST2, KYOFS170.
If a device type uses a list printer driver, the layout of the list (page orientation and margins) is not controlled in the device type itself. Rather, it is controlled by format attributes (e.g. X_65_80). Please read the corresponding description in the spooler online documentation as of release 4.5A.

Implementing the change requires several steps:

1) Copy the standard device type (e.g. HPDJ500) to a customer-specific device type whose name must start with Z... (e.g. ZHPDJ500). To do this, call the spool administration transaction (SPAD) and select menu item "Utilities -> Copy device type" or in later maintenance levels use menu "Tools -> Device types -> Copy device type". See also Note 3166. You then make the changes to the Z... copy of the original device type.

2) In the definition of the printer used (e.g. LP01), you must replace the old device type (e.g. SNI9014) with the copy (e.g. ZSNI9014). Transaction SPAD is also used for this, select "Output devices".

3) Decide whether you want to modify an existing format (e.g. X_65_132) or define a new, customer-specific format. A new format is required when the modification affects the maximum number of lines/columns.
If you change an existing format, it does not have to be renamed: it belongs to the device type and is therefore recognized as user-defined. In this case, continue from point 5. If you create a new format, you can choose between 'create' (creates an entirely new, empty format) or 'create with template', to take over existing definitions from other formats.
The following applies for Release 3.x:
User-defined formats must be named Y_ZZ_SS or Z_ZZ_SS, where ZZ represents the maximum number of lines and SS represents the maximum number of columns.
For example: you define a new format called Y_60_90, which can print a maximum of 90 characters per line and 60 lines per page. The new format is entered in SPAD, function "Types of formats". In the "Page format" field, enter value ANY and check off fields P and L.
The following applies from Release 4.X:
User-defined formates must begin with Y or Z. The new format is entered in the SPAD, full administation, tab page: device types, button: format types.
As category enter: format for ABAP lists; enter ANY as the page format and specify the number of rows and columns. The list driver flag remains empty, unless you are using one of the newer device types with
the new list driver (see above).

4) Create a new format for the device type.
In the function "Formats for device type" in SPAD, enter the copied device type (e.g. ZSNI9014), the new format (e.g. Y_60_90) and press execute.
The list of actions (initialization, reset, title page, etc.) is displayed.
(From Release 4.x: in the SPAD, full administration, select the tab page device types, and then the device type button. Select the new device type in change mode and press the button: Formats. Then choose: create and select the new format).
If the new format type was created empty (under point 3), all actions are still empty. In this case you have three options:
a.) Create all actions manually or
b.) Take over individual actions from other formats or
c.) Copy an existing standard format to the new one. For example: The new format Y_60_90 for device type ZSNI9014 is empty; X_PAPER is copied onto it as a template from device type ZSNI9014 or another device type.

5) Modify the action "Printer intialization" for the format of the copied device type. Transaction SPAD, select "Format for device type", enter the device type Z... and the format. Now edit the action "Printer intitialization".
(From Release 4.x: In SPAD, full administration, select the device type
tab page, and then the device type button. Select
change mode and press the button:
Formats. Then select the new format.

Comments on the notation in the editor:
- Lines which begin with # are comment lines. Every printer command is usually explained by a preceeding comment line.
\e stands for the ESCAPE character (=Hex $1B)
\n stands for the NEWLINE character (=Hex $0A)
\r stands for the CARRIAGE RETURN character (=Hex $0D)
\f stands for the FORMFEED character (=Hex $0C)
\s stands for the SPACE character (=Hex $20)
\0xYY stands for a single byte with hexadecimal value YY, e.g. \0xF0 stands for Hex $F0.
The following commands are used for almost every printer type:
- Reset

- Setting for the character set used

- Page length, form length in lines or inches (<- you can modify this to get a smaller/larger page length for line printers with endless form feed).

- Perforation skip mode off

- Setting of line spacing (lines per inch, LPI) (<- you can modify this to get a larger/smaller line spacing)

- Font and pitch commands (<- you can modify this to get a smaller/ larger pitch or use a different font)

6) Once you have modified one or more print commands and saved your changes and the format, test the changes by printing an appropriate list on the new Z... device type.

Notes on specific device types/printer models:
When modifying or creating a print list format for PCL-5 printers (e.g: HPLJIIID, HPLJ4, HPLJ5SI), please note the following:
The print controls COLxx, that simulate the list colors font change (normal->bold, bold->normal), use PCL-5 macro definitions. These macros are defined in the initialization action of the X_... format types. Here, the font is changed and the HMI (horizontal character spacing, that is, pitch) is changed. If the pitch of a format is changed or reset, all macros that are defined there must also be changed.
The border characters (SAP characters 460-470) for printing lines and borders in print lists also use PCL-5 macros. The macro calls can be found in the printer character set definition, characters 460 to 470. The macro definitions can also be found in the action Initialization, generally at the end. Here, the HMI is again set, after a successful font change, to that of the list format (e.g. X_65_132). The HMI values contained here must then also be adjusted accordingly.

No comments:

Post a Comment