Editing Format Actions
Caution
For device types that use one of the drivers HPL2, POST, PRES, or SWIN for formatting lists, formatting does not take place in the actions but is executed by the drivers. You can edit the attributes of the formats so that you no longer have to enter control sequences in the individual actions. For information on this, see Editing Device Type Formats.
The following is a description of how you edit the actions of formats that do not use any of the list printer drivers:
Device Type Formats: You can use the X_65_80 (list output) and DINA4 (SAPscript
) device type formats as templates for your own device type formats. If you are adding a new format to an existing device type, then these device type formats can help you to identify the actions and commands that the new device type format should contain.
Which actions are required? Only the actions listed below are used by the SAP system. You can leave all other actions empty. They are reserved for future use.
Device Type Format Actions Used by SAP
Action |
Usage and Notes |
|---|---|
|
Inserted as the first element in the output data stream, before the printer initialization action. Use: Prints an identification sheet at the start of an output request.
End of the note. For more information, see Maintaining Title Pages for Output Requests. |
|
Sent at the start of an output request after the title page action (if any) has been sent to the printer. Use: Configures the printer as required by the format of an output request.
End of the note. |
|
Sent at the end of a print request. Use: Reset a printer to a particular state, such as a particular emulation.
End of the note. |
|
Sent at the end of every page of an output request. Use: Used in printing lists to generate a form feed (new page). See the table below for a summary of the requirements for the end-of-page and end-of-line actions. |
|
Sent at the end of each line in an output request. Use: Used for list output and for most SAPscript output to generate a new line (carriage return and line feed). See the table below for a summary of the requirements for the end-of-page and end-of-line actions. |
|
Sent at the start of every page of an output request. Only defined in POSTSCPT list formats. Not defined in standard SAP device formats; has therefore no effect on output. Inserted in the output stream by default so that you can use it if needed. |
|
Sent at the start of every text line of an output request. Only defined in POSTSCPT list formats. Not defined in standard SAP device formats; has therefore no effect on output. Inserted in the output stream by default so that you can use it if needed. |
End of Page, End of Line Actions: Required Definitions
Format Type |
End of Line Definition |
End of Page Definition |
|---|---|---|
X_* formats for list output |
\r\n |
\r\f |
SAPscript STN2 driver |
# (comment, null operation) |
# (comment, null operation) |
SAP |
\r\n |
# (comment, null operation) |
SAP |
\r\n |
# (comment, null operation) |
SAP |
\n |
# (comment, null operation) |
SWIN driver for Microsoft Windows printing |
\n |
\f |
Specifications for Line Spacing and Page Length for Line Printers: SAP standard Printer initialization actions
for line printers (printers that use the SAPscript
STN2 OTF driver) specify line spacing (lines per inch) and page length (lines per page).
These specifications do not select a particular paper size at the printer. Rather, they tell the printer where to insert a page break in the output.
The following table shows the line spacing and page lengths for the standard SAP formats.
Line Printer Specifications
Formatting |
Required values in the |
DINA3 |
Line spacing: 6 lines per inch (LPI) Page length: 140 lines Note: Not pre-defined for most device types. |
DINA4 |
Line spacing: 6 LPI Page Length: 70 lines |
DINA5 |
Line spacing: 6 LPI Page Length: 50 lines |
EXECUTIV |
Line spacing: 6 LPI Page Length: 72 lines |
LETTER |
Line spacing: 6 LPI Page Length: 66 lines |
LEGAL |
Line spacing: 6 LPI Page Length: 72 lines |
INCH4 |
Line spacing: 6 LPI Page Length: 25 lines |
INCH4C |
Line spacing: 6 LPI Page Length: 24 lines |
INCH6 |
Line spacing: 6 LPI Page Length: 36 lines |
INCH7 |
Line spacing: 6 LPI Page Length: 42 lines |
INCH8 |
Line spacing: 6 LPI Page Length: 48 lines |
INCH11 |
Line spacing: 6 LPI Page Length: 66 lines |
INCH12 |
Line spacing: 6 LPI Page Length: 72 lines |
LINE_21 |
Line spacing: 6 LPI Page Length: 21 lines |
LINE_22 |
Line spacing: 6 LPI Page Length: 22 lines |
If you are defining device type formats for a page printer (SAPscript drivers POST, PRES, and HPL2), then refer to the corresponding device type format in a similar device type for the line spacing and page length specifications required.
Action Printer Initialization Action
: Ensure that the escape sequences that you define match the page dimensions and orientation specified in the format and page format associated with a device type format.
Also, ensure that any character set specified in escape sequences matches the character set specified in the device-type definition. The character set must also be compatible with any implicit character set changes made at the printer by SAPscript font changes. The spool system cannot test to ensure that these specifications match. To test printing, see Testing Output Devices.
The action editor and special characters for printer initializations and print controls: The system uses the SAP programming editor for maintaining device escape sequences. In the editor, you can use the special characters shown in the table below to simplify entering escape sequences. The table below lists these special characters.
You can define cover sheets with various variable, such as $(BENUTZER) (user) and $(SPOOLID) (Spool number), (see Maintaining Cover Sheets for Output Requests).
Characters |
Meaning |
|---|---|
\e |
ESC (Escape). It has the hexadecimal value 1B and the decimal value 27. |
\0x |
Marks the following two characters as a hexadecimal number (one byte). Example: 0xF0 |
# |
Marks an entire line as a comment at the beginning of the line. The line is not sent to the output device. |
\n |
Line feed (hexadecimal 0A) |
\r |
Carriage return (hexadecimal 0D) |
\f |
Form feed (hexadecimal 0C) |
\s |
Space character (when required at the end of a line) (Hexadecimal 20) |
Note
Line breaks: Note that the line ends in the editor are not sent to the output device. To start a new line in the printer output stream, you must enter \n or \r\n in the device escape sequence.
Standard actions: If a format does not contain a definition for the title page (in the device type format), then the X_PAPER title page is printed as a default.
The spool system uses default actions if two other actions -- end of page or end of line -- are undefined. The default actions may result in printing of empty lines or pages in SAPscript
print requests that use the STND or STN2 drivers.
To prevent the spool system from using defaults for undefined actions, define each of these actions with at least one comment line in each device type format that you define. SAP has defined these actions in all standard SAPscript
formats.