adobe forms
TRANSCRIPT
ADOBE FORMS
Adobe Architecture
Scripting
Integrating in ABAP Program
Overview on Adobe Forms
Topics…
Demo & Hand-On
Adobe Architecture
Scripting
Integrating in ABAP Program
Overview on Adobe Forms
Topics…
Demo & Hand-On
Adobe Forms - Introduction
Purpose
Adobe forms is a new technology available from SAP Net Weaver ’04 or later, you can use to create print & interactive forms for the optimization of your form-based business processes.
Advantages:
Interactive functions automate the creation of data for SAP systems Full integration into the SAP development environments for Java and
ABAP User-friendly tools reduce the time and costs associated with creating
form layouts. The usage of the PDF format means that forms retain their appearance
regardless of the environment they are used in.
Adobe Forms - Features
SAP Interactive Forms by Adobe offer the following basic functions:
Edit forms online or offline Forms can be filled in advance automatically with specific data from SAP
applications and then sent to the correct recipients using secure methods Automatic consistency checks for forms Digital signatures and form certification Send completed forms to the SAP application with automatic updates of
the business data Smartforms can be migrated to Adobe Forms. Both Print & Interactive forms can be designed using Adobe.
Adobe Forms - : Technical Pre-requisites
Pre-requisites:- 6.40 GUI: make sure that Designer is installed and check on your hard
drive. Default location:\Program Files\Adobe\Designer 7.1. ( i:e ALD installation is required ).
Make sure latest 6.40 GUI patches are installed (LiveCycleDesigner 7.1 requirement).
Adobe reader 7.0 (incl. update to 7.0.8) You must have the authorization object S_DEVELOP to Design Adobe
forms.
Adobe Forms - Integration
Integration SAP Interactive Forms by Adobe is included in SAP Web Application
Server and can be used by any applications that are based on SAP NetWeaver ’04 or later.
The following Adobe software is included in the form solution: Adobe LiveCycle Designer
A graphical tool for designing form layouts; it is integrated into SAP NetWeaver Developer Studio and ABAP Workbench.
Adobe Document Services (ADS)Web services used to generate the PDF forms at runtime; in interactive scenarios, they extract the XML data from the form and send it to the system.
Adobe Document Services run on SAP J2EE Engine. This means that you must install the Java Stack of SAP Web Application Server, regardless of the development language of your application (ABAP or Java).
Adobe Forms - Types
There are two basic types of forms: 1. Interactive Forms
Basic scenarios: Online
The user is logged on to the SAP system when he or she fills out the form.
OfflineThe user is not logged on to the SAP system when he or she fills out the form. Once the form has been filled out, the user sends it to the issuer of the form, for example by e-mail. The SAP system of the issuer then extracts the data from the form.
2. Print Forms Used normally for Printing/Fax/Email
Adobe Scenarios
Development Environment for Interactive Forms
Interactive Forms in Web Dynpro for Java in SAP NetWeaver Developer Studio
Interactive Forms in Web Dynpro for ABAP in ABAP Workbench
These forms can contain dropdown menus, pushbuttons, text fields, and other elements that enable users to enter data. The form is generated in PDF format, which, for example, can be displayed by the user in a browser. The user uses Adobe Reader or Adobe Acrobat to fill out the form and saves the changes made to the form in XML format. The SAP system extracts the data from the form and saves it to the database, where it can be processed further.
Adobe Architecture
Scripting
Integrating in ABAP Program
Overview on Adobe Forms
Topics…
Demo & Hand-On
Adobe Forms Architecture:-
Sap Net weaver Application Server
Structure
A PDF-base print form has the following attributes:
A form interface that sends the application data to the form
A form context that contains the form logic. This logic controls the dynamic formatting of the form. For example, it enables variable fields to be displayed; it specifies that certain texts appear only under certain conditions (one text for a first warning and a different text for a second warning); and it can specify that invoice items can be processed repeatedly in a table
A layout. In the layout, you define how the output data is positioned, its appearance in graphics, and the design of the pages
Interface in Form Builder
Interface acts as a link between the Print Program & the adobe
Form. There are 3 types of Interfaces as shown below.
ABAP Dictionary-based interface Smart Forms-compatible interface XML-based interface
Interface - Contd
If you create an interface to be used in an ABAP print program, you should choose “ABAP Dictionary based”.
To Keep an old print program without changes, “Smart forms compatible interface” type can be used.
“XML schema based” interface can be used with Web Dynpro applications while designing Interactive forms.
Create Form Interface - SFP
Add Parameters to Form Interface
Create Form Template - SFP
Specify the Interface created
Drag & Drop fields in the Context
Design The Form Template
Build the Form Context - SFP
Design Form Template - SFP
Form Configuration (NACE OR SPRO)
Following Details needs to be specified while configuring forms:-
Print Program Name Entry Routine Name Form Name
Structuring a Form
Master Page
Body Page
Content Area
Subforms
Master Page
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
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.
Objects on Master Page
Body Page
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).
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.
You should think of a body page as nothing more than a wrapper or a container for dynamic content.
Subforms
Subforms can be thought of as folders containing several objects. They can be used for the simple reason of keeping order in the Hierarchy, as it is possible to expand and compress subforms.
For further organizing body pages (or, though rarely, master pages), they can contain subforms.
Note: Be aware that nesting subforms will slow down the processing performance.
Types of Subform
There are two types of subforms:
If of type Positioned, objects of subforms can be laid down at their exactposition at runtime, relative to the subform. For example, if a text field hasbeen positioned at the top left corner of a subform of type Positioned, it willalways be positioned at the top left corner of the subform, independentwhere on a page this subform is included. (The Hierarchy position of anObject within a subform of type Positioned is irrelevant for its layoutposition.)
If of type Flowed, the objects will follow each other, depending on the spacethey require at runtime. A body page (as the topmost subform) is typicallyof this type.
Preventing Page Breaks
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 isincluded 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 with Previous and/orKeep 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.
Some hints that might help to create readable forms:
Even though you could have no body pages at all and manageeverything from master pages, it is strongly recommended not to do so.
You should not nest a subform B in subform A if you want B to be on adifferent master page. If you do, the hierarchy tends to become unreadable.
Although it is possible to select Go to Next Page or Go to Page... in theAfter field of an ordinary subform, for the sake of clarity you should not, asyou would essentially force a page break. If you need a page break, youshould create a new body page (which is also a subform), as this will makethe hierarchy easier to understand.
Keep with Previous or Keep with Next (to prevent a page break betweentwo subforms) does not make sense for body pages. It should be used fornormal subforms only.
Static Form Elements
Static Images Static Texts Geometric Objects
Static Images
The company logo is to appear on all pages. Such objectsare called boilerplate objectsThe company logo is to appear on all pages. Such objectsare called boilerplate objects
Static Texts & Geometric
Caution
Furthermore, for performance reasons, it is best to use only a smallnumber of fonts per document.Furthermore, for performance reasons, it is best to use only a smallnumber of fonts per document.
Dynamic Form Elements
Integrating Dynamic Fields Text Fields Image Fields
Integrating Dynamic Fields
1. Go to the Data View (which results from the form context), and drag a field to the desired position in the Layout Editor.
2. Drag a field from the Standard library to the desired position.
1. Go to the Data View (which results from the form context), and drag a field to the desired position in the Layout Editor.
2. Drag a field from the Standard library to the desired position.
Text Fields
Adobe Architecture
Scripting
Integrating in ABAP Program
Overview on Adobe Forms
Topics…
Demo & Hand-On
Scripting in the Form
Scripting - An IntroductionYou can attach scripts to all kinds of non-static objects, that is, for all
objects apart from content areas, static texts, static images, and
Graphical elements (lines, circles, rectangles). However, scripting
That is attached to a non-static object Can access all other objects of
The form, including the static ones.
Scripting in the Form
1. FormCalc ( Recommended for print forms)
2. JavaScript (Recommended for Interactive forms)
Scripting in the Form
Scripting Events
Initialize .When the object is being initialized, after data from the data stream has been merged. One usage of this event would be to dynamically determine the field value.
Calculate . Processed after data merge, but before display. You can query the field’s value and manipulate it. The results from the ordinary data binding will thus be overridden. The calculation triggers again whenever there is a change to any value upon which the calculation is dependent; hence, self references must be avoided.
form: ready . After the form and data have been merged and loaded, and any calculations and validations events have fired. As this event is processed before pagination is finished, you can use it to dynamically hide objects. If the objects are positioned in a subform with type Flowed, no empty space will result. Instead, the following objects will take up the space of the hidden objects.
layout: ready . After the layout has been applied, i.e. after page breaks have been inserted. You can use this event to access objects placed on master pages.
Scripting - Syntax Elements
Processing Sequence
Points To Remember
You can choose between different events to determine when your coding will be executed.
ABAP is not supported here. For print forms it is recommended to choose FormCalc for simple tasks,
JavaScript for more complex tasks. Scripting can be evaluated at the client (front end) or at the server. Since
print forms do not require any user interaction, scripting should run on the server side.
Adobe Architecture
Scripting
Integrating in ABAP Program
Overview on Adobe Forms
Topics…
Demo & Hand-On
Integration into ABAP Programs
Note:-
FP_FUNCTION_MODULE_NAME makes use of the class basedexception concept. This means that you cannot query sy-subrc. Use TRY - CATCH - ENDTRY instead.
Note:-
FP_FUNCTION_MODULE_NAME makes use of the class basedexception concept. This means that you cannot query sy-subrc. Use TRY - CATCH - ENDTRY instead.
Adobe Architecture
Scripting
Integrating in ABAP Program
Overview on Adobe Forms
Topics…
Demo & Hand-On
BD Forms – Adobe Examples
Delivery Packing List PO Contract Form Sales Quotation Form
PDF Output – Delivery Packing List
PDF Output – PO Contract
PDF Output – Sales Quotation
Requirement Gathering for Forms
Customizing Details: To determine form technology to be
used To do initial testing in development
system Printers used for Printing
( Zebra,Dymo or Any other Printer )
To determine form technology to be used
All printers do not support Adobe forms/Smartforms/SAPScript
To reduce efforts on alignment Issues
Need to Know the Execution Method. Whether Executed through SAPGUI/Portal.
To determine form technology to be used
As Labels printed on Dymo printers are not executed through portal.
Barcodes Not all barcodes are supported by
Adobe forms. So if Barcodes are requested on the forms. Please Provide the Barcode Types to decide the form approach.
Page Formats/Label Size Providing Page Formats ( Example:
DIN4/DIN5) & orientation of the page (Example:- Landscape or Portrait is
very essential while designing the forms).
Layout Details Providing Form Dimensions, Fonts &
Font size would help to have similar look and feel.
To Reduce rework efforts
Tips & Tricks
Program Use
FP_PDF_TEST_00 Displays the Adobe document services version.
FP_PDF_TEST_17 Attaches a comment to a PDF document.
FP_PDF_TEST_16 Attaches a file to a PDF document.
FP_PDF_TEST_01 Generates a PDF document from a form design (template) and an XML data file.
Setting up an http Connection for ADS
For a printing scenario with PDF-based forms, you must have installed
Adobe document services on an SAP Net Weaver Application Server with
ABAP and J2EE. To call Adobe document services from an ABAP
application, an http connection must be created as follows:
1.Log on to your SAP Web AS central instance host.
2. Call transaction SM59.
3. Choose Create and name the connection ADS.
4. Enter at least the following:
RFC destination: ADS
Connection type: G
Description: <your description>
Setting up an http Connection for ADS – Contd…..
5. Choose ENTER.6. Choose the Technical settings tab and enter at least the following: Target Host: Enter the host name where your SAP J2EE engine is located. Service No: Enter the SAP J2EE http port number. The following naming
convention applies: 5<J2EE_instance_number>00 (50000, for example, if your J2EE instance is 00). Path Prefix: Enter exactly the string /AdobeDocumentServices/Config?
style=rpc or /AdobeDocumentServicesSec/Config?style=rpc if you want to use SSL
When you press ENTER, a warning is displayed: .Query String Not Allowed.. Ignore this warning.
7. Choose the Logon/Security tab and configure the security account to yoursecurity requirements.8. Save your settings.9. Choose Test Connection.10. A screen is displayed. The field status_reason should have the value OK ifthe test is successful.
Suggested Approach to Design Forms
Questions
??? ?
? ??