Normal ABAP reports are used for only internal purposes, they wont use for creating formatted documents and other things for printing. Here come SAPScript. It is used or creating the formatted documents. The documents can contain tables and images like logos etc. We can specify page width, height, alignment and font etc for the documents in SAPScript.
Normally a SAPscript contain the following objects
- Header Data: It contains the global setting for the SAPscript like page orientation and default font etc. It contains two parts administration data and basic data.
- Paragraph and Character Formats: It used for formatting the texts in forms.
- Windows and Text elements: Each area for output data in form are specified as different window with a unique name. These names will call in our programming interface. For example the area for showing address can be used with a window named AREA.We can create each window only once in page, but the MAIN Window can be used maximum 99 times in a page. We will explain more about different types of window later.
- Pages: May be our form will contain more than one page and each page have different formats. These pages also will have names.
- Page Windows: it specifies the entire rectangular output area for the page. In page windows we specify the position of each window and its height, width and all. There we need to enter the left and upper margins, height and width and window type for each windows used in that page.
- Form Documentation
Different types of Windows used in forms
While creating the windows we need to specify the window type for each window. There are three types of windows are there
- Variable Windows: For each page the contents of the variable windows will process from beginning and it won’t trigger any page break. The excess data beyond its length and width will be truncated. For a variable window can have different size in different pages.
- Constant Windows: It same like variable windows. Only the difference is that it can have a fixed (constant) size on each page. It’s rarely used one.
- Main Windows: each form must have a main window. When the contents inside the main window exceed a page break will automatically triggered and the contents will start to print on next page. The main window has three output areas.
- Top area : It will display before the main contents of the window
- Body area: It contains the main content.
- Bottom area : It will display after the main content
For knowing about the programming and function modules used see SAPSCRIPT commands
- SAP Smartforms Tutorial
- Migrating SAPscript forms to Smart Forms
- SAPSCRIPT commands in programming
- Transaction SFTRACE – SmartForm Trace
- SAP HR Forms editor tutorial