Register Login

SAPscript print problems (standard page formats)

Updated May 18, 2018

Printing in applications (check printing, money transfers, and so on) on continuous forms is incorrect, the page feed does not function correctly, no title page is printed, line feeds and page fields are doubled and so on. In the associated SAPscript forms in the application, a user-defined page format is used, for example, ZINCH5.

The page length, printer character set and all other initialization settings for the printer are configured in the format types. A format type must be supplied with appropriate control sequences for each printer type used.
When printing from SAPscript (printing from applications, checks etc.) the R/3 spool uses the format type of the device type corresponding to that specified in the application layout set page format (=SAPscript layout set, for example, check) to control the printer.

Example: Page format INCH4 is used in layout set UEBERW. The spool administration entry for this page contains only the height and width of the page format. To make sure the printer used (for example, HP256X) sets the page length correctly, a format INCH4 must exist (or be created) in the spool administration under "Device type formats". This format should set the page length to the required value (in the case of bank transfer forms, this is 4 1/6 inches or 25 lines each 1/6 inch). Now, when the form is printed, the spooler sends the control sequences defined for device type HP256X in format INCH4 to the printer.

Important note: when making modifications, do NOT change the SAP original printer types. Instead, use menu Utilities -> Copy device type from Transaction SPAD to copy the device type to a name starting with Z... You can then change this new device type. 

The following page formats are currently supported in the standard device types supplied by SAP - that is, the following format types with the same names as their corresponding page formats are defined:
DINA4, EXECUTIVE, LEGAL, LETTER,
DINA3 (as of  3.0F, for device types HPLJ4, POSTSCPT KYOFS150,
      SAPWIN, SWIN, HPLJ4000, POST2, KYOFS170)) no SAP title page!
DINA5, (as of 3.1H) no SAP title page!
INCH12                        no SAP title page!
INCH11                        no SAP title page!
INCH8  (as of 3.0)    no SAP title page!
INCH7  (as of  3.0D)   no SAP title page!
INCH6                        no SAP title page!
INCH5  (as of  4.5A)   no SAP title page!
INCH4                        no SAP title page!
INCH4C                        no SAP title page!
INCH2  (as of  4.5A)   no SAP title page!
LINE_21                      no SAP title page!
LINE_22                      no SAP title page!
MX-IMSS1 (as of  4.5A) no SAP title page!
MX-SHCP  (as of  4.5A) no SAP title page!

Note:
In  4.0A when you print with page format DINA4 the page length is changed in the case of all device types for line printers (continuous form) from 12 inches (72 lines, a little larger than DIN A4) to the actual DIN A4 size (that is, 70 lines at 6 lines per inch). In this way "real" DIN A4 continuous form can be printed using these devices without change being necessary.
Note:
The width of the INCHxx page formats is increased in 4.6A from 12 to 14 inches because several customers are using very wide forms with font COURIER 12 point (10 characters per inch) on line printers. With a page width of 12 inches, only a maximum of 120 columns can be placed in one line with this font. As a result of this change, it is possible to define form windows correspondingly larger with the standard format INCHxx, so that 140 column can be printed without a page break.

Solution

1. Determine which R/3 device type is used to print the faulty forms. In Transaction SPAD ("Spool administration"), all output devices and the associated device types are listed under "Output devices". In the following example, this is device type HP256X, in the form the page format ZINCH3 is used.

2. Use

3. Use SPAD to determine whether the desired format (for example, ZINCH4) already exists for the device type used:
2.x/3.x: Under "Device type formats" the formats for every device type can be maintained/displayed.
 4.x: In SPAD you can go to the list of the existing format types for this device type directly from the maintenance screen of a device type.
If the format already exists, proceed with 5., otherwise with 4.

4. Since you must now create a new format for the device type, you must copy the SAP standard device type (for example HP256X) to a customer-specific defininition (for example ZHP256X) . Now you must create the desired format (for example ZINCH3) for the customer-specific device type (for example ZHP256X) under "Device type formats". You can do this by copying the format DINA4 to ZINCH3. Save the new format!

5. Design/suppression of the title page:
When spool requests are generated, the "title page" attribute controls whether the data contained in the title page action (TITLE action for short) is sent to the printer at the beginning of the print request.

There are three ways of designing the title page:
a) If you never want to use title pages, only one comment line (line starting with the character #) is entered in the TITLE action. Everything else there is deleted.
b) If you want to output the title page defined in X_PAPER, the TITLE action must be empty: delete all lines there. Note that the title page of X_PAPER is normally output with a width of 12 inches (on line printers); as a result, the current editing type should also have a page width of 12 inches.
c) If the format is to have an individual title page, copy the TITLE action from X_PAPER and make any necessary changes (for example, changing the page width <> 12 inches)

Note on definition notation:
  "Backslash"-e means Escape (that is, Hex $1B),
  "Backslash"-n means NEW LINE
  "Backslash"-r means CARRIAGE RETURN
  "Backslash"-f means FORM FEED
  "Backslash"-0x1F means hex number "1F", this sequence allows any
                  number of bytes to be entered.
  A "#" in the first column denotes a comment line.

6. Configure the correct page length for the continuous paper using one or more printer-specific escape sequences in the title action OR, if it was previously empty, and now contains only one comment line, configure in the initialization action (INIT). The page length settings in the INIT action for DINA4 can be used as the default setting for these control commands. All settings there are normally marked with a comment. Your printer manual will tell you how the control sequences should look.

Note on configuring the page length:
For most printers, the page length is set up in "Number of lines". However, the line spacing must first have been set to a defined value, namely 6 lines per inch. Correct page length configuration consists of two control sequences:
a) "Set line spacing to 6 lines per inch (or 1/6 inch)
b) "Set page length to 25 lines". This produces a page length of 4 1/6 inch as, for example, required for a money transfer form (page format and definition INCH4).
For other printers, you can specify the page length directly in inches. A correct page length configuration then consists of one control sequence:
a) "Set page length to 12 Inch." This produces a page length as used for endless check forms (page format and definition INCH12).
All other control sequences taken from the DINA4 settings--not linked to the page length--should NOT be changed!

 


×