Sie sind auf Seite 1von 83

Creating a SAPSCRIPT form

With the call of the transaction SE71, the screen to create or change a
SAPSCRIPT form appears. We type the name of the Form an the coe of the
!ang"age on the appropriate fiels. In orer to #"il a ne$ Form $e press the
comman #"tton Create. In orer to moify or sho$ the technical elements of an
E%istent Form $e press the Change or &isplay comman #"tton respecti'ely.
After pressing the comman #"tton Create, a pop"p $ino$ appears informing "s
that the Form oes not e%ist on the Client $e are $or(ing. We press the )* #"tton.
+n the appearing screen $e type a escription of the Form on the appropriate
fiel an $e press the comman #"tton ,asic Settings.
After pressing the #"tton ,asic Settings, a screen appears $here the paper si-e is
efine e.g. &I.A/, the page orientation e.g. !anscape, the efa"lt paragraph
e.g. f an the First page e.g. first .
Pressing the comman #"tton Pages, $e get a $arning message stating that the
&F paragraph oes not e%ist. We #ypass the message pressing 0Enter1.
With a secon 0Enter1 $e get a ne$ $arning message that the Page FIRST oes
not e%ist. We #ypass this message too #y pressing 0Enter1, an $e press the
comman #"tton Pages.
+n the screen of Pages $e type the name of the Page $e $ish to create on the
appropriate fiel an $e select the men" path Eit 23 Create Element.
+n the appearing screen $e type the Page &escription on the appropriate fiel an
on the fiel .e%t Page $e set as ne%t page the one $e ha'e 4"st create. We press
0Enter1. We 5"it the Pages Screen pressing the comman #"tton Paragraph
formats.
+n the screen of Paragraph $e type the name of the Paragraph $e $ish to create
an $e select the men" path Eit 23 Create Element.
+n the appearing screen, $e type the &escription an if $e $ant, $e can specify
Fonts an Ta#s for this Paragraph $ith the corresponing comman #"ttons. In
the case of this e%ample, the Font an the Ta#s specifie in the ,asic Settings
screen apply. We 5"it the Paragraph screen #y pressing the comman #"tton
Wino$s.
In the Wino$ creation screen, there is alreay the 6AI. $ino$. This $ino$
can #e locate in a page an can contain a 'aria#le n"m#er of lines. It is "se to
present the etail lines of a SAP oc"ment e.g. the lines of materials #ille from
ta#le 7,RP.
In the $ino$ creation screen $e select the men" path Eit 23 Create Element.
A pop"p $ino$ appears, $here $e type the name of the ne$ $ino$
8+"r9ar: an its escription 8+"r Aress: in the fiels Wino$ an
&escription respecti'ely. We press the comman #"tton +;.
As $ino$ type $e set 7AR 8in the fiel Wino$ type:.
We repeat the same process of $ino$ constr"ction an $e #"il the $ino$s
C<STA&&R 8C"stomer Aress:, an =eaer 8=eaer Wino$:. We 5"it the
screen of $ino$s #y pressing the comman #"tton Page Wino$s.
In the screen of Page Wino$s there is the page FIRST in the fiel Page.
We select the men" path Eit 23 Create Element, in orer to create a ne$ Page
Wino$.
A pop"p $ino$ appears $ith all $ino$s $e ha'e create pre'io"sly in the
appropriate screen. We select one of them e.g. C<STA&&R $ith a o"#le clic( of
the mo"se.
The selecte $ino$ is no$ locate in the FIRST page as a Page Wino$. We fill
the fiels !eft 6argin, <pper 6argin, Wino$ With an Wino$ =eight in the
esire "nit of meas"rement 8e.g. C= i.e. characters or C6 i.e. centimeters:.
We select again the men" path Eit 23 Create Element, an in the appearing
pop"p $ino$ $ith all $ino$s sho$n, $e ha'e a'aila#le the $ino$s not
locate yet in the FIRST page as page $ino$s. We select the ne%t $ino$ an
$e gi'e its coorinates an its imensions.
So $e locate all the $ino$s in the Page an $e ha'e an I6A>E of their
positions an the information $hich $ill #e containe in the 'ario"s areas of the
SAPSCRIPT form.
In this stage $e can select the men" path Form 23 Acti'ate. This action stores the
$or( $e ha'e one in the system an acti'ates the changes so that they are
a'aila#le to the "sers.
The acti'ation fins an error an gi'es a $arning message saying that the page
$ino$ ?@AB in the imensions specifie, is too $ie for an @/ page in lanscape
orientation. We #ypass the message #y pressing 0Enter1.
In this stage $e can select the men" path Settings 23 Form Painter.
With the selection of the men" path Settings 23 Form Painter, a pop"p $ino$
appears $here $e select the SAPscr ta#, $e chec( the fiel >raphical Form
Painter an $e press the +; comman #"tton.
The >raphical Form Painter en'ironment sho$s the page $ino$s as $hite
rectang"lars, $hile the page is sho$n as a grey #ac(gro"n $ith gri lines.
In the graphical en'ironment of this eitor $e can rag an rop the Page
Wino$s or $e can change their imensions $ith the mo"se.
When $e ha'e arrange the Page Wino$s $ith Crag an ropC, $e select the
men" path Settings 23 Form Painter.
In the appearing pop"p $ino$ $e select the ta# SAPscr, $e "nchec( the fiel
>raphical Form Painter, an $e press the +; comman #"tton.
In the Page Wino$s screens the coorinates an the imensions of the Page
Wino$s ha'e no$ #een change. +n ot matri% printers neither the fractions of
lines ma(e a ifference in the 'ertical position of the te%t, nor the fractions of
characters ma(e a ifference in the hori-ontal location of the $ors. The
fractional parts are ro"ne "p. 8=o$e'er there is no acti'ation error:.
.o$ that $e ha'e locate the Page Wino$s correctly, $e select one of them
$ith the mo"se e.g. C<STA&&R page $ino$ an $e press the comman #"tton
Te%t Elements.
So an eitor appears $here $e can $rite the 'aria#les 8sym#ols: that sho"l #e
printe on the page $ino$. The 'aria#les are incl"e in ampersans i.e. D an
the constant te%ts are $ritten as they sho"l appear. If $e $ant to change a font in
an area of the page $ino$, $e incl"e this area in the notations an 8$here F is a
Character format, as shall see later:. The cells to the left of the lines of the eitor
ha'e the corresponing paragraph. The asteris( sho$s the efa"lt paragraph.
When $e ha'e $ritten all the Te%t Elements in the eitor of a Page Wino$, $e
press the ,AC; comman #"tton an $e ret"rn to the Page Wino$ screen. =ere
$e select another Page Wino$ an $e call again the Te%t Elements eitor.
The Page Wino$ +"r9ar contains some 'aria#les 8sym#ols: an some
constant te%ts as $ell. The paragraph is efa"lt 8asteris(:.
In the Te%t Elements eitor $e can $rite comments #y typing EF in the paragraph
cell to the left of the line. F"rthermore a series of characters appearing in the
printo"t as one line can #e split in many lines of the Te%t Elements eitor #y
typing G 8the contin"ity sym#ol: in the paragraph cell.
In the Te%t Elements eitor $e can efine areas, $hich are calle an isplaye
#y the program flo$ "ner certain conitions. These areas are calle Elements
an their #eginning is efine #y the characters EH in the paragraph cell. The en
of an Element is the efinition of the ne%t Element or the en of the te%t in the
eitor. In the Page Wio$ 6AI. $e ha'e the Element ITE69=EA&ER an the
Element ITE69!I.E. The te%ts in these Elements are in the IT paragraph format,
$hich has not yet #een efine. The ta#s are enote in the eitor $ith o"#le
comma 8 ,, : .
In orer to efine the Character Format IJ3, $hich $as "se in the Te%t
Elements eitor, $e go to screen Page Wino$ an $e press the #"tton Character
Formats. From the screen of Character Formats, $e select the men" path Eit 23
Create element.
+n the appearing pop"p $ino$ $e fill in the Char Format fiel the notation J
an in the fiel &escription $e type an e%planation 8,ol:, an $e press +;.
In the Character Formats screen $e press the Fonts #"tton an $e select in the
Family fiel a font e.g. C+<RIER an in the fiel Font Si-e a si-e e.g. 1K,L pt.
We select as $ell the ,ol characteristic, setting the raio #"tton to +n.
In orer to create the Paragraph Format IT "se in the Te%t Elements eitor in the
page $ino$ 6AI., from the ta# Character Formats $e press the Paragraph
Formats #"tton. From the Paragraph Formats ta# $e select the men" path Eit 23
Create element.
+n the appearing pop"p $ino$ $e type in the fiel Paragr. format the notation
IT an in the fiel &escription an e%planation 8Item Paragraph:, an $e press the
+; #"tton.
In the Paragraph Formats screen $e press the #"tton Ta#s an $e fill the positions
$here the alignment points are locate 8Ta#s: in the esire "nit of meas"rement
8e.g. C= for characters:.
At this point the constr"ction of the SAPSCRIPT form has #een complete $e
select the men" path Form 23 Acti'ate.
We recei'e a message saying that the form has #een acti'ate. We go to the initial
screen on the transaction SE71 $ith the #"tton ,AC;.
The SAPSCRIPT forms 'ary in the 'ario"s lang"ages. For this reason, $hen
$or(ing in m"ltiling"al systems, as soon as $e constr"ct a form in the original
lang"age, $e sho"l copy it an fit it in the other lang"ages. So in the screen of
transaction SE71 $e type the name of the form in the fiel Form an the
estination lang"age in the fiel !ang"age. We press the #"tton Create.
A message informs "s that the original lang"age of the form is English.
We select the men" path Form 23 Copy from.
In the appearing pop"p $ino$ $e fill the so"rce form an original lang"age an
$e press +;.
After copy, $e select the men" path Form 23 Acti'ate.
A message appears saying that the form has #een acti'ate. Pressing the ,AC;
comman #"tton, $e 5"it the transaction SE71. 8+f co"rse if necessary $e change
the Te%t Elements in the Page Wino$s, $here $e ha'e constant te%ts, replacing
them $ith their e5"i'alents in the estination lang"age:.
Calling a SAPSCRIPT form from an ABAP program
There are fi'e #asic f"nction mo"les "se for comm"nication #et$een the A,AP
r"ntime en'ironment an the, so calle, CComposerC of the SAPSCRIPT toolM
1. +PE.9F+R6 starts the comm"nication #et$een the A,AP r"ntime an
the Composer
K. START9F+R6 intro"ces a #lan( SAPSCRIPT form $hich can #e fille
$ith ata from the A,AP r"ntime.
N. WRITE9F+R6 fills the SAPSCRIPT form $ith 'al"es from the A,AP
r"ntime.
/. E.&9F+R6 completes the $riting to the SAPSCRIPT form.
O. C!+SE9F+R6 closes the comm"nication #et$een the A,AP r"ntime
an the Composer.
The lin(e coe is an A,AP program $riting a set of S& oc"ments to the
SAPSCRIPT form of the e%ample sho$n a#o'e
Downloading SAPSCRIPT forms to a workstation and uploading them to
another SAP system
The SAPSCRIPT forms can #e store on a har is( an can #e loae to other
SAP systems. To o this $e select the transaction SENP an in the fiel Program
$e type RSTQSCRP. We press FP (ey for e%ec"ting this program.
In the selection screen $e select the raio #"tton Form an $e fill the fiel +#4ect
.ame $ith the name of the SAPSCRIPT form an the fiel 6oe $ith the $or
EQP+RT. We select the raio #"tton FromEon Fronten an $e fill the fiel
&ataset name $ith a path on the har is( an a file name. We press the FP (ey
for e%ec"ting the program $ith the pre'io"s selections.
A pop"p $ino$ appears $ith the path an the filename $e ha'e selecte an $e
confirm o"r selections pressing the +; #"tton.
Finally $ith the e%ec"tion of the program $e ha'e a log $ith the res"lts of the
transport of the SAPSCRIPT form from the SAP system to the har is(.
In the target system $e call again the transaction SENP an in the file Program
$e type RSTQSCRP. We press the FP (ey for e%ec"ting the program. +n the
selection screen $e select the raio #"tton Form an $e type in the fiel +#4ect
.ame the name of the SAPSCRIPT form, an in the fiel 6oe the $or
A?P+RT. We select the raio #"tton FromEon Fronten an in the fiel &ataset
name $e type the path an the filename, $here the SAPSCRIPT form has #een
o$nloae. We press the FP (ey for e%ec"ting the program $ith the pre'io"s
selections.
A pop"p $ino$ appears, $here $e fill the e'elopment class, an $e press the
SA7E #"tton.
+n a follo$ing pop"p $ino$ $e fill the re5"est, an $e press the +; #"tton.
Finally $e ha'e a pop"p $ino$ $ith the path an the filename $e ha'e selecte.
We confirm o"r selections pressing the +; #"tton.
In the en $ith the e%ec"tion of the program $e ha'e a log $ith the res"lts of the
transport of the SAPSCRIPT form from the har is( to the SAP system.

Das könnte Ihnen auch gefallen