Sei sulla pagina 1di 6

Adobe Interactive Forms – from SmartForm (Joan Ayala)

Unit 2. Interface
If you create an interface to be used in an ABAP print program, you should choose
“ABAP Dictionary based”. While it is possible to use the Smart Forms compatible
interface type (for the sake of keeping an old print program without changes), it is not
recommended to do so because:
 You will get wrong print parameters (for example, for the cover page) and
XSF/XDF parameters that cannot be used any more
 If the spool job contains several PDF documents, you will get only one back
 Only the “ABAP Dictionary” interface will allow you to determine settings for
the Business Communication Service

If an interface is compatible with Smart Forms, you might also have tables parameters.
You should use them only if you have an internal table that needs to be changed with
ABAP coding within the form.

In the global definitions, you have the following nodes:


 Global fields: You can set the values of global fields by specifying a default
value or by using initial ABAP coding. In migrated Smart Forms, you can also
use them in program line (ABAP) nodes. Global fields can be integrated in the
form layout
 …

Unit 3. Context
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 – from SmartForm (Joan Ayala)

Unit 7. Integration into ABAP


Programs

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.
If you call a form with the old (Smart Forms-compatible) interface, these two function
modules must not be called. (Otherwise, the program will terminate with an error.)
Starting and ending is implicitly achieved by calling the generated function module that
uses the old interface type.

Reuse of Smart Forms Application Programs

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
Adobe Interactive Forms – from SmartForm (Joan Ayala)

appropriate generated function module. Since this generated function module is always
called dynamically, no changes in the application program are necessary.

How do you tell SSF_FUNCTION_MODULE_NAME which function module to


return? After migrating a Smart Form to a PDF-based form, run transaction
SMARTFORMS and choose Utilities→Migration→PDF-based Form→Switch
Runtime. This will create an entry in an administration table (STXFPCUST) with the
name of the old Smart Form and its new PDF-based replacement. This entry will
automatically be evaluated by SSF_FUNCTION_MODULE_NAME.
You could also create new PDF-based forms (with Smart Forms-compatible interfaces),
and use them in old application programs. However, it is recommended to use the new
technology for both form and application program.
If your form uses a Smart Form-compatible interface, the generated function module
will have different parameters.
Here are some of the import parameters:
 control_parameters: Amixture of /1bcdwb/docparams and of the equivalent of
FP_JOB_OPEN's ie_outputparams.
 output_options: Spool settings
 user_settings: If 'X', the user's default settings will be taken for the spool.

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.

Migrating SmartForms

Smart Forms have had a clear separation of form logic and program from the beginning.
The program's task is basically to collect the data and then pass it on to the interface of
the Smart Form. All form logic is done within the form. As this idea of an interface has
Adobe Interactive Forms – from SmartForm (Joan Ayala)

been taken up for PDF-based forms, it is much easier to reuse Smart Forms and their
programs than it is to reuse SAPscript components.

Both SAPscript texts and Smart Forms texts (text modules) can be reused in PDF-based
forms. Note, however, that commands within SAPscript text will generally be ignored,
as will output options. Furthermore, make sure all fields in the texts are known in the
form context. The use of unknown fields (including all SAPscript or Smart Forms
fields) leads to program termination at runtime.
Graphics that have been imported with report RSTXLDMC cannot be reused. However,
if you still have the original files on a file server, all you have to do to make them
accessible for PDF-based forms is to copy them to a place that can be accessed by
Adobe document services.
Graphics imported with transaction SE78 can be migrated into the MIME Repository.
Run report RSXFT_MIGRATE_BDS_GRAPHICS to do this. Note that as of SAP
NetWeaver '04, Adobe document services cannot access the MIME Repository directly.

 Make sure all referenced objects (Dictionary types, Smart Styles, text modules,
SAPscript texts etc.) are available before conversion.
 Split up big forms into small forms (representing only one business case)

The following example covers only one scenario. If you have Smart Forms that contain
several business scenarios, proceed as follows:
1. Create temporary copies of the original Smart Form (one Smart Form for each
business form).
2. For each business form, eliminate conditions that do not belong to the current
business form (including corresponding subtrees). To do this, use the Smart
Form Builder and FormInfo functionality (which was added for SAP
NetWeaver '04) as a graphical wizard.
3. Eliminate conditions from the form interface as well (this simplifies and
accelerates data retrieval).
4. Save and activate the new forms.

To start the conversion from the initial screen of transaction SMARTFORMS choose
Utilities → Migration → PDF-Based Form → Export.
Adobe Interactive Forms – from SmartForm (Joan Ayala)

Enter the name of a Smart Form, the name of a PDF-based target form, and the name of
a target interface in the dialog box displayed.
If there is a target object (form or interface), you can decide whether to overwrite or
rename it.
The names of the target interface and the target form are copied by default from the
Smart Form. However, you can change them.
The names of the target form and the target interface can, but need not, be the same.

The conversion tool is highly configurable and offers a range of conversion options.
Online Help describes each option in detail.
Generate Interface: If this option is selected, the interface object is created or
overwritten (after confirmation).
If you do not want to migrate the interface object (if it has already been migrated and
was modified manually, for example), the field can be reset.
Text: If this option is selected, all text nodes (text elements, text modules, and
SAPscript texts) of the Smart Form are migrated. Depending on the layout setting, the
nodes are copied to the layout.
Text elements are displayed as static texts in the layout. The text elements are converted
from ITF format to XHTML.
Text modules are displayed as fields (XFA element <field>) in the layout that refers to
the context elements.
Information about the text module is stored in the context. The text modules are
converted at runtime from ITF format to XHTML.
SAPscript texts are displayed as fields (XFA element <field>) in the layout that refer to
the context elements. Information about the SAPscript text is stored In the context. The
SAPscript texts are converted at runtime from ITF format to XHTML.
Append mode: If this option is selected, the append modes of the texts are reproduced in
the layout. Since this feature is not currently supported by Adobe document services, it
is reproduced by means of scripting.
Adobe Interactive Forms – from SmartForm (Joan Ayala)

Each text is packed into a <subform>, into which a special field, append_mode__,
is also packed.
The value of the field is analyzed in the generated scripting at runtime, and the text is
appended to the previous text, depending on the mode. The following append modes
exist:
 A . Append directly
 N . New line
 P. New paragraph
Since the append mode is a special feature of Smart Forms that is supported neither by
the Adobe LiveCycle Designer nor by Adobe document services, we recommend that
you perform the migration without the append mode.


(más info en BC480)

Potrebbero piacerti anche