Often there are instances where an output from a SAP program is required on a physical paper in a pre-designed format. Using normal ABAP code this is not possible. Instead SAP provides an object called SAPSCRIPT to generate such kind of documents which can contain logos, tables and other objects and which can look like pre-printed documents.
This article focuses on the design and use of Layout sets in ABAP programs to generate beautified output in SAP.
A layout set is a template designed in SAP to place the stream of data coming from a SAP program on different parts of a physical page. The designer needs to lay out the various elements that need to be printed on the page and store it as an object in the SAP system. An ABAP program will subsequently call this object to generate an instance of the template – thus generating an output document from the program.
Language in which the data coming on to the layout set will be printed. Generally, this will be the language that has been set up as default in the SAP system
Section to define the various attributes of the layout set on a global level. Changing these attributes will affect all the components of the layout set.
The various components of the header are explained below
- Administration Information
This shows the information about the layout set – details of the designer, details of changes occurring to the design, development class of the layout set and the language details for the layout set
- Standard Attributes
- Description - Brief description or title of the layout set
Default paragraph - The base paragraph that is globally applicable to the document. This can be overridden at lower level of the layout set by using other paragraphs
Tab Stop - The base tab-stop that is globally applicable to the document. These can be overridden at lower level of the layout set by using other tab stops
- First Page - The start page of the layout set
- Page Format
Orientation - The direction of printing the data on a page – P for portrait (vertical) and L for landscape (horizontal)
- Lines per inch
- Font Attributes
Here the various attributes and the base font applicable to the document can be defined. This font setting can be overridden at a lower level using the character strings