Upload
sumeetp87
View
144
Download
4
Tags:
Embed Size (px)
DESCRIPTION
Learn basics of sap adobe form
Citation preview
© 2005 IBM Corporation
IBM India Pvt. Ltd.
Confidential | 24.06.07 © 2006 IBM Corporation
ADOBE PRINT FORMS
Hemant Sharma
SAP ABAP - E61
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 2
ABAP Programming Background
Knowledge of SAPscript / SmartForms (Recommended)
Adobe Live Cycle Designer
SAP ECC5.0 (or higher)
Adobe Reader (7.0 or above)
Required and Reccommended :
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 3
Transaction SFP
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 4
Tools Involved :
Interface
Form Template (Context and
Layout)
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 5
Interface
Defines which data a program can possibly pass on to a form.
Contains Global data and initialization coding
Is reusable (a repository object)
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 6
Interface
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 7
Interface
Import and Export Parameters
Import parameters can be passed
from the application program to the
form at runtime, and vice versa for
Export parameters.
Exceptions
These can be raised in ABAP
Coding of the form.
(The exception is actually raised in
the generated Function Module)
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 8
Interface
Global definitions
Global Fields (Data)
Field Symbols
Global Types
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 9
Interface
Initialization
Initialization is the ONLY time when ABAP coding can be executed.
Both input and output parameters are passed by reference, therefore the changes are
permanent.
The system fields need not be declared but can be used directly.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 10
Interface
Form Routines
Here, we define the subroutines declared in the Code Initialization part.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 11
Interface
Currency and Quantity Fields
ABAP distinguishes between the internal and external representation of
currencies and quantities.
Whether or not decimals are included in the output format depends upon the
Reference field of the amount.
Since SAP Netweaver’04, a reference field should explicitly be given for all
currency and quantity fields which are to be printed in the form.
1000 10.00 USD ?
1000 JPY ??
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 12
Form Template
Properties
Context
Layout
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 13
Form Template : Properties Tab
Description of the form
Name of the interface to be used
(Double click to display / change)
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 14
Form Template : Context
The context area
contains those
elements which will
be available in the
layout.
These fields are a
subset of the interface
and can include
additional elements
like graphics and
texts.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 15
Form Template : Context
Drag and drop the
required fields
Create folders
Add Text nodes,
Graphics, Address
nodes and
Alternate Nodes
etc.
Set various nodes
to Active or
Deactivate state.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 16
Form Template : Context
Creating Text
Modules
Create a Text Module
using transaction
SMARTFORMS
Include in the context
by creating a text node
and assigning the Text
module to the node.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 17
Form Template : Layout
On choosing the
Layout tab ,
Designer is called
up.
Designer workspace
consists of 4 main
areas :
Layout Editor
Palette Window (2)
Script Editor
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 18
Form Template : Layout
Data View and Hierarchy
Palettes
Data View palette displays all
active context nodes .
The Hierarchy palette shows in a
tree everything that has been
included in the layout.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 19
Form Template : Layout
Library palette lists all the various objects which can be included (by dragging and dropping) on the form pages, like Date and Time fields, Page number, Geometric objects like rectangles, lines etc.
Font and Paragraph palettes allow adjustments to text fields or static objects.
Border palette helps determine the edges and/or background fills. Layout palette allows to position and resize the object. For dynamic texts, the Expand to Fit option prevents truncation of
dynamic text. Object palette includes the Field, Value and Binding tabs.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 20
Form Template : Layout
Master Page Every form layout
contains at least one master page.
Static objects are
usually put on a master page, which appear on the resulting page at runtime
Page orientation and size is decided in the Object palette of the master page.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 21
Form Template : Layout
Master Page : Content Area
The Content Area defines the size
to be used for dynamic output.
Content areas can be included
ONLY on the Master Page.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 22
Form Template : Layout
Master Page : Multiple Master Pages
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 23
Form Template : Layout
Body Pages
Dynamic Content is wrapped up in
Body pages.
It uses the space provided by a
content area.
The content can flow to the next
page (In the next content area), if
at runtime, the space in a body
page is not sufficient.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 24
Form Template : Layout
Body Pages : When should you insert a new body page?
When you want to make clear that a new page starts here (make
sure to say so!)
When you want to make sure you want to lay down a Subform on a
particular master page
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 25
Form Template : Layout
Subforms They are placeholders for grouping several objects. Can be laid down only in the content area of a master
page. If of type Position Content, objects of subforms can
be laid down at their exact position at runtime. (Hierarchy position of objects not relevant for layout position)
If of type Flow Content, the objects will follow each
other, depending on which space they require at runtime.
Contents of subform can be protected against page
break. Two consecutive subforms can be protected against
page break.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 26
Form Template : Layout
When to include Subforms ??
if you want to output the element
repeatedly (type Flow Content)
if you want to visually group
objects
if you want to keep objects
together (protect them against
page break)
if you want to hide several
elements at once (scripting
required)
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 27
Form Template : Layout
Including Tables
The Body Page main subform
Content property must be set
to Flowed.
If this is not done, we will not
have multiple pages print out!
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 28
Form Template : Layout
Creating Tables
Drag and drop a table (an internal table) from the Data View to the Layout Editor.
Deactivate the fields which are not be used in the Form Context.
2 subforms are created : outer and inner subforms.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 29
Form Template : Layout
Tables : Creating Header
In the Hierarchy, mark the outer subform and choose the Insert Subform option from the context menu.
Set the subform type to Flow Content and set Flow Direction to Header.
Insert one static text into subform for every column Enter text and set details like height, shading and frames etc.
Deselect Repeat Subform for header.
Set same margins as for the table.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 30
Form Template : Layout
Table : Body Rows
Table body rows are bound to the data in the table.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 31
Form Template : Layout
Necessary steps to make sure internal table is printed as a form table :
Check that the outer subform is of type Flow Content with Flow Direction
set to Table.
Deselect Repeat Subform for each data Item.
If all the content should be printed one page, deselect Allow Page Breaks
within Content option. In case of insufficient space on current page, an
automatic page break is inserted and table starts on the next page.
Make sure that the inner subform is of type Flow Content with Flow
Direction set to Table Row.
Deselect Allow Page Breaks within Content option.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 32
Form Template : Layout
Scripting
Scripts can be attached with all kind of non-static objects (i.e. apart form content areas, static texts and images and graphical elements).
Scripting can access ALL objects of form including the static ones.
Can be done either in Java Script or in Adobe’s FormCalc.
We can choose between different events to determine when the coding will be executed.
Goto C:\Program Files\Adobe\Designer 7.0\Documentation\EN\FormCalc.pdf for a reference to FormCalc language reference.
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 33
Form Template : Layout
Suggested Approach
Create the master page first.
Look for data that belongs to the background of the page
Set your content area
Divide the form information / data into
Header (master page)
Form content (body page)
Footer (master page)
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 34
Online help
http://help.sap.com/saphelp_nw04/helpdata/en/c8/4adf7ba13c4ac1b460
0d4df15f8b84/content.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9e/f9cc9f942a4359
91f4f9e08cce1876/frameset.htm
C:\Program Files\Adobe\Designer 7.0\Documentation\EN\Designer.chm
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 35
THAT’S IT !!
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 36
QUESTIONS ??
IBM India Private Limited
Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation 37
THANKS A LOT !!