Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Kaavian Systems
What is SAPscript ?
SAPsc ript is the integrated text management system of R/3.
It is similar to word proc essing syst ems.
SAPsc ript simplifies the proc ess of designing forms.
It supplies the layout and cont ent for your business forms.
Used To print, distribute, or display the business forms
Kaavian Systems
Components
Editor
Form Layouts and Styles
Composer
Print Program (Driver)
Database
Kaavian Systems
Process
The Print Program and Composer
Print program
report jh_form_01.
Application
DB
data
Layout set
ABAP/4
program
program
tables: scustom.
select * from scustom...
......
call function OPEN_FORM
......
call function START_FORM
......
call function WRITE_FORM'
......
to
J. Smith
7 Second Ave.
47110 XYZ City
Composer
Place, Date
Invoice No.4
123-45-556-678
Art.No.
00345
00379
02378
00458
Total
Price
200.150.50.300.700.R
XYZ B ank
Acct. No.: 0815 4711
Bank N o.: 000000000
SAP AG
Kaavian Systems
Kaavian Systems
FORM Components:
Header
Paragraph format
Character format
Page layout
Documentation
Kaavian Systems
Header :
Consists of Administrative Data and Basic
Settings.
Administrative Data :
Displays the name of the form, its description,
form class and the status.
Kaavian Systems
Header
Basic Settings :
Default settings for the entire document is
given here. It consists of page size, Orientation,
font, print attributes (Lines per inch, and
Characters per inch) default font to be used etc.
Kaavian Systems
Paragraph Format
Used to define several paragraph formats to
be used with Texts in Forms. Some of the
Attributes are Margins, Alignment, Font Name &
Size, Tab settings and Outline definitions.
At least 1 format to be specified and it has
to be defined as default paragraph in Basic
settings.
Kaavian Systems
Paragraph Format :
Kaavian Systems
Character Format:
To define formats to words and characters such as Bold, Italic, Underlined,
Barcode format, Font Name and Size etc.
Page Layout:
Kaavian Systems
Windows:
2. Variable Window.
Window with variable contents. The text can vary on each page in which
positioned. Variable windows are formatted for each page.
3. Constant Window.
Window with constant contents that is formatted only once
Kaavian Systems
the window is
Window Types :
LOGO
Recipient
Address
Information
MAIN
WINDOW
FOOTER WINDOW
Constant Windows
HEADER WINDOW
Variable Windows
Variable
Main Windows
Windows
Variable Windows
MAIN
WINDOW
FOOTER WINDOW
Documentation:
Detailed Help regarding the Variables used (text elements, program symbols
etc), Logical Flow, Description about Various Windows etc to be provided.
If copy of standard forms are modified, make sure that the changes are
properly documented.
Kaavian Systems
PC Editor :
Kaavian Systems
Text Elements:
text element
Text is assigned to window(s) as text elements.
Types :
Named Text Element
Un-named Text Element
Kaavian Systems
Symbols:
System Symbols
Sap script supplies values for System symbols.
Fixed name for system symbols.
Examples
&DATE&
&ULINE&
&TIME&
Program Symbols
SAP Scripts cannot directly retrieve data from DB tables calls another
program to do this.
Values fed to SAP Scripts using data areas.
Program symbol value limited to 255 chars
Kaavian Systems
Standard Symbols
Standard symbols are defined in the TTDTG table.
This table contains both the name of each symbol and its value.
The value, which is language-dependent, can contain up to 60 chars.
This table is delivered complete with standard entries supplied by SAP.
It may be extended with customer-specific symbols
Text Symbols
All symbols which do not correspond to one of the three types of symbol
described above are text symbols. You define the value of a text symbol
yourself in the text module.
There are two ways of doing this :
Use the menu entries in the text editor
Use the control command DEFINE
Kaavian Systems
Tag
/E
/:
=
(
/
/=
/(
*
/*
Meaning
-
Element Name
Command Line
Continuous Text (Left Blank)
Extended Line
Raw Line
Line Feed
Line feed with Extended Line
Life feed with Raw Line
Default Paragraph
Comment Line
along with other paragraph formats defined.
SAPscript Commands :
SAPscript
commands
Description
SAPscript
Commands
Address,
Endaddress
Formatting of address
Perform,
Endperform
Bottom, Endbottom
Print-control
Case, Endcase
Case distinction
Protect,
Endprotect
Define
Reset
Initialize outline
paragraph
Hex, Endhex
Hexadecimal values
Set country
Country-specific
formatting
If, Endif
Include
Set sign
Position + / - sign
New-page
New-window
Style
Change style
Summing
Summing variables
Top
Kaavian Systems
Description
Kaavian Systems
SET TIME
HEADER TEXT :
/:TOP
..
/:ENDTOP
FOOTER TEXT :
/:BOTTOM
..
/:ENDBOTTOM
PROTECT
/: PROTECT
.
/: ENDPROTECT
Kaavian Systems
Date mask
Fill characters
Number of decimals
Offset
Kaavian Systems
SAPscript Formatting:
&SYMBOL&
&SYMBOL+4&
&SYMBOL(5)&
&SYMBOL(I)&
&SYMBOL(Z)&
&SYMBOL(C)&
&SYMBOL(R)&
&SYMBOL(*)&
Dictionary Length
&SYMBOL(9.2)& -
Decimal Format
PRINT PROGRAM :
The Structure of a Print Program
Retrieves data
program rstxexp1.
tables: scustom, sbook, ...
select * from ...
...
call function 'OPEN_FORM'
exporting form = ...
...
call function 'START_FORM' ...
...
call function 'WRITE_FORM'
exporting element = ...
window = ...
...
call function 'END_FORM' ...
...
call function 'START_FORM' ...
...
call function 'END_FORM' ...
...
call function 'CLOSE_FORM' ...
SAP AG
Kaavian Systems
Changes to
another layout set
Prints output on the
layout set
Form Functions
Open_form
Close_form
Write_form
Write_form_lines
Start_form
End_form
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
...
..
..
..
..
..
RVORDER01
Packing List
RVDELNOTE
Invoice
RVINVOICE01
Purchase Order
MEDRUCK
Prenumbered Check
F110_PRENUM_CHCK
YPCC_ORDCONF_STD
Packing List
YPCC_PACKLIST
Purchase Order
YPCC_CHECK_NUM
Invoice
YPCC_INVOICE_STD
Remittance Advice
YPCC_REMITT_STD
YPCC_STATEMT_STD
YPCC_STMBCF_STD
Unnumbered Check
YPCC_CHECK_UNN
Prenumbered Check
Kaavian Systems
YPCC_CHECK_NUM
Discussion