Wednesday 19 February 2014

SAP-Printer and page formats in SAP

Printer and page formats in SAP

Whenever print is given in sap it refers to the below sequence before converting the data in SAP to

                                                    Output Device (ex:-Local)
                                                               |
                                                               |
                                                              V
                                                   Device Type (ex: SWIN) Drivers (ex: SWIN)
                                                               |
                                                               |
                                                              V
                                                   Format Type (ex: X_65_132)
                                                               |
                                                               |
                                                              V
                                                       Page Format (ex: X_65_132)

The output device will refer to the attached device type for font conversion with the mentioned
page format & Format type during the print page. Based on the print type, whether it is ABAP list
output or a SAPSCRIPT form, the available formats will be displayed while giving print page.

Output Device :-

In the SAP system, output devices are the logical representations of the real output devices.

A target device must be specified for the output for every document to be printed in the SAP system.
As the document can be output using not only printers, but also archiving devices, these devices are
called Output Devices in the SAP system.

You must create a device definition in the SAP system for every output device. This definition
contains all the important data for addressing the device; otherwise the device cannot be correctly
addressed.

This data includes, for example:

● Device type, such as POSTSCPT or HPLJ4
● Name of the spool server (= application server with a spool work process)
● Host spool access method (such as local or remote)
● Destination host (for remote access methods)

Device Type:-

The device type indicates the type of printer to be addressed. When you define an output device,
choose the name of the device type that was defined in the SAP System for your printer model, such
as Post2 for a PostScript printer. In the case of frontend printing under Microsoft Windows, you can
also use the generic (device-independent) device type SWIN.

The system uses the information in the device type to convert a document from the internal SAP
character representation (spool request in OTF or in text format) to a device-specific, print-ready
data stream (output request). Since a device type specifies attributes that apply to all devices of a
certain model, it can be shared among device definitions. For example, all devices in the SAP spool
system that are compatible with Hewlett-Packard LaserJet IIID printers would use the HPLJIIID device type.

A device type uses the print driver attached to it for conversion to print language.

Print Controls:-

Print controls are generic format indicators for print operations, such as for activating bold, changing
the font size and so on. During formatting, the generic indicators are replaced by the printer
commands required by the specific device type. The print controls, together with the Device Type
Formats, make up the language for the R/3 formatting of an available printer or other output device.
To be able to use a new print control in a document, either the task of the print control must be
programmed in an ABAP report or ABAP program, or the print control must be added to SAPscript
documents. A print control can be either added directly to SAPscript or to the definition of an
SAPscript form.

Format Type:-

A device type must have a format to match every page format that is used in a SAPscript form or
ABAP list.

A format type will have the control to specify the landscape or portrait orientation for SAPscript and
rows/columns for ABAP list.

Page Format:-

Page format is a simple setting of page size, where you need to define the orientation, width &
Height for the respective output.


Steps to create a New Page format and attach the same to an output device:-

Goto SPAD T-code with full administration mode.

Click on Device Types tab and click display page formats






Click the change button


And click create button to create new page format


Provide the new page format name, orientation type, width, height and unit.


Here in the example the size of A4 is defined.
Next click save, the system will ask for the package to save, provide the relevant Z package and save.



Once Page format is created, Goto display Format types and create new format type




                              




 Create the Format type with type SAPscript for forms.


Then provide the page format we have created and provide the orientation.

Below is a screen shot shows how to create format type for ABAP list where you need to provide rows and columns. Orientation settings are not possible in the ABAP list format types.


Once Format type is created, next goto Device types and click Display and select one of the device where we are going to add the format type.


Here in our example we will use SWIN device type to add the new format type created by us.

The current format type used is a SAPscript type.


Click on Formats button and click create button to add the format type for device SWIN.




Format added to the device Type SWIN, now click save and provide the necessary printer actions for the format type to control the output.



The below is a sample actions that was provided for the example.



Provide #no action in printer initialization and Reset after exit.

For the End of page provide \f for form feed, to take multiple page print out.

For the End of line provide \n for new line and the end of line.


After adding the actions the print actions button shows green.





Pages