Professional Documents
Culture Documents
SAPScript
There are three components in SAPScript
1. Standard Text
2. Layout Set
3. ABAP/4 program
SAPScript is the Word processing tool of SAP
It has high level of integration with all SAP modules
STANDARD TEXT
A Standard Text is a like our normal documents. In Standard Text, you can
create standard documents like letters, articles etc
Plain documents are classified as Standard Text ( ST ).
You should first create a Style. Goto Tools Word Processing Style
Every style contains Character Strings, Character formatting and paragraph
formatting
To create a Standard Text goto Tools Word Processing Standard Text
Give a Standard Text name, Specify Text Id as ST and Language as E.
Click on Create / Change
Every Standard text is assigned to a style
To assign a style goto Format Style
You can base your documents on these character strings, paragraphs etc.
Character strings have to be created, if you want a sets of strings / words /
paragraphs / documents with different fonts, font sizes, formats ( Bold,
Italic, Underline, Normal etc.) with these properties.
You can create each character strings differently
You can specify default properties for each type of paragraph like you can
define right margin, left margins, line spacing, alignment etc.
These properties can be different for every paragraph in a Standard text
By : Subba Rao
You can also specify how much space should be left before and after the
paragraph
You can also specify the TAB positions
To move to the next tab position specify ,, (two commas)
In the pull down box against each line you can specify the paragraph type
on which the text in the line is going to be based
You can also display your standard text in hierarchical format by selecting
the OUTLINE option while creating the paragraph
Every paragraph and character string that you create should be saved and
activated
To display the ACII character, enclose the ASCII value of that character in
<... > e.g. <65> would display A
If you want the text in your standard text to appear as per the attributes
specified in the character strings the specify <character string name> text
matter </>
Eg. if the S1 is a character string with Bold attribute and you want HELLO
to appear in bold then you should say <S1>HELLO</>.
This resembles HTML way of writing the code
Every Character String has to be terminated by a </>
You can display texts displayed in different character string formats but
every
character
string
should
be
terminated
by
</>.
E.g.
<S1><S2>HELLO</></>
If you specify a line to be of Raw Line ( ( ) type then the character strings in
that line will not have any effect and they will be treated as normal
characters
If you want a block of text to displayed as a single unit i.e. you dont a part
of the block in one page and some part in another page, then you should
enclose that block of text in between PROTECT.... ENDPROTECT
You can have Text symbols, System symbols and Program symbols in your
standard text.
Symbols are enclosed in &...&
For. If you want to display current date in your Std. Text then you write
&date&. Here &date& is a system symbol. Current time ( &time&, &user&
etc. Are some examples of system symbol).
By : Subba Rao
You can define Text Symbols by using the system command DEFINE and
specifying command line in the column tag area. You can define a Text
Symbol as follows :
DEFINE &MYSYMBOL& = CSSL : - defines the text symbol
&MYSYMBOL&
: - displays CSSL at runtime.
PROGRAM Symbols are used for communication between different modules
of SAP
Using Program symbols you can fetch the data from the database. You will
mainly use Program symbols in Std. Text when the std. Text has to sent to a
Layout set with data extracted from a database.
You would write Program symbol as follows :
&Tablename-fieldname&
e.g. &TABNA-NAME1& where TABNA is a table name and NAME1 is a field.
Specify command line in the column tag area
But to display the data in the layout set you have to write a ABAP/4
program.
You can refer to online help documentation on SAPScript for more
information on different types of symbols and control commands that can be
use in SAPScript.
You can assign Layout sets to a Standard Text
LAYOUT SETS
A SAPScript FORM consists of the following elements
By : Subba Rao
PARAGRAPHS
Click on Paragraphs button on the applications toolbar
To create new paragraphs go to EDIT Create Element
Give a name and description to the paragraph.
You can specify different attributes to like font type, font size,
character style ( i.e. bold / italics / underline ), Tab settings, Bar
codes, margins, alignments etc.
CHARACTER STRINGS
This again is like the ones that you creates for Std. Text
By : Subba Rao
WINDOWS
The various output areas found on a form are called Windows
You can organize texts within your windows using the text elements and
paragraphs
Windows can appear on numerous pages within a single form
Click on Windows button
To create a new window go to EDIT Create Element
Give a name and description for the window
Specify the window type
There are 3 types of windows
MAIN
CONSTANT
VARIABLE
Every layout set can have only one MAIN window. MAIN
window is created by default
MAIN window can flow across pages
CONSTANT windows are use only once per page
You need to specify default of that windows
TEXT ELEMENTS
For every window you may want some text to appear in it.
By : Subba Rao
By : Subba Rao
By : Subba Rao
Since you have opened a form you close that form using the
CLOSE_FORM function.
Summary :
A SAPScript Layout set consists of different elements like Pages, Windows,
Page Windows, Character Strings, Paragraphs etc.
You will have to create a layout set in the following order.
Every layout set may consist of at least one Page. It may also contain
number of pages. So you first define a default page.
Every Page should have a default paragraph assigned to it. So after you
create a page assign a paragraph to the page.
The contents of every page have to specify a position on the page. For that
you have create to Windows. Which Windows should appear in what pages
and at which position is user specific.
Every Window is some certain size. So you specify the sizes of the windows
in the Page Window of each Window. This will also determine the position of
the windows.
The contents to be displayed in the Windows are written in Text Elements.
What styles the paragraphs / texts in the page widow should take can be
defined using the Character Strings.
By : Subba Rao