SAP PRINT-CONTROL - Obsolete ABAP Statements

Get Example source ABAP code based on a different SAP table
  


Standard SAP Help for PRINT-CONTROL

PRINT-CONTROL - formats

Short Reference
• PRINT-CONTROL ABAP Statement
• FUNCTION PRINT-CONTROL (obsolete)
• LINE PRINT-CONTROL (obsolete)
• POSITION PRINT-CONTROL (obsolete)

ABAP Syntax(Obsolete)PRINT-CONTROL formats|{FUNCTION code}
[LINE line] [POSITION col].

What does it do? This obsolete variant of the statement PRINT-CONTROL formats areas of spool lists. This applies only to spool lists created using NEW-PAGE PRINT ON, SUBMIT TO SAP-SPOOL, and when selecting Execute and Print on the selection screen. It does not work for screen lists spooled from the display by selecting Print (function code 'PR').

This statement sets a print format starting from the row specified in line and the position specified in col for all subsequent output statements of the current page. The value in col refers to the position within the list buffer. If the additions LINE or POSITION are not specified, the current position of the list cursor (sy-linno, sy-colno ) is used. line and col expect data objects of type i are expected whose values are within the current page width or page length. If line or col contain invalid values, the statement is ignored.

The possible print formats formats are listed in the table below. The runtime environment converts these entries into printer-independent codes called print control. When a list is actually printed, the print control codes are translated into printer-specific control characters.
• CPI PRINT-CONTROL (obsolete)
• LPI PRINT-CONTROL (obsolete)
• COLOR BLACK PRINT-CONTROL (obsolete)
• COLOR RED PRINT-CONTROL (obsolete)
• COLOR BLUE PRINT-CONTROL (obsolete)
• COLOR GREEN PRINT-CONTROL (obsolete)
• COLOR YELLOW PRINT-CONTROL (obsolete)
• COLOR PINK PRINT-CONTROL (obsolete)
• FONT PRINT-CONTROL (obsolete)
• LEFT MARGIN PRINT-CONTROL (obsolete)
• SIZE PRINT-CONTROL (obsolete) formatsPrint ControlMeaning CPI cpiCIcpiCharacters per inch LPI lpiLIlpiLines per inch COLOR BLACKCO001Color black COLOR REDCO002Color red COLOR BLUECO003Color blue COLOR GREENCO004Color green COLOR YELLOWCO005Color yellow COLOR PINKCO006Color pink FONT fontFOfontFont LEFT MARGIN leftLMleftSpace from the left margin SIZE sizSIsizFont size

The conversion to device-specific control characters is made using the database tables TSP03 and T022D. If a particular option for a particular printer type (according to table TSP03) is not supported in the table T022D (no entry), this option is ignored in printing. For more information, see the documentation for the tables TSP03 and T022D.

There are more print control codes than print formats formats than can be specified in the statement PRINT-CONTROL. All print control codes can also be specified directly in code using the addition FUNCTION. code must be a flat character-like data object that contains a valid print control code. Invalid content is ignored. A list of valid print control codes and their assignment to printers is available in spool administration (transaction SPAD).

Latest notes:This variant of the statement PRINT-CONTROL for print formats is obsolete and is partially ignored. It is now better to use the many options offered by forms to format documents.
The statement PRINT-CONTROL should only be used for print formats that cannot also be set using the formatting options of the statements WRITE and FORMAT, or in the spool dialog.
The statement PRINT-CONTROL must be executed for every page to be formatted. If the additions LINE and POSITION are used, the source code position of the statement PRINT-CONTROL in relation to the output statements becomes irrelevant.
The print control codes are written to the spool list line at the specified position. A line is limited internally to 4092 characters. If an overflow occurs as a result of too many print control codes, surplus output text lines and print control codes are truncated without warning.

Return to menu