Adobe Forms From Scratch
Adobe Forms From Scratch
Creating PDF:
Using transaction 'SFP' to go to Form Builder or through SE80 (to create an interface
and then the form).
Before creating a PDF, you need to have an interface which contains all the fields which
you will be using in the form.
Hence before creating a form you need to create an Interface and assign this interface
in the pop-up, which comes while you create the respective form.
SFP stands for SAP Forms Process.
Structure of PDF Form:
Form interfaces and form contexts with layout are called as form objects. These are
different transportable object types. The same interface can be used
by multiple forms (like say in purchasing order, scheduling forms etc).
Enter transaction SFP and you go to the screen shown in the next Figure.
As we have activated the interface, now we can create a form and assign this interface
to the form. For that, return back and create the form as in fig below.
Global Definitions:
Use
Global definitions belong to the interface in the Form Builder. Here, you have the
option of defining your own fields to be used anywhere in the form. You can initialize
global data before you start to process the form, for example, to convert
selected application data.
Features
Global Data
Here, you define any data needed by the form, but which has not been provided by
the form interface (for example, to display totals).
Types
Here, you create data types as free ABAP code, if the ABAP Dictionary does not
provide a type.
Field Symbols
You can use field symbols as pointers when you extract data from internal tables.
Initialization:
Use
You can initialize global data before you start to process the form, for example, to
convert selected application data.
Prerequisites
You have defined global data.
Features
You use the ABAP Editor to write the program code (Code Initialization) that
is executed before the form is processed. You can include subroutines (Form Routines)
when you do this.
Specifying a Currency or Quantity Reference:
Use
In the ABAP Dictionary, you can assign a currency or quantity field to a table field. In
the output of these fields, the system can then insert the relevant currency or
unit.
If the value field is in the same table as the corresponding currency or quantity field,
the system recognizes the reference automatically, and formats the value field
according to the currency or unit in the assigned field.
If the value field is in a different table from the currency or quantity field, the system
cannot recognize this reference automatically.
Creating the Form
Assigning Interface
In the dialog box that pop up, assign the interface, which you need to use (the one
that you have already created and activated) as in fig below.
Conditions
Use
1.You can define conditions for individual nodes, or for whole subhierarchies of the
context.
2.A node, or all its subnodes, is then only processed if the related condition is met.
3.To select from two alternative subhierarchies in the form output, use the alternative
node.
Prerequisites
A node exists for which you want to define conditions. This node must allow conditions
to be defined.
Features
You can define conditions using logical relationships.
Layout
Once the required parameters are included in the context, you can now go to the layout
to design the form. Click in the tab 'Layout' and you get the screen below,
which is basically the Adobe designer.
1.You create the body and master pages for the form design in the Layout Editor.
2.You can also view and edit the form design and preview the form (the form that the
user will work with) in PDF.
3.The Layout Editor contains four tabs: Body Pages, Master Pages, XML Source, and
PDF Preview.
Types of Form layout
Live Cycle Designer offers two types of form layout techniques for you to work with:
Static layout :
These forms have fixed layouts. When presented to the end user, the form retains its
original layout, regardless of the amount of data available to fill the form.
Dynamic layout :
A form with a dynamic layout is designed to expand or shrink according to the amount
of data available to fill it.
What's in a form design?
The following key components make up a form design:
1.Master pages
2.Body pages
3.Content areas
4.Subforms
5.Fields
6.Boilerplate objects
Master Pages
Every form design contains at least one master page that Live Cycle Designer
creates automatically.
Master pages define the orientation and dimensions of body pages.
Master pages are responsible for formatting body pages.
Provide a background and layout format for more than one of the body pages in a form
design.
Each master page is created with a default content area that covers the whole page.
Body pages
Body pages represent the pages of a form.
Each body page derives its page size and orientation from a master page.
Each body page is associated with the default master page that LiveCycle
Designer creates.
You can choose which master page to assign to a body page.
Content areas
Content areas define where objects can be placed or laid down on body pages.
When you design a form, you cannot place an object on a body page unless it is inside
the area bounded by a content area.
You can add content areas to master pages only.
Sub Forms
Subforms are container objects that you can use to group form design
objects including: fields,address,images etc.
A subform provides anchoring, layout, and geometry management for objects.
You can also configure subform objects to be repeatable.
Field objects
In layout there are number of field objects that are capable of capturing, merging, and
displaying data like
1.Button
2.Check box
3.Date/time field
4.Drop-down list
5.Image field
6.Text field
7.List box
8.Numeric field
Boilerplate objects
Boilerplate objects are read-only objects that improve the aesthetic appeal of a form
and may provide context or assistance for users. They can be added to
body pages or master pages.
The following objects are boilerplate objects:
1.Circle
2.Image
3.Line
4.Rectangle
5.Text
About Palettes
If you are not seeing any palettes at either ends, then search them in the field 'Palettes'.
(Fig Above)
Palettes provide easy access to the tools without cluttering your workspace. Palettes
can include one or more tabs, each containing common properties.
For example, all objects are stored in the Library palette. As you can see in
the following figure, the objects are further grouped into tabs.
You can arrange the palettes in the workspace to suit your work style. For example,
you can hide the rarely used palettes and move the frequently used ones
into one palette window.
Palettes continued..
The Data view palette contains the parameters and structures that we have defined in
the context level.
(Here the parameter - 'EMPLOYEE_NAME'). The hierarchy palette contains the flow with
which we have defined the fields in the layout. All the objects /
fields which you use in the layout design are reflected in the hierarchy. By default, the
hierarchy contains a master page and the body page. You place
the fields in the layout by dragging them from the Data view palette.
(refer the fig: below).
The properties of all objects in the layout are maintained in palettes - 'Layout', 'Border',
'object' and 'Accessibility'.
Designing of the form can be made, at your comfort level, by setting the scales and
measurements in the palette 'Drawing Aids'.
Hierarchy Palette
The Hierarchy palette is a graphical representation of the contents in the Body Pages
and Master Pages tabs. The palette also displays referenced objects
under the Referenced Objects node. A referenced object is an object that is only added
to a form when it is required.
Data View Palette
You can create the content of a form design to correspond to a data source.
Library Palette
The Library palette contains all the objects that you can add to a form design.
Objects are organized into groups.
Each group is contained in a tab labeled with the group's name.
Object Palette
Use the Object palette to modify properties that are specific to the selected object. The
object that is selected in the Layout Editor determines which tabs
are available in this palette.
Border Palette
Use the Border palette to edit the border properties for objects in the form design. You
can edit the borders individually (left, right, top, and bottom) or together.
You can also specify the type of border corner and background color.
Accessibility
Use the Accessibility palette to specify custom text for an object that a Microsoft Active
Accessibility (MSAA) compliant screen reader reads as it passes through the
form. If custom screen reader text is available for the object, the screen reader will
read the custom text and not the tool tip.
Layout Palette
When you select an object on a body or master page, the Layout palette automatically
displays the selected object's settings. Any changes that you
make to the settings in the Layout palette are applied to the selected object.
Similarly, you can edit most of an object's layout settings directly in the Layout Editor.
For example, to change an object's position, you can drag it to
the new location on the page.
Integration into ABAP Programs.
The 5 basic steps involved are -
1.Data retrieval in the report programme.
2.Call Function 'FP_FUNCTION _MODULE_NAME( to get the generated
function module name).
3.Call Function 'FP_JOB_OPEN '.
4.Call Function <generated function module name>.
5.Call Function 'FP_JOB_CLOSE'.
If you need to have copies of the same form to be generated, you may call
the function module by using (do ('n' times) - enddo) loops.
There are standard test forms for training provided by SAP. Search "FP*"
in the SFP transaction.
Demo of Print Program for executing PDF Forms.
DATA: CUSTOMER TYPE SCUSTOM,
BOOKINGS TYPE TY_BOOKINGS,
CONNECTIONS TYPE TY_CONNECTIONS,
FM_NAME TYPE RS38L_FNAM,
FP_DOCPARAMS TYPE SFPDOCPARAMS,
FP_OUTPUTPARAMS TYPE SFPOUTPUTPARAMS.
* PRINT:
PDF-based print forms are a part of the Interactive Forms based on Adobe
software package solution and are used for mass printing in SAP systems. as
well as normal output on printers, and also the choice of archiving documents,
you'll be able to additionally use your application to send a PDF to the Business
Communication Services (BCS). Here, you've got the choice of faxing or e-
mailing your documents.
The following provides you a summary of how a PDF-based print kind is
structured and additionally tells you the way to create a PDF-based print from
within the development setting of the ABAP work bench. The integrated Adobe
LiveCycle Designer software system supports you after you do that. This
software system should be put in on your forepart before you'll be able to
produce a layout. to visualize a print preview of your kind, you initially got to
install Adobe Reader or an entire version of Adobe athlete.
This documentation doesn't discuss however documents are written and
controlled on printers. Instead, it discusses the total method up to once a file is
shipped to output management functions, like the spool system in SAP systems
(for a lot of info, see SAP Printing Guide (BC-CCM-PRN)).
Objectives
Context
Context Define which parts of the interface to be used in a particular form and
Add elements like text modules or images into the form.
Layout
The layout is Consists of static elements and dynamic elements
SAPScript/SmartForms
SAP Adobe from support Data selected from the SAP database tables like
master data and transactional Data
SAP Adobe from support Data provided by the SAP system or by the PDF-
based print forms solution like User input and System variables, for
example, sy-datum,sy-uname etc.
SAP Adobe from support Data that has been coded into the program like
Totals and summations and concatenated values
In the form interface, specify the data that is exchanged with the
application program (such as tables)
Under Global Definitions, define the needed fields
Interface
Code Initialization
Context Define which parts of the interface to be used in a
particular form and Add elements like text modules or images into
the form. Context is consists of Interface, Properties of interface
fields and the properties, Details and conditions of context elements
Context
In Context, we can bind the table so the report loop the table to
display results.
Conditions
Sap Adobe Forms also support Including Texts
In a form context, four types of long texts can be included
Addresses from the Business Address Services
Text modules (Smart Forms texts)
Include texts (SAPscript texts)
Dynamic texts
Layout
Layout Style
Data Binding
SAP Adobe form allows the data binding we can Association between form
template and data source and Created automatically through drag & drop from
Data View and Can be created manually
Data binding
Adding Images
Static Texts with Floating Fields
Data retrieval and processing is normally used to data the data from a
database or from the internal table which we want to show to report.
After getting the data find out name of generated function module and
CALL FUNCTION ‘FP_FUNCTION_MODULE_NAME'
In order to Start form processing, we will CALL FUNCTION ‘FP_JOB_OPEN’
To End form processing CALL FUNCTION ‘FP_JOB_CLOSE'
it's good to use subforms because Used to organize different element like text
fields, attributes, and tables and Can be laid down only in the content area of a
master page and Contents of subform can be protected against a page break.