You are on page 1of 88

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:$,

;&
&i"i"rrv$w:I k. " '-.'b-.,
y?.,~:;:$$$j&,
.*
%
!
:S;

~:
1
F-.

i,~;z&$+
is,?? .-.. ........
L :: ?.
." (<..>*.;!!:v3r*%f::s
jgy
sss
".
......
fs
::.

OR *......... ..........
,,, >,, :;>&:~;~~,

t-F"iih-,?i
,.?::'d
.............
.%

' .::;..;
;
i.: .a
:
s
,
...........
,:?-& .......... %

.\: ..:>.".+. .;,,< .....................


...... f
.......................
..v *;. .......... '
.-rw.
PC;. .i..;i. r,.
a
'":

,'" *&b37y
B*,
Differences Between SAP script and ~ m a r t ~ i r m s . : ~
I\\

\Y~&,
: ,, Y,, ....
"">
;&*,,,d$.,.
*~&.%~ ~" , <~
.' ~ p
, \, \w$:*-

1 1 1 at the time of Activating- the


Smartform.
7 Paragraph and Character formats are not Paragraph and Character formats - -

I I re usable. I are re usable via 1I


1 1 SMARTSTYLES.

Page 1 of 85 Compiled By : Ganapati Adimulam


eMax Technologies,Ameerpet,Hyderabad
Ph KO:+9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?

Structure of a Form
A form consists of pages, output areas, addresses, graphics (such as company logo, Scanned
Signature Of HR Manager), and data or text contents. Within an output area, you can use static
or dynamic tables to display data or texts in lines, columns, or cells. To further structure and
format text and data, use paragraphs with the paragraph and character formats. In SAP we call
output areas as Windows.

A Form Consists Of :

i) Main Window
ii) Secondary Window
iii) Copies Window
iv) Copies Window

You can position windows anywhere on a page, even overlapping. You can position the
same window (determined by the technical name on several pages of a form, so that the same
contents are displayed on all these pages. You can choose a different size for the window on
each page, except for the main window (Height Should be same in all the Pages).

Page 2 of 85 Compiled By : Cianapati Adimulam


eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.em~xtech.com
SrnartForms@eMAX
We Never Compromise in Quality, Would You?
Main Window

In a main window you display text and data, which can cover several pages (flow text). As soon
as a main window is completely filled , the system continues displaying the text in the main
window of the Same Pagelnext page. It automatically triggers the page break.

You can define only one window in a form as main window. AND the Same MAlN Window can be
Placed up to 99 times on the same page which ranges from MAllVOO to MAIN98.The Data on
MAlN Window always starts printing from MAIN00 and after Completely filled the text will be
extended to MAIN01 , MANIN02 etc.

Note : The main window must have the same width on each page and with in page also when
MAIN01,MAIN02 exists, but the height can differ. -e ~

&&$
Note : A page without main window must not call itself as next page, sin$E?fhis would trigger an
endless loop: In such a case, the system automatically

Note : MAIN Window is used to Print the Dynamic Length


Items, Sales Order Items etc

Note : Text and data that do not fit int


displayed.

Note : Secondary
Address, Vendo

Copies Windows :

Page 3 of 85 Compiled By : Ganapati Adimulam


eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtcch.com
SniartForms@eMAX
We Never Compromise in Quality, Would You?
Note : We can use the system fields SFSY-COPYCOUNT or SFSY-COPYCOUNTO to query whether
the current output is the original or, respectively, which number the copy has.

e If you mark identical Copies SAP Smart Forms buffers the output to increase
performance. Within such a window, any queries of the system fields SFSY-
COPYCOUNT or SFSY-COPYCOUNTO Rave no effects.
If you mark Different Copies SAP Smart Forms generates the contents again for each
copy. You use this option if, for example you want to number your copies consecutively
(Copy 1, Copy 2, Copy 3, and so on).

Final Window : You may want to display or query values on the first page that are
determined only during processing. For example, you may want to name the grand total in the
letter text of an invoice. However, this amount is determined only after listing all individual items.
Or you may want to query on the first page within a condition the total number of pages, which
the system calculates only after processing all pages.

DriverIPrint Program

Reads the Data from


Database Tables and
Pass the Data to
SmartForm via the

Function Module
Generated at the time

Smartfonn and it acts


as the Interface

Note : When you activate the Smart Form, the system generates a unique function module that
encapsulates all attributes of the Smart Form. As soon as the application program calls the
function module, the Smart Form uses the module's interface (which corresponds to the form
interface) to transfer data from Program to Layout.

Page 4 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 Com~romisein Qualitv. Would You?
Note : We Can still write all the data retrieval statements to select further data during form
processing. However, we should not use this method of data retrieval. Especially When We print
mass forms, performance will be degraded considerably.

Note : Use the Driver Program to Retrieve the data and Form to Print the Data Always.

Creating Forms and Printing Data :

Steps to Create Smart Form:


L

Execute Transaction SMARTFORMS


Select Form and Enter the Name for the form and Click on Create

/ I SAP Fonn Builderr Change Fonn ZGDEMO-PRINT-PO

Enter the Description

Notice the Global Settings


L

Global Definitions

Page 5 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?
Form Attributes in Detail : Header Data of the form.

Form ZGDEMO-PRINT-PU Active


Descrlptton D e m o to Prlnt the PO Detalls

General Attributes Output Optlans

Created by SAPUSER Changed by SAPUSER


Date 12.04.2008 Date 12.04.2008
*
Tlme 15'49.55 Tame 16:56:1 7

Package STMP

~anguage
- EN
- - - ...

& ! T O All Languages rlcted Language Control


i .,TO Selected Languages I
(3' Do N o t Translate

Global Definitions in ~ e t a i l :Form Variables, Which Can be accessed from any


window of the Form. \\,

--

Notice that by default, PAGE1 and Window MAIN is Created.

Page 6 of 85 Compiled By : Ganapati Adimulam


eMax Technologies,Ameerpet,J3yderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SrnartForms@eMAX
We Never Compromise in Quality, Would You?
-J

-a
ic'--;a F a r m ZGC=aEblO-PRIINT-PO
G l o b a l Settinas
F o r m Attributes
Fo
G I

%FAG
D, MAIN Main W i n d o w

1 To Create Further PagesNindows

Page 7 of 85 Compiled By : Ganapati Adimulam


eMax Technologies,i4meerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?

m Form Interface
@ Global Definitio
"7 a Pages a n d W i n d

, .

Note :Repeat the above Procedure for each New Pagemindow.

Page 8 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 Coinpromise in Quality, Would You?
ITO Print the Text On the WINDOW 1 :

Displaying of all texts in the form using text nodes. The only exception is addresses, which are
displayed using their own node.

Right Click On the respective Window and Create -> Text

/rp/
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?
F v ~ e of
s ~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~romisein Oualitv. Would You?
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
$ "<.;'.\: ,. *. 4 -
I

Page 14 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?

The tGansaction
,@';;ver)and then

Page 15 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?

printing Data in Tabular ~ o r r n a t


Note : There are TWO Types Of NODESavailable to print the data in Tabular Format.
e The table node :Tables are dynamic because the table size depends on the amount of
data selected at runtime.
The template node : Templates are static because the number of columns and lines
are determined before the actual output.

Note : Line Types are used to Specify the Layout of both node types .
Line Types : Line types are used to construct the layout of templates and tables.

Line Type describes the following attributes bf a table line:

The width of the table line


The number and width of individual cells within

Note : A major difference between


height: line types of templates all h
height of table lines dynamically (d

Line Types for Tables :

The height of a table


included in the ou
depends on the c
is truncated, inste

Define Line Types.

Table Output Using


Line Types

L1 - For Header
L2 - For Body (Items)
L3 - For Footer

Page 16 of 85 Compiled By : Ganapati Adimulam


eMax Technologies,Arneerpet,J3yderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
We Never Compromise in Quality, Would You?

Printing Tables:
Note: The table can cover one or more pages, depending on the number of lines. This is why you
display tables in the main window Always.

SAP Smart Forms divides a table into a Header, a Main area, and a Footer. These output areas
of the table automatically appear as directly inferior nodes of the table node in the navigation
tree.

Right Click on the respective Window->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
" QJ MAIN Main Window
.------ .--- - ------>
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
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 ~%."$, ~??= @N&~ a~m~e
. ,,. ,
You can then use the target field name to display the result. F;i.
. .. . $., .
\
,
,,b @
; @ i
. \"A , *.
, ~ , , \
~
?kf!\ 4.

Possible Automatic Operations ,,,., . ~. \. . ~ f.ssps


P
c;/
.
\, s~ '~. p
;j

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 M a ~ nArea

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 '/ <Field Name> I


'The subtotals are formatted according to the relevant <Field > 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 <WA-Field>


I I

Target Field Name


."'f
Event After Loop
G;l~l

Initialization /
7

(active) -9
k-v9th 4
L

.'=r-,*-&* "**,
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
A"- program. So
."$@
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
We Never Com~romisein 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@@&&<

This to print templates of any complexity in a form.

Page 30 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?

Smart Style in Detail :


Smart Style is the collection of re-usable Paragraph and Character Formats.

Page 3 1 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~romisein Oualitv. Would You?
Note : A Smart Style must be assigned to each Smart Form. Can be done globally for the
entire Smart Form in the form attributes. In addition, you can assign a Smart Style locally to a
node, for example, a text node. This assignment then applies for the entire subtree and overrules
the global settings.

A Smart Style contains :

e Header data containing the default values(Paragraph) of a Smart Style


Paragraph formats including indents and spacing, font attributes, tabs, and outline and
numbering
Character formats including effects (superscript, subscript), barcode and font attributes
Colors and underlines for a paragraph or character format
Preview

Paragraph Formats : A paragraph format contains in


font settings, text color, tabs, numbering and outline.
have a unique name.

To Create :

1. In change mode of the Smart


Creafe.
2. In the Paragraph Format field
3. Select the desired attributes on
4. Choose Acfivafe.

special output attributes to sections

Attributes Of Charact

mart Style, choose the Characfer Formats node and then

2. In the Characfer Formaf field, enter a two-character character key.


3. Select the desired attributes on the individual tab pages.
4. Choose Acfivate.

Page 32 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?

Miscellaneous

Events : You specify an event to determine when to print a particular node.


You can specify events for the following node types :

0 For each node type that offers the Conditions tab


c For headers and footers of table and folder nodes
For control breaks before or after which you want to make a certain output fexample,
subtotals).

Note: Events control the output of the specified node and of all existing infgfior nodes. if you
d:gg/&
specify several events, the system links them with a logical OR. <y~x

Events on the Conditions tab


. , . .. . , . . .,,,, ,,, . ,., , ., . ,

Event

only on first page

n o t on first page
-
I 1 ''

\ .?" ,=
only after end of main Output starts only after all n=within the main window are
window processed. It makes no sense to activate this event for a node
within the main window, since it would never be printed.
1
9 \
\

'\\, , \ \

o n l y before end o f , , OutRut'appears as long as the system stdl processes nodes of


main window '
.
'
the main window. This event is of interest for nodes that appear
i .before or after the main window definition in the navigation tree
-
on print pages that are defined using draft

Page 33 of 85 Compiled BY: Gana~atiAdimulam


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?
Branching Within the Form : Via Alternative.

Helps to process one of two nodes, alternatively (including inferior nodes).

1. Create a node of type Alternative .


2. On the General Attributes tab determine an unstructured condition in the Node
Conditions box. The system offers the same features as in the Outpuf Conditions box on
the Conditions tab.
3. The alternative node has two directly inferior nodes: TRUE and FALSE. Insert your inferior
nodes there.

Note : LOOP able line by line.

taining customer data and an internal table containing


: Use the loop to read the customer data and display it.
dt;use the customer number to display the orders of this
ttfe orders of all customers on one form.

2. Enter a unique name for the node and a description (for example, loop on customer
table).
3. Read the data from an internal table into a work area.
4. Create inferior nodes in which you display the fields of the read table lines.

Page 34 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?

Migrating SAPscript Ifoams".~~delivers Smart Forms for important business


processes. If for your needs no such standard forms exist or if you have your own SAPscript
forms, you can use two tools to migrate them.

Individual Migration

When converting a SAPscript style into a Smart Style, the system converts all paragraph and
character formats with all their properties and attributes without any changes. Thus you can use
the converted Smart Style without making any adaptations.

Note : The system does not migrate the print program (data retrieval) or the form logic contained
in the print program. You must make the required changes to the respec
yourself.

Migrating a SAPscript form

1. Go to the SAP Smart Forms initial screen (transaction


2. In the Form field enter the name of the Sm
3. Choose Utilities + Migrate SA Pscript form.
The dialog window
4. Enter the name and the
5. Choose Enter.
This takes you to the

U p l p a d Form
Download Form

Display Change I--/ cs


-.
Create

Page 35 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?

D/ 6 FOOTER Footer lines


L& la HEADER Header linesllogo

~nvertinga SAPscript style

Page 36 of 85 Compiled By : Ganapati Adimulam


eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 45976727, Cell No: 99484 44808,98490 34399, ivww.emaxtech.com
SrnartForms@eMAX
We Never Compromise in Quality, Would You?
Mass Migration of SAPscript Forms

1. Execute the Standard Program SF-MIGRATE.


2. Select the names and the language of the SAPscript forms and choose Execute.
The system creates the Smart Forms under the names of the SAPscript forms plus
the extension -SF and It also displays a list of the migrated forms.

Form Logic: In the Form Builder you describe a Smart Form by a set of nodes.
To do this, you build up a tree structure on the left side of the user
interface:

es of a node according to other rules (for example, in a loop).

You use the form logic to control the flow of the form output. The following rules apply throughout:

1. The nodes in the tree structure are processed from top to bottom. This is easier to
understand.
2. For each node there is a tab page, which you can use to link the node to a condition. If
the condition is true, the system processes the node. If not, it skips the node and all its
inferior nodes.
3. You must define a next page for each page. However, you can also go to other pages
dynamically .

Page 37 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?

Example for Form Logic


The diagram below shows the tree structure of the root node Pages and Windows:

NodeElementary node

N o d e on same level a s n o d e s 7 and 9

Superior node of node 8

Inferior n o d e s o f n o d e 5

Note : A nodep)flo&n
\\
inferioi node $ also called elementary node. Elementary nodes
can never havg inferJor nodes. If the condition of node 7 is false, neither node 7 nor node 8
o'c'essing rcesumesdirectly with node 9.
Ji
Overview o f rent ::*
*+A
Mode Types :
-@!,;7
When a Smart Form is Created, the tree structure of the Form Painter already contains two root
nodes: 1.e i) Global Settings ii) Pages and Windows.

You use the inferior nodes of the Global Setfings node to maintain Form Attribufes, the
Form Interface, and Global Definitions.
You use the inferior nodes of the Pages and Windows node to create the pages of your
form, position elements on these pages, and determine the sequence in which you want
to process these elements.

Page 38 of 85 Compiled By : Ganapati Adimulam


eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99484 44808,98490 34399, www.emaxtech.com
SmartForrns@eMAX
We Never Compromise in Quality, Would You?
-
Inferior Nodes of Node Pages and Windows

Nodes and the other inferior nodes:


....... .. ...... . .... . ... ...... .. .. . .. ... . . . .... .... .. .. . ... . .. . .. ..

~escription 1 Possible Directly Inferior


' Modes
; ;1 . .. .. . , . , . . ., 1 , , . , ~ ... .".., ~ .,.

A page of the form. Directly inferior


nodes of this node can be placed

Main window
Secondary window
Copies window
Final window

Elementary Nodes (Without lnferio

phics in the form. To include background

All except window, page, table,


and template nodes

odes, loop nodes,

Page 39 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~romisein Oualitv. Would You?

ou use this node to print a table cell of

Flow Control

p-i Node T y p e ~ ~ ~ e s c r i p t i o n

Command . You use this node to execute


i commands (next page, parag
numbering, printer control)
!-- r--...---...-- ...............

i I @
n/Alteriitive
............ i You use this node to process inferior
nodes repeatedly.

YOU use this node topran


--

on a condition. e nodes TRUE

1 ....... . . . .
,
:
$,
. \
\,'.',:,:::'~.,,\.\
Other Nodes

All except window and page


nodes

All except window and page


nodes

(no inferior nodes)


program code (for example, conversion
routines).

Page 40 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?

Printing System Fields :


The following rules apply for system fields:

e You can display the values of any system fields in the form
e YOUare not allowed to assign values to system fields (in program lines nodes)
You can query all system fields (for example, in conditions) except SFSY-
FORMPAGES and SFSY-JOBPAGES . You can query SFSY-FORMPAGES only
within final windows.

Note: All System Fields of Smart Forms are available in Structure SFSY.

/FieldDescription
:
;/ Displays the date. \ \ . ,
\

&SFSY-TIMEL L G h e time of day in the form HH:MM:SS.

&SFSY-PAGE&
i
1

FORMPAGES&

JOBPAGES&

-
&SFSY-

you can use this field to suppress output that is intended only for these
output formats (for example, pushbuttons).
I I
&SFSY- Queries whether the original is printed or which number the copy has.
COPYCOUNT& COPYCOUNT = 1 : orginal, COPYCOUNT = 2 : first copy; COPYCOUNT =
3: second copy, and so on.
" * *
r r------
&SFSY- Queries whether the original is printed or which number the copy has.
COPYCOUNTO& COPYCOUNT = 0 : orginal, COPYCOUNT = 1 : first COPY;COPYCOUNT =
2 : second copy, and so on.

I - F G c a n query in program lines nodes. This enables

Page 41 of 85 Compiled By : Ganapati Adimulam


eMax Technologies,Ameerpet,Hyderabad
Ph No: +9140 -65976727, Cell No: 99q84 44808,98490 34399, www.emaxtech.com
SmartForms@eMAX
We Never Compromise in Quality, Would You?

11 you to react dynamically to error situations during output. Up to now, this


field can be used only for include texts and text modules: 11
i
b~

e
SFSY-SUBRC = 0 :Text module or include text found and
printed

SFSY-SUBRC = 4 :Text module or include text not found


!
I Logon name of the user who prints the form.
KY-"SERGE -- 1
4'
When using the fields &SFSY-FORMPAGES& or &SFSY-JOBPAGES@, you must keep
<
4
P
-
all output
- -
pages in the main memory till the end of the form or the pr~nt~job
-
to allow these
fields to be replaced with their respective values. For large fo
require a huge amount of memory space.
t

Output Options for Fiel

You can use the Formaffing options to printing it. You can enter
the relevant parameters directly behin viations of the different
options in uppercase letters.

indi~d%k%:~~ositive sign. To suppress it, use the formatting option s.


>) ~~ecifl~d,~i,si&nored.
Q ~ T ~ . ~ ~
#/
thsj', sign to the left(<), suppress blanks (C), right-justified

By default, the system displays the value of a field in its overall length, but truncates trailing
blanks.

Sequence of evaluation: suppress blanks (C), <offset> and (<length>), 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+<offset>& Skips offsets (<offset>) in the field value (character fields only). If
the offset is greater than the length of the value, nothing is
displayed.

I &field(<length>)&
7- 7
/ Sets the output length to <length>. 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<nat.number>)&

&field(T)&
ponent <nat.number>.

1 &fe
id
l (Z)&- / 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)& ~ight~justified
display. Use this option only when specifying an
.. ...... .... .. ... . .. .. . ... . . ... . ... .. .. .. . . . .. .. .. . ... .. ... . . . .. . ....

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.
corn ,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.

B : Print as ORIGINAL for the Original and for Copies as COPIES . This is of
-
VVindow Copies. Use the System Variable &SFSY-COPYCOUNT& , Check it
and Print it.

C : Address of the Customer from KNAl and Print the Credit Card No from the
-
Custom Table.
/&i'
42y
D : Print the Bank Address , Here in this example, We ar%prinfjgg the fixed
-
Address i.e given in the Form Output. In Real time, ~ ~ s s - - , ~ b $----
J~-~~(~an+k
- -"
Master Data). ;~ 3 - d
3-
65 bS
*----
:r % r,g-sz
"-id/

-
E : Print the Page numbers using the syste 4
EE:;d

$
:&=-.
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~ntDetails

~n&ules , Dellven and blatntenanc nencvi~;antdy ~ ~ e l d.s

Contents -> Create Entries. \

Data Browser:
- - - - - - .-- ---- -- - - - .--. -- Select Entries
Table ZCREDIT-PAYMENTS -- - 8- - -
i;aI~
p ~a
leg p-: la,ral{B?
a1T i i rwl IT; : ~a] [stps,14
121 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

You might also like