Determining the Print Format
To determine the print format, use the PRINT-CONTROL statement:
Syntax
PRINT-CONTROL formats [LINE lin] [POSITION col].
Without the options LINE and POSITION , this statement sets the print format specified in formats for all characters that are printed starting from the current output position (system fields sy-colno and sy-linno ). The LINE addition sets the print format to start from line lin . The POSITION addition sets the print format to start from column pos .
In formats , you can specify several different print formats. The system converts the values into a printer-independent code, the so-called print-control code. When printing, the system translates the print-control code to printer-specific control characters of the selected printer.
The table below lists the valid formats additions and the corresponding print-control codes:
|
formats |
Code |
Meaning |
|
CPI cpi |
CIcpi |
Characters per inch |
|
LPI lpi |
LIlpi |
Lines per inch |
|
COLOR BLACK |
CO001 |
Color black |
|
COLOR RED |
CO002 |
Color red |
|
COLOR BLUE |
CO003 |
Color blue |
|
COLOR GREEN |
CO004 |
Color green |
|
COLOR YELLOW |
CO005 |
Color yellow |
|
COLOR PINK |
CO006 |
Color pink |
|
LEFT MARGIN lfm |
LMlfm |
Space from the left margin |
|
FONT fnt |
FOfnt |
Font style |
|
FUNCTION code |
code |
For directly specifying a code |
There are many more print-control codes than formats additions. Therefore, you can specify any print-control code directly using the FUNCTION addition.
To find the codes supported by a certain printer, choose . This takes you to the screen Spool Administration (transaction SPAD).
Choose the individual components to receive the following information:
|
Selection |
Information |
|
Output devices |
List of the installed printers, including the device types |
|
Device types |
a description of the device types |
|
Standard print control |
List of the print-control codes |
|
Print control for device type |
Assignment of printer-specific control characters to the print-control codes for each device type |
|
Page formats |
a list of page formats |
|
Paper types |
List of valid formats |
|
Device initialization |
Assignment of formats for each device type |
Display Print control for Device Type to find the print-control codes available for the printer you want to use. From the displayed list, select the desired device type.
Here you can see whether printer-specific control characters are maintained for a print-control code. Choose Info to display additional information for the individual codes in a dialog window.
For more detailed information about spool administration, refer to the SAP Printing Guide (BC-CCM-CRM) .

