Adobe Interactive Forms
Adobe Interactive Forms
Unit 2. Interface
Types of an Interface
During initialization, data coming from the program can be changed before it is sent to
the form. In forms that have not been migrated from Smart Forms, initialization is the
only time when ABAP coding can be executed.
Unit 3. Context
The screen on the Context tab of transaction SFP is split into four areas:
Interface: all fields that are displayed in the Interface area (all interface fields
plus the system fields sfpsy-date, sfpsy-time, sfpsy-username, sfpsy-subrc) can
be selected for the context by dragging and dropping them there. If your
interface is compatible with Smart Forms, you will have the Smart Forms
system fields (SFSY-...) instead.
Context: The context area contains those elements that will be available in the
form layout. These fields are a subset of the interface, and include additional
elements like graphics or texts. You can create new elements by right-clicking on
the context.
Properties of interface field: Double-clicking on a field from the interface will
display its details in the bottom left area.
Properties/details/conditions of context element: Double-clicking on an element
from the context will display its details in the bottom right area. For example,
you would set the source for an image or the name of an external text here.
With regards to PDF-based forms, the main difference between Text Modules and
SAPscript Texts is that text modules are client-independent and have an automatic link
to the Transport Organizer, whereas SAPscript texts are client-dependent and must be
manually included in a transport request.
Adobe Interactive Forms (Joan Ayala)
Unit 4. Designer
Masterpages
Every form design contains at least one master page that Adobe LiveCycle Designer
creates automatically. You can put objects on a master page that will appear on any
resulting page at runtime, for example, your company logo. Such objects that never
change are called boilerplate objects.
Everything that is on an (abstract) master page will reappear on every (concrete) body
page. To some extent, the boilerplate objects of a master page could be compared to
secondary windows in SAPscript or Smart Forms.
On a master page, you must include at least one content area. This defines the size to be
used for dynamic output. Content areas can be included only on master pages.
Dynamic content is wrapped up in body pages. A body page will use the space provided
by a content area. If, at runtime, this happens not to be sufficient due to a large amount
of data, the body page will look for the next content area (which might involve an
automatic page break).
You should think of a body page as nothing more than a wrapper or a container for
dynamic content. So you might have one single body page in a form with lots of items
at runtime; consequently, the printout would have many pages.
To some extent, the combination of a content area and a body page included there could
be compared to the main window in SAPscript or Smart Forms. (Note, however, that
this is only a very rough equivalent!)
For further organising body pages (or, though rarely, master pages), they can contain
subforms. It is a good idea to always start out with the static part of a form: the master
pages.
Adobe Interactive Forms (Joan Ayala)
Body Pages
A body page is a top-level subform. It serves as an organising unit for dynamic content
and can be laid down only in a content area of a master page. Make sure to have its
place set to Top of Next Page (which will take the next master page from the hierarchy)
or Top of Page... if you want to start a new page.
For the first body page, the place Following previous actually means to start with the
first master page in the Hierarchy. If you set a body page.s place to On Page <Master
Page>, there are two possible scenarios:
If the preceding subform was already laid out on that master page, the body page
will follow on the same output page (provided there is enough space).
If the preceding subform was laid out on a different master page, a page break
will be inserted and a new output page will begin using the desired master page.
To display the terms and conditions on a separate page with a special layout, you need
to define an extra master page (let's call it TERMS) and create a new body page. For the
new body page (which is, like all body pages, a subform), choose Top of Page →
TERMS for Place.
Instead of creating a new body page, you could tell the previous subform to go to the
top of page TERMS after it has been laid down. (But it is a good a idea to have a new
body page for every forced page break . this helps to read the Hierarchy palette more
easily.)
Subforms
Adobe Interactive Forms (Joan Ayala)
If you want to make sure that certain objects appear on one page, proceed as follows:
1. Mark the objects.
2. In the Hierarchy, choose Wrap in subform from the context menu.
3. Disallow a page break for this subform. You do this on the Object palette, Subform
tab. Deselect Allow Page Breaks within Content.
This option is not available on a master page or if the subform itself is included in
another subform of type Positioned. You can also prevent a page break between several
subsequent subforms. On the Object palette, Pagination tab, select Keep w/ith Previous
and/or Keep with Next.
Keep with Previous: Keeps the subform on the same page as the previous
subform, content area, or body page, depending on which one is selected in the
Place box.
Keep with Next: Keeps the subform on the same page as the next subform,
content area, or body page, depending on which one is selected in the Place box.
Unit 5. Layout
Floating Fields
Adobe Interactive Forms (Joan Ayala)
Sometimes it is necessary to include fields in static texts. For example, you want to
avoid something like .Dear sir or madam. and rather address your customers with their
real names. You achieve this by using floating fields:
1. In an existing static text, set the cursor to the position where the floating field should
be inserted.
2. Choose Insert → Floating Field for every field that you want to integrate.
3. Within the static text, place the cursor on one of the text fields just created (make sure
it is marked). Then, in the Object palette, Binding tab, enter the appropriate data
binding. It is safest to do this by clicking on the small triangle to the right of the Binding
field and then choosing a field from the form context.
4. Do not be confused that in the Hierarchy, the floating fields appear as individual
elements; it is not discernible that they have been included in a static text. To make
things a bit clearer, you might want to specify a meaningful name for the fields. You can
do so by right-clicking on them and choosing Rename from the context menu.
From the form printing perspective, every ABAP application program consists of the
following parts:
1. The business data is selected from the database, which is by far the most
comprehensive part. Additional calculations should also be done here, as the
form should contain as little calculation as possible. The idea of Enterprise
Services Architecture implies that no additional data is selected from within the
form. For performance reasons, you might want to find out which fields are
actually used in the form. Call function module FP_FIELD_LIST. It will return a
single-column, internal table with the names of the fields (in the case of
structures, the individual fields will be listed).
2. The name of the function module generated for the form must be determined, as
the name differs depending on the form and system. Call the function module
FP_FUNCTION_MODULE_NAME and pass the form name to it.
3. and 5.: If you call a form with the new interface, you must explicitly open and
close form printing. Call function modules FP_JOB_OPEN and
FP_JOB_CLOSE to do so.
4. Within the bracket of FP_JOB_OPEN and FP_JOB_CLOSE, call the form's
generated function module as many times as needed. Several PDF documents
will result, which will be separate parts of one spool request. Using transaction
SP01, you can print them individually or separately. Note, however, that it is not
possible to mix Smart Forms and PDF-based forms in one job.
If you have migrated a Smart Form to a PDF-based form, you might want to reuse your
old application program without having to change it. This is possible because function
module SSF_FUNCTION_MODULE_NAME (that is, the Smart Forms equivalent to
FP_FUNCTION_MODULE_NAME) has been enhanced so that it can look up whether
a Smart Form should be used or whether a migrated Smart Form, that is, a PDF-based
form, should be used. Parameter fm_name will automatically contain the name of the
appropriate generated function module. Since this generated function module is always
called dynamically, no changes in the application program are necessary.
Please note that some parameters that are possible in a Smart Forms-compatible
interface can no longer be used in a meaningful way.
For details, see the Smart Forms documentation.
Adobe Interactive Forms (Joan Ayala)