Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
SAP Script Tutorial

SAP Script Tutorial



|Views: 4,461 |Likes:
Published by api-27047119

More info:

Published by: api-27047119 on Oct 18, 2008
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





SAP Script Tutorial
Compiled by Sudhanshu Singh
- SAP Script -
- Sudhanshu Singh -
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 calledSAPSCRI PT to generate such kind of documents which can contain logos,
tables and other objects and which can look like pre-printed documents.
This tutorial 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 \u2013 thus

generating an output document from the program.
In this tutorial we will cover subjects such as:
Main elements of SAPScript
Commands that can be used in a layout set
How to include a graphical image
Commands that can be used in SAPScript
Step-by-step walkthrough of example
Example layout set
Example SAPScript code
- 2 -
- SAP Script -
- Sudhanshu Singh -
Main Elements
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 I nformation

This shows the information about the layout set \u2013 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
1. Description - Brief description or title of the layout set
2. 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
3. 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
4. First Page - The start page of the layout set
5. Page Format
6. Orientation - The direction of printing the data on a page \u2013 P for portrait (vertical)
and L for landscape (horizontal)
7. Lines per inch
8. Characters/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.

Used to define the start and end positions for the different texts and objects that need to be
printed on the output document.
Character Strings

Used to define the fonts, and the formatting and printing styles for each and every character that needs to be printed on the output document. The start of the character string is indicated by < string name> , while the end of the character string is indicated by < /> .


The designer needs to organize the template as a series of pages. When an actual output document is printed, it will refer to each page for putting the data coming from the ABAP program. The order of pages is also taken from the template i.e. the layout set defined.

Window s

Various parts of the output document can be conveniently organized on the pages using
windows. Thus the data stream coming from the ABAP program can be logically grouped into
various parts and can be placed on different locations on a page.

There are 2 main types of windows that can be used in a layout set:
- 3 -

Activity (44)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
susmita_099 liked this
Vimal Kumar liked this
jamedeen2547 liked this
lamine125 liked this
K Srinivas Kumar liked this
dukerex liked this
Ronjan Usham liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->