Sap Scripts 1
Sap Scripts 1
• SAP Script has two parts: one print program and another
layout set.
Define
SAP Script
Creating Reports
Output
Program(ABAP) Report
Sap Document
Creating Forms
Output
Program(ABAP)
Layout set
Form
Sap Document
Components of SAP Script
Output determination configuration
Printer/Font Configuration
Component Resource
• Header
• Paragraphs
• Character strings
• Windows
• Pages
• Page windows.
Layout Set Elements Components
S.O#
S.O#
P.O#
P.O#
Date
Date
Ship-to
Sold-to
Item Material# Price
40 Part D $250
50 Part E $400
Item Material# Price
60 Part F $350
10 Part A $500
70 Part G $150
20 Part B $350
Total $2,800
30 Part C $800
Pages
W indows
Layout Set Elements
Page Windows
Turnaround Inc.
145 Apple Valley Ln.
Ithaca, NY 14850
Page 1
Windows and Page Windows
Date
Sender
Adressee
W indow with
body text
Page 2
Page 1
Footer
Window Types
W indow s
D ate
Sender
Page 2
Page 1
Layout Set Elements
Windows-Text element
• A window can contain hard-coded
texts and the variables to be
printed in the window.
• Tag column: Specifies format of
the text
• Text line column: contains the
actual content of the window.
• Special characters
- * Default paragraph
-/: Command line
-/* Comment line
-/E Text element
Layout set Elements
Windows-Text element
• Text Element always starts with
the line /E and continues to the
next text element (/E).
• It is the output program ( not the
layout set) that controls whether or
not to print a text element (i.e.
block of texts surrounded by /E)
and the order in which they are
printed.
• ‘,,’ Tabs in a paragraph
• ‘&&’ Variables.
Layout Set Elements
Pages
• Shows the page flow information
• Must define at least two pages.
• The first page specifies the next
page.
• The last page recursively defines
the next page as itself.
Pages: Attributes
A ttrib u te s P a ge
P a ge FIR S T
P age attributes
D e s c rip tio n A d d re s s p a g e NNUUMMBBEERRIN
INGG TTYYP P ES
ES
Page Page 1 AARRAABBIC
Next page NEXT IC A ra b ic n u m era
A ra b ic n u m e rals
ls
D e s c rip tio n A d d re s s P a ge CCHHAR
AR Fix
F ixeedd ccha
harac
racte
terr
P a g e c o u n te r LE
Next page Page 2 L ETTT
TEERR Lette
L e tters
rs
M RROOMMAANN RRoom m aann nnuummeera
rals
ls
Po adgee c ou n te r
Mitia
In o d lize
e c o u n te r
In c re as e ccoouunnteter r
In itia lize
KIn
e ecprecaso uencte
o ru n te rh a n ge d
unc FFoorr eexxaam
N o n -c h a n g in g c ou n te r mpple le::
O
O
O u tp
utp
Ouutpu u
u tt le
le
tp utt le n
n g th
gth
lennggthth->4->
4
N u m b e rin g
N um b e rin g ->PPPaag
age
ge e11:1
: : 00
-> P a g e 1 : 0 00 100
0 00
00 11 1
NNuummbberin
e rin ggtyp typee
OOuutp
tpuut tlelenng
g th PPaappeerr tra
th trayy cchhooic
icee
UUppppeerc
r as ee
c as
P rinPtrin
a ttrib ute us te s OOnnee -s
-side
id edd oorr ddoouubble
le -s
-side
idedd
t a ttrib
R e s o u rce n a m e pprin
rintin
tingg dde
e fa
fauultlt
R e s o u rce n a m e SS SSim
impple lexx m
moodede
P rin t m o de DD DDuupple x m o d e
P rin t m o d e le x m o de
TT TTuum
m bble le mmoode
de
Forms - Pages
Page
Page format
Page format
format Static
Static page
Static page
page sequence
sequence
sequence
Page 1 Page 2
DIN A4 LETTER
Next
page
Horizontal
DIN A5 Next page
Defining Page Windows
Top edge
Left edge
Height
Page window
W idth
Page
Layout Set Elements Paragraphs
Alignm
Alignment:
ent:
Standard attributes BLOCK
BLOCK justified
justified
CENTER
CENTER centered
centered
Paragraph HD Description Header 1 LEFT
LEFT aligned
aligned left
left
RIGHT
RIGHT aligned right
aligned right
Left m argin 1.00 CM Alignm ent LEFT
Right m argin 1.50 CM Line spacing 1.00 LN
Indent 1st line 2.00 CM No blank lines Units
Units of
of
Space before 1.50 CM Page protection m
m easurement:
easurem ent:
Space after LN
LN Lines
Lines
Next paragraph sam e page
CM
CM Centim
Centimeters
eters
MM
MM Millim eters
Millim eters
Right m argin IN
IN Inches
Inches
Left m argin PT
PT Points
Points
TW
TW Tw
Twips
ips
Space after
Space before
Indentation
W indow
Layout Set Elements
Paragraphs
• If no font is specified, default font from the layout set set header
will be used.
Elements for Structuring Texts
Turnaround Inc.
145 Apple Valley Ln.
Ithaca, NY 14850
Type
Dear Sir or Madam,
Yours faithfully
...
Layout Set Elements
Character Strings
Standardattributes
Sym
Symbolicnam
bolicnameof
eofaa
barcodefrom OOverride
verrideheader
header
barcodefromSA SAPscript
Pscript data
font
fontm
maintenance
aintenance dataor
orparagraph
paragraph
form
format
atsettings
settings
Layout Set Elements
Header
• Administrative info
• Default settings
• Page format: different for different
countries/applications
• Never change ‘Lines per inch’&
‘character/inch’
Graphical Form Painter: Page Layout
Form ...
P age
W IN D O W 1*
FIR S T Address page
W IN D O W 2*
W indow G raphic
W indow AD D R E S S
D escription Address
M ain w indow Ad m inistrative w indow M AIN * D esign w indow
D efault paragraph
Left m argin 1,60 CM
U pper m argin 1,60 CM
W indow w idth 9,00 CM
W indow height 6,00 CM