13 introduction to sap scripts
TRANSCRIPT
-
7/29/2019 13 Introduction to SAP Scripts
1/4
3/18/13 Introduction to SAP Scripts
www.saptraininghub.com/sap-script/
Sap Training Hub
Free SAP Training & Tutorials
What is SAP?
ABAP
HR
FICO
SD
Video
Payroll
Quiz
Java
Testing
Answers
Introduction to SAP Scripts
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.
Components of SAP Script
SAP Scripts comprises of five main components:
DB2/UDB DBA training
www.db2team.com
Learn to be a DBA online Learn from theexperts
http://www.saptraininghub.com/http://www.google.com/url?ct=abg&q=https://www.google.com/adsense/support/bin/request.py%3Fcontact%3Dabg_afc%26url%3Dhttp://www.saptraininghub.com/sap-script/%26gl%3DPK%26hl%3Den%26client%3Dca-pub-6330153051175486%26ai0%3DCgoOPqptGUfKyM5Ciiga8rIHAA7-tz4gDr-aJu0fAjbcBEAEgm8zvI1CPhpHs-_____8BYMsEyAEBqAMByAPTBKoEc0_QB28RibyP1ndrxAtHbeYZlMUN3d4JmzLmIivGBdjS5Z7A9QP9je1zCPwOrTusC0uSWvNBwiq0aQPzvjr_lAWpA077gIfgoFL28yjaxS1oPqSYXxtj1mJvnVPkU3IwiqiAh5NiUIei0wFNxcbC0WT76LOAB_fZmSk&usg=AFQjCNEDzBdUoYwZayz1hgYXyxW1FTbckAhttp://googleads.g.doubleclick.net/aclk?sa=L&ai=CgoOPqptGUfKyM5Ciiga8rIHAA7-tz4gDr-aJu0fAjbcBEAEgm8zvI1CPhpHs-_____8BYMsEyAEBqAMByAPTBKoEc0_QB28RibyP1ndrxAtHbeYZlMUN3d4JmzLmIivGBdjS5Z7A9QP9je1zCPwOrTusC0uSWvNBwiq0aQPzvjr_lAWpA077gIfgoFL28yjaxS1oPqSYXxtj1mJvnVPkU3IwiqiAh5NiUIei0wFNxcbC0WT76LOAB_fZmSk&num=1&sig=AOD64_114ZQOVqPHyr52WEALB3LN5Sy0lA&client=ca-pub-6330153051175486&adurl=http://www.db2team.com&nm=1http://www.83answers.com/http://www.guru99.com/http://www.javatutorialhub.com/http://www.saptraininghub.com/quiz/http://www.saptraininghub.com/sap-payroll/http://www.saptraininghub.com/sapvideos/http://www.saptraininghub.com/free-sap-sd-training-course/http://www.saptraininghub.com/sap-fico-training-tutorials/http://www.saptraininghub.com/sap-hcm/http://www.saptraininghub.com/abap-tutorial/http://www.saptraininghub.com/what-is-sap/http://feeds.feedburner.com/SapTrainingHubhttp://www.facebook.com/pages/Sap-Training-Hub/139632216092864http://twitter.com/SAPTHubhttp://www.saptraininghub.com/ -
7/29/2019 13 Introduction to SAP Scripts
2/4
3/18/13 Introduction to SAP Scripts
www.saptraininghub.com/sap-script/
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
Dependentstores 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 formatsallow 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
-
7/29/2019 13 Introduction to SAP Scripts
3/4
3/18/13 Introduction to SAP Scripts
www.saptraininghub.com/sap-script/
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 CommandsThe 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
-
7/29/2019 13 Introduction to SAP Scripts
4/4
3/18/13 Introduction to SAP Scripts
www.saptraininghub.com/sap-script/
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 document-
1. Go to VF03
2. Enter billing document number and press enter again
3. Chose Output under the menu Goto -> Header
4. Here Z101 is an output type of a print output
Standard Texts and Graphics
Standard Texts for your report can be created using transaction SO10
Graphics and printer macros are uploaded with report RSTXLDMC into individual standard text documents or through
transaction SE78. Graphics are uploaded in Baseline TIFF 6.0 format (.tif files on PC)
SAP Script & Standard text elements can exported or imported between two systems using RSTXSCRP program
Copying Scripts Across clients:
SAP Script is a client dependent object.Unlike programs, changes done to SAP script in one client will not be reflected
in other clients. For copying script from one client to another, go to SE71 and use Copy from Client option available
under Utilities menu or import the transport request, in which the script is saved, from the original client using the
transaction SCC1 .
Important Points to Note
1. SAP script does not maintain any versions. So when modifying the SAP script , ensure that the changes are well
documented in script. This applies to the standard texts too.
2. The output of the form will differ when viewed on the screen and on the printer. So always test the output of the
script on the printer.
You might like:
Guide to Credit
Management in SAP
How to create
Picking ,Packing and
What is Client ? How
to Create a New
What is User and
Customer Exits
How to Create
Quotation
http://www.saptraininghub.com/create-new-client/http://www.saptraininghub.com/create-quotation/http://www.saptraininghub.com/what-is-user-and-customer-exits/http://www.saptraininghub.com/create-new-client/http://www.saptraininghub.com/picking-packing-and-pgi/http://www.saptraininghub.com/guide-to-credit-management-in-sap-sd/http://www.saptraininghub.com/create-quotation/http://www.saptraininghub.com/what-is-user-and-customer-exits/http://www.saptraininghub.com/create-new-client/http://www.saptraininghub.com/picking-packing-and-pgi/http://www.saptraininghub.com/guide-to-credit-management-in-sap-sd/