Beruflich Dokumente
Kultur Dokumente
What is SAP? ABAP HR FICO SD Video Payroll Quiz Java Testing Answers
SAP script is the SAP Systems own text-processing system.It looks and feels a lot like other leading text-processing systems. It is used to print preformatted text in pre-formatted forms.
www.saptraininghub.com/sap-script/
1/6
3/18/13
1. An editor for entering and editing the lines of a text 2. Styles and layout sets for print layout. These are created independent of the individual texts using the corresponding maintenance transactions and are allocated to the texts later 3. The composer is a central output module. The SAP script composer is invisible to the outside 4. A programming interface that allows you to include SAP script components into your own application programs and to control the output of layout sets from within the programs 5. Several database tables for storing texts, styles and layout sets
Layout Set
To output documents using the programming interface, R/3 application programs need so-called layout sets (a kind of form).In SAP script a layout set describes the layout of the individual print pages and uses text elements to supply definable output blocks, which a print program can call.A layout set can be defined as a page design for a document Layout set on its own doesnt contain any data. The selection of data for the document is done through the print program. The print program selects the data from database table and feeds it to the layout set. When the print program is executed the document is printed on the screen, printer. Usually a SAPScript Layout consists of following components 1. Header Data: Header data is used for information and control of SAP printing. The header data comprises of 2 parts Device Independent Stores information like Start page , Default paragraph ,Language Attributes etc. And Device Dependent stores information like Page format ,Orientation Lines per inch etc 2. Paragraph and Character Formats : Paragraphs are formatted using various attributes. For instance Standard paragraph attributes specify Left or Right margin, Alignment ,Line spacing etc. Font attributes specify Font family ,Font size etc. Character formats allow to format entire blocks of text within a paragraph 3. Windows and Text Elements: Windows are individual text areas (header address, date, footer) in a page . It helps combine the information contained in a document into certain groups and make each group appear on the printed page in an individual area.You can define text elements (window texts) for each window. The print program accesses text elements by name, formats them and prints them in the respective window. The paragraph and the character formats used must be defined in the form. 4. Pages: They are individual pages of a document and must have a unique name. You will often find different layouts for
www.saptraininghub.com/sap-script/ 2/6
3/18/13
individual pages: The first page of an invoice differs from the subsequent pages, on which you need not repeat general information, such as address or customer data. 5. Page Windows: While defining windows and pages, you do not yet determine the position and spacing of the texts to be output.A page window defines the rectangular output area in the output medium by specifying the left upper edge of the output area and its width and height
Control Commands
The purpose of control commands is to allow control of the output formatting.These commands are not interpreted by the SAP script editor, but are passed through to the SAP script Composer for processing. This includes, for example, line and page formatting, the formatting of text according to the paragraph and character formats specified. Syntax Enter /: in the paragraph format Examples NEW-PAGE Explicit page break PROTECT ENDPROTECT To print complete paragraph in one page. INCLUDE To include the content of another text into current text PERFORM To call a subroutine of any ABAP program
Print Program
The execution of script is done through an ABAP program, which is referred as Print Program. Each print program should have an ENTRY form , which will be called from customization. For a standard configuration we can see the form name (script name), print program name and output type in the table TNAPR.The print program uses the Form control functions to call the script. The print program call either all or some of the form control functions to execute the script OPEN_FORM (Mandatory) Opens the layout set output CLOSE_FORM (Mandatory) Ends the layout set output START_FORM (Optional) Starts a new layout set WRITE_FORM (Mandatory) Calls a layout set element END_FORM (Optional) Ends the current layout set
Output Types
The output type can specify, a printed form that you need for internal use or a form that you want to send to a customer or vendor . The output type can also be an internal electronic mail message that you want to send to staff in another department. For example Print out can be classified as one output type of a billing document, i.e. when this output type is executed the billing document is printed. Similarly Fax can be an output type, i.e. when this output type is executed a fax of the billing document is sent
www.saptraininghub.com/sap-script/ 3/6
3/18/13
All the output types for any document (e.g. billing document) will be stored in the table NAST.Output types are executed through the program RSNAST00 . Example : Output type in a billing document1. 2. 3. 4. Go to VF03 Enter billing document number and press enter again Chose Output under the menu Goto -> Header Here Z101 is an output type of a print output
www.saptraininghub.com/sap-script/