Adobe Print Forms

Post on 25-Oct-2014

164 views 9 download

Tags:

transcript

© 2005 IBM Corporation

IBM India Pvt. Ltd.

Confidential | 24.06.07 © 2006 IBM Corporation

ADOBE PRINT FORMS

Hemant SharmaSAP ABAP - E61

2

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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 :

3

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

Transaction SFP

4

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

Tools Involved :

Interface Form Template (Context and

Layout)

5

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

Interface

Defines which data a program can possibly pass on to a form. Contains Global data and initialization coding Is reusable (a repository object)

6

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

Interface

7

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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)

8

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

Interface

Global definitions Global Fields (Data) Field Symbols Global Types

9

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

10

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

Interface

Form Routines Here, we define the subroutines declared in the Code Initialization part.

11

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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

12

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

Form Template

Properties Context Layout

13

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

Form Template : Properties Tab

Description of the form Name of the interface to be used

(Double click to display / change)

14

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

15

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

16

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

17

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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

18

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

19

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

20

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

21

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

22

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

Form Template : Layout

Master Page : Multiple Master Pages

23

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

24

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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

25

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

26

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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)

27

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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!

28

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

29

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

30

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

Form Template : Layout

Table : Body Rows

Table body rows are bound to the data in the table.

31

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

32

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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.

33

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

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)

34

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

Online help

http://help.sap.com/saphelp_nw04/helpdata/en/c8/4adf7ba13c4ac1b4600d4df15f8b84/content.htm

http://help.sap.com/saphelp_erp2005vp/helpdata/en/9e/f9cc9f942a435991f4f9e08cce1876/frameset.htm

C:\Program Files\Adobe\Designer 7.0\Documentation\EN\Designer.chm

35

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

THAT’S IT !!

36

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

QUESTIONS ??

37

IBM India Private Limited

Adobe Print Forms | Confidential | Hemant Sharma © 2006 IBM Corporation

THANKS A LOT !!