compiled By:
Ganapati Adi
SmartForms@eMAX
We Never Compromise in Quality, Would You?
What is SmartForms ?
SAP Smart Forms is new print solution introduced in SAP Basis Release 4.6C as the tool
for creating and maintaining f o m s to Print the Business Documents such as Experience
Letters,Offer Eetters,Purchase Brders,Sales Orders.
In One word , SmartForms is the Smartest way to work with Forms.
Note : All the SAP Script (Old Solution for Printing Forms) functionalities are still
Possible in SMARTFORMS .
Note : Event SAP Scripts can be converted into Smart Forms Also. ,
?
"4
Note : In Smartforms most of the functionalities can be ac
Clickings(Doub1e Click , Right Click ...).
n;!#
Features Of SAP Smart Forms & $ ~ ~ ~ & kg
I:$,
;&
iirv wI
&""r $ : k.
" ',
'
.
-.
-
b
y?.,~:;:$$$j&,
%
.S-
:F1
*;
!.
:, ; & +
~i~z $
is,?? .-.. ........
L :: ?.
." .!:3*f:
jgy
sss
".
......
::
fs.
OR *...................
, >, :;>&:~;~~,
,,
,
t.?::'d
.............
%
.
,
.. .
;,s,:?-&
' .::;:a
; .......... %
...........
-F"iih-,?i
.
i:
. ..:>. .
\: ."
+ .;,, d&
"&,$ . ~
*
"*,,~%
. ~" , Text
r/
/p
Click On Text Editor - .
Page 9 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
Positioning the Text
sgquent text nodes,
Linked Text Nodes
Page 10 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
s
F v ~ e of ~extsl:
- h e n e r a 1 Attributes $- Web Properti
I1 TeM Tilae Text Element p
Text element : is the Default TEXT Type .
Text module : To include a text module
Include text : To include an existing SAPscript text
Text Element in Detail : To include data from the form i
tables) or system data (date, time) into the text, use syste
the text When processing the form, SAP Smart Forms rep1
corresponding values.
-in the
Steps to Create Text Module:Execute Transaction SMARTFORMS and Select Text Module ,
Provide the name ->Create
Page 11 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
We Never Com~romise Oualitv. Would You?
in
P .,,,
Text Module ZTERMS " -
Descrlptlon Terms & Conltions
' Management
2. m o d s once s o l d c a n n o t be r e t u r n e d
3. 15%for the n e x t 1 month
g
Now this Module Can be used in any no of Forms.
t
Page 12 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartFynns@eMAX
We Never Compromise in Quality, Would You?
To Include it in the Windows, Create %heNode TEXT and Select the type as Text Module
eneral Attributes
~ t a r t ~ i m e New Paragraph
R COPY
No error if no text exist Always copy style from text
I \
Select the Text type as Te t Module, Enter the Text Module Name, Language and
Select aNo errnr if no text exists ( to Print the form even the Te
Including SAPscript Texts :
You use the text type lnclude Text
already exists in the system. To iden
Text ID, and the Language. This allo
Note : This text type corresponds t
the standard text editor (transaction
Note : If there is no text modules instead. They can
anslation systems.
d Select Text Type as Include Text
Enter the Text Name ( d e c t From the list).
Page 13 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +91 40 -65976727, Cell No: 99484 44808,98490 34399, mv.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
Printing Background Pictures on the Page::
. ..\.
Lable
T e m p 1 ate
j Flow L o a l c *
F ~ l d e r
$ "Create->Table
Page 17 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,J3yderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
: We Never Compromise in Quality, Would You?
a 0Pages and W~ndows
0 %PAGE1 New Page
D a LOGO Print Company Logo
G'. CADDRESS Print CompanyP
" Q MAIN Main Window.-- - - -- --->
J .------ -
Notice that a Table and Header(Cal1ed
.---!
%TABLEI !New Table 1 Only Once), Main Area(Cal1ed For Each
D Header RecordJLine) and Footer(at the End of
D Main Area L the PageITable
Each Area can has it's own Line Structure and Generally Header
(For Column Headings) and Main Area(Contents ) contains
t
Similar Line tvpe(Structure) and Footer has a ~ i f f e r e nStructure.
t
Page 18 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
Define the Line Types : HEAD-N-BODY with 5 Columns
IHERD-N-BODY 1 c*j 1 a p,OO iCMi3,OO )CMl3,OO 1CM13,0O ICM13,00 I C M ~
This Line type Can be used for both Header and MAIN Area.
Line FOOTER
1 Make Sure that the Table I
I1 Table Width 15,OO CM
I Width Equals to the Sum of all the Columns of the Line Type. I
\HEAD-N-BODY ( $
;j I a \3,80 /CM]3,88 [EM13 ,BO ]CM)3,OO ]~M13,00 IcM]]
Similarly FOOTER
@
.
Click 0
Page 19 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
Provide the Internal Table to be looped and it's Work Area
-
LOOPLoop/."
Operand IT-E KP O lNTO WA-E KP0
11 Row to 1
To Print Header DataQColumnHeadings)
Right Click On the Header ->Create->Table Line
W h l A l h l RAgin \ A l i n d n $ n t 1' 1
I k U Y Y
-- --.
,----
D iHpariert
D 'M! create " "
Right Click On CELLl->Create->TEXT
Page 20 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
;
Ph No: +9140 -65976727, Cell N: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
.-**--ve-
Headings.
Enter the Line Type HEAD-N-BODY(A1ready used for both Header i.e for Column
Headings).
Notice that CELLS (CELL6 to CELL10) are opened according to the line Structure.
Page 21 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
-
To Print Data in the CELLS
Wight Click on CEkL6->Create->TEXT
~7 %ROW2 New Li
ult Paragraph) and program
er Cells(CELL7,8,9,10) with the respective
t
Possible Operations in Calculations :
Page 22 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 45976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
0Pages and Windows
L)- CADDRESS Print Company
V Q-J MAIN Main Window
#gf,
/ yl
Operation is to determine the kind of calculation you want to exe~~$$$!$#$h@~abl&~;~~
Forms assigns the result of the operation to the field you ~ ~ e c i f i e b u i i d e ~ w ~%."$ ~ @ & a m e
, ??=
. ,,. ,
N~ ~ ~.
You can then use the target field name to display the result. F;i.
,
. .. ..$, .
\
,
.
~ , ,
,,b
\
@@i
;
. \"A , * ~
k
?f! \ .
4
Possible Automatic Operations , . . ~\. . ~
, ,, . f.ssps
P
c;/
.
\, s~ '~. ;
j
p
al field, the target field, which you need to display the result of
is, a column of the table), for which to execute the operation, and specify the calculation.
3. Depending on whether you execute a cdlculation on all items of the table or on items
of a sort level, display your result either in the footer or at the beginning or end of a sort
level.
Page 23 of 85 Compiled By : Ganapati Adimulam
eMax TechnoIogies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
w
We Never Compromise in Quality, Would You?
Calculating Subtotals
You want to display subtotals after a sort level break of a sort criterion. So that Make
Sure that the Internal Table is Sorted based on the required Fields.
Sort Criteria in Table:
Before you start reading an internal table, you can tell SAP Smart Forms to sort it. With
the sorting, you can divide the table into different sort levels:
-
1 st Sort Criterion
2 n d Sort Criterion
3rd Sort Criterion
Beginning of
Sort Level
(Event on Sort Begin)
(of 1st Sort Criterion)
End of Sort Level
(Event on Sort End)
cords and to display subtitles or subtotals at the
g of your internaLtable, use the Data tab of the table or loop node.
In the sort Crit box you can enter the fields by which to sort the table.
The sequence in which you enter the field names into the table control determines the sort
sequence. To change it at a later time, use the black arrows above the control. Use the radio
buttons to choose whether to sort the field in ascending or in descending order.
Note : To display data(Sub Totals) before or after a sort level, mark Event on Sort
Begin andlor Event on Sort End. In the navigation tree, an event node appears for
which you can create inferior nodes. In these inferior nodes you specify the data you want
to display at this event (for example, subtotals).
Page 24 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SrnartForms@eMAX
We Never Compromise in Quality, Would You?
P WA-SALES
%TABLEI NewTable 1
D Area
Ma~n
Note: SAP Smart Forms cannot recognize whether
example, before passing it at the for
events, you must still enter the sorting
Sorted.
Go to the Calculations tab o e following fields:
. . . . . . . . . . . . ............ .....
. . . . .... .... . . . . . .
Reset
I Sort Criterion '/ I
'The subtotals are formatted according to the relevant and displayed after each sort level.
Page 25 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SrnartForms@eMAX
We Never Compromise in Quality, Would You?
Calculating Grand Totals
On the Calculations tab fill the following fields:
1 column 1 value -
- .
i
I
I Operation Total
Field Name
I I
Target Field Name
."'f
Event After Loop
G;l~l
Initialization /
7
(active) -9
k-v9th
'r,-*
4L
. = - * & "**,
e*
fJ
-
v.
i
1. To display the grand total, include a table li
this table line.
2. You can specify whether to display She tota
grand total at the end of the tab9fTo do this
Break of the footer.
tz .;,"ihp
$
, & :
A\
-
"*
Numbering Table Items Conse~ut~vely:
output in which the individual items of y
s and the table heading by one cell that displays
II in the main area insert a text node. Use the
text node to display
*:
Value
- --
- I
\
Number
i
I
Target Field Name NUMBER I
-- I
I
7--
Event Before Loop
~ ~ ~
-- .
-
l .I _
I
Initialization 1
-
3. If desired, you can display NUMBER at the end of the table in the footer area.
Note : The items of the table are numbered consecutively.
Page 26 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
B 1 Templates in DeQail(StaticTable) ".
The layout of a template is static, which means that you determine it before the Smart Form is
executed. To do this, you can define line types in the Table Painter, whose sequences and
appearances are the same as in the output.
Line Types for Templates :
The layout of a template is static, which means that you determine it before the Smart Form is
executed. To do this, you can define line types in the Table Painter, whose sequences and
appearances are the same as in the output. Describing a template with line types could look like
this:
The output of thi hich only three different line types
are used:
Line type L1 for the first two line of the template. The Table Painter shows the interval in
the bracket after the name of the line type.
Line type L2 for the third line of the template. This line type has a different fixed line
height.
Page 27 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
- -
We Never Compromise in Quality, Would You?
Line type L3, which is no line type of its own, but only a reference to L1. The Table
Painter shows the name of the reference line type below the name of the line type.
Line type L4 for the fifth line.
Note: By specifying an interval you can use one line type for several subsequent lines of the
template. By specifying a reference you can reuse any existing line type at any position of the
template. You can make changes only to the 'master' line type.
Note: Unlike with line types for tables, for templates you specify a fixed line height for the line
type. Any output that does not fit into a cell is truncated.
Printing Templates: Use node type Template to display a table whose layout and size
(number of lines and columns) is determined before the runtime of the appli$tion program. So
A-"
."$@
that a template is also called a static table. c
-
'
&
mi&
4 ,- ,
, @
Creation Of a template, needs to define a table layout to determine&tkg.Gf&g&&goregh line.
The cells are used to display the contents of the inferior nodes ~ P t h i r e m ~ l a ~ i ~ ~ ~ ~ ~ ~ ~ ~ y a l l o w s
you to position text and a graphic side by side . ,
!
i
I
Note : You can create a te
1. Use the context m
Page 28 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartFom~s@eMAX
We Never Compromise in Quality, Would You?
Q f?,l FOLDER1 LI
P QJ MAIN Maln Window
Every time we print the
Data ,the Target Line
and Column No should be
Displaying Graphics in Templatesk , .
Page 29 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
in
We Never Com~romise Oualitv. Would You?
Combining Templates and Windows
You use line types to define the layout of templates. However, to create a template like the one
below, you cannot use the template concept of Smart Forms:
The cells of the colored part cover several lines. However, SAP
to specify for a cell of a line type that you want this cell to cover
To print such a layout in a form, you must divide the
create one template per window. To p r i n ~ f %templat
three windows in SAP Smart Forms (sg$&Prently c
f@@&&) ~~ecifl~d,~i,si&nored.
Q ~ T ~ . ~ ~
#/
thsj', sign to the left( and (), right-justified display (R),
insert fillers (F).
Page 42 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
List Of Formatting Options for Fields
--- -- -
- - - --- -.- -. --- -- -- . - -
-- -. -..
II Syntax ;I)Lription
I
&field+& Skips offsets () in the field value (character fields only). If
the offset is greater than the length of the value, nothing is
displayed.
I &field()&
7- 7
/ Sets the output length to . 1I
If the field is deflned by a Data Dictionary type, Smart Forms sets
the output length to the value specified there.
18field08- Suppresses the sign
IBfieldoB
/8field(.cnat.numberr
r-
I
&field(E)&
&field(T)&
ponent .
1 & dZ&
fl ( ) -
e
i / Suppresses leadingkeros i" numbers
I 8field(1)8
-
-- -
--
--
\
'
resses display of initial values
\
--
-
/(K)L ' \I,/ ~ e i c t i v a t e s routine specified in the Data Dictionary
II \ \
&field(R)& display. Use this option only when specifying an
~ight~justified
.. ...... .... .. ... . .. .. . ... . . ... . ... .. .. .. . . . .. .. .. . ... .. ... . . . .. . ....
ft-justified blanks in the value by the fill character
.. . .. .
en formatted using the edit mask JPDAT.
Since this representation uses Japanese characters, it is only to
be used in the Japanese version of the SAP System.
&field(C)& value as a sequence of words
separated by blanks. Option C shifts these words to the left and
leaves one blank in-between as a separator. Any leading blanks
are omitted. This effect corresponds to that of the ABAP
statement CONDENSE.
Page 43 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
Steps to Convert SmartForms Output to PDF :
1. Print the smartform to the spool.
2. Note the spool number.
3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4
and entering the noted spool number.
How do you make sure that both, the SMARTFORM & it's function module gets
transported? Or does the FM with same name gets generated automatically in the
transported client?
A smartform is transported no differently than any other object. if it is assigned to a development
r?
Typically, generate the SF, then use
function to use the name you get bac
Page 44 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 991484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
Example Proqram and Lavsut , Which Covers All the
SmartForm Features:
Requirement : Develop a Form to Issue the Credit Card
Statements to the Customers for City Bank.
Note : Sample Output of the form .
PAGE I Of
ard N O : 018301004245 L a n k Key : 88991122
u s t o m e r No 77777 3 a n k Name : C i t y B a n k I N D I A L t d
u s t o m e r Name A d m u l a m
treetj~no
Zity
S a n a th N a g a r
Sanath Naqar
a n a n a t i adimulam~avahoo.o n
cr ,a
B
Zity
E%zti
WmW. c i t i b a n k . corn
1,000.00 SHOP @ R S BROS
,0 0 0 . 0 0 SHOP @ CHERMAS
II
ZADDA
10. 0 1 . 2 0 0 8 T4 2Cf0.00 PETROL @ I N D I A N O I L , ERRA
ZADDA
11.01.2008 T5 800.00 SWEETS @ ABHIRUCHI , AMEERPET
3 12. 0 1 . 2 0 0 8 T6 5,000.00 SAREES @ K A L A N I K E T A N t
AMEERPET
T o t a l Is : 10200.00
) Grand Total : 12200.00
inaature Of Manaaer
Page 45 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SrnartForms@eMAX
We Never Compromise in Quality, Would You?
Input & Outputs for Each Window :
A :
- Print the Logo Of the City Bank. Iri Real time , Either Logo or GRAPHIC is
provided. 16 GRAPHIC is not provided, Convert it into GRAPHIC through SE78.
- : Print as ORIGINAL for the Original and for Copies as COPIES . This is of
B
VVindow Copies. Use the System Variable &SFSY-COPYCOUNT& , Check it
and Print it.
-: Address of the Customer from KNAl and Print the Credit Card No from the
C
Custom Table.
/&i'
2
4y
- : Print the Bank Address , Here in this example, We ar%prinfjgg the fixed
D
----
Address i.e given in the Form Output. In Real time, ~ ~ s s - - , ~ b $ J ~ - ~ ~ ( ~ a n + k
-"
Master Data). - *----
65 ;~ 3 - d
3-
bS
:r % r,g-sz
"-id/
-: Print the Page numbers using the syste
E 4
E d
E:;
$=
:&-
.
45"
"...
gjy-
a{ accordirlg to
Note: Print the Total at Page Le and also Grand Totals
in the Last Page(at the End of the
ned image (GRAPHIC) and
Page 46 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SrnartForn~s@eMAX
We Never Compromise in Quality, Would You?
Create a Custom Table with the below details to Maintain the
Customer Credit Expenses .
Dictionam: Disnlav Table
ji'KE Kftg. v M . active *
.
z E ! L T a b'e. __-..-__-____.-... ....,..... ........., ,. ........... .,,,,.. .... ...... ,,......,,,................. .. ........ ...............
, .. . ,,
, .. ... ...... ........ ...... . . .... ...... . ...... ...... ..... .. ...
. ,
.ShottText 'customer Credit CardPayrn~nt Details
~n&ules , Dellven and blatntenanc nencvi~;antdy ~ ~ e l d.s
Contents -> Create Entries. \
- -
Browser: . - -ZCREDIT-PAYMENTS Select Entries
Data- - - -Table --- --
- - - - .--. -- -- - 8
- - -
p ;a
i I~ a
l ra [st 1 1
~a p :1T i i rwl IT; : ~a], l{B? ps,142
leg - a I~
Page 47 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
- -- - - - - - -
We Never Compromise in Quality, Would You?
Step1 : Execute Transaction SMARTFORMS -> Select Form Option and Provide
Name -> Click On Create.
I SAP SmaFt Forms: initial Screen I
Enter the Description
) SAP Form Builder: Change Farm ZBDEMfBO-CREDIT-CAWDDPAYWIEPdiPS I
Page 48 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?
Double Click On Form(Function Module) Interface
SAP Form Builder: Change Form ZGBENIO-CREDIT-CARD-PAYMENTS
ata to Print Customer
)SAP Farm Builder: Change Form ZCDEMO-CREDIT-CARD-PAYMENTS 1
Click on Tables to Declare the Internals passed from the Driver Program
Enter IT-DETAILS LIKE ZCREDIT-PAYMENTS.
Page 49 of 85 Compiled By : Ganapati Adimulam
eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, wwv.emaxtech.com