Business Example .............................................................................................................................. 3
3
Designing a Form ............................................................................................................................... 3
4
3.1
Form Builder.................................................................................................................................. 4
3.2
Designing Form - Layout ............................................................................................................... 9
3.3
Floating Field ............................................................................................................................... 19
Advanced Tips and Tricks to Increase Your Proficiency with SAP Interactive Forms by Adobe ......... 20
SAP Interactive Forms by Adobe
3|Page
1 ADOBE INTERACTIVE FORMS: OVERVIEW Since SAP NetWeaver (Web) Application Server 6.40 (SAP NetWeaver 04), Adobe document services (ADS) have been available. This is a set of runtime services deployed on the Application Server that provide a range of form and document creation and manipulation functions. The key capabilities of the ADS are the creation of docum ents in PDF and various print form ats from XML form tem plates and current system data, and the extraction of user-entered data from interactive PDF forms for rendering and generating Adobe Forms. SAP has also provided a single programmatic interface called PDF Document Object (or PDF Object) that enables developers to communicate with ADS. PDF Object is available both in ABAP as well as Java. This paper shows the basic steps you need for creating an Adobe Interactive Form for offline scenario using the SAP delivered function modules and the PDF object for extracting the data. The paper assumes that the reader already has the basics of PDF based form development.
2 BUSINESS EXAMPLE The business example in this paper is an offline scenario by which a vendor will be able to fill bank information and send this information back so that this can be updated in the vendor master. The SAP vendor no and vendor name are pre populated in the form. Then this form is emailed to the vendor. The vendor completes the form and sends it back. The data from the PDF form is retrieved and the vendor master is updated. This does not require any Web Dynpro development
3 DESIGNING A FORM The first step for an offline scenario would be to design a form. This topic has been covered in detail in other How-To documents and is also explained in details in SAP documentation ( Designing PDF Forms). The steps for form design are: • Start transaction SFP • Create an interface • Create a form object • In the context link the required parameters from the interface • Finally create the layout of the form and activate the form. This creates a function module that encapsulates the form description. We will be creating an application program that collects the relevant data, calls this function module so as to generate the fillable PDF form. Make sure that the ADS is configured and ready for use (including a valid credential – See SAP Note 736902). The credential is required if, for example, the form is to be saved after filling.
SAP Interactive Forms by Adobe
4|Page
Goto Transaction Code: SFP You find two radio buttons… One for Form and other for Interface.
For every Form we need to have an Interface. You can reuse interface for other forms based on your requirement.
There are Different types of Interfaces.. Here we are using ABAP Dictionary-Based Interface
SAP Interactive Forms by Adobe
5|Page
In Import Parameters of interface: We get defaulf as /BCDWB/DOCPARAMS
In Export parameters of interface:
We get defaulf as /1BCDWB/FORMOUTPUT
In interface you also have a option for Writing a logic in Initialization and Form Routines . You can also declare Global data similar to Smartforms
SAP Interactive Forms by Adobe
6|Page
In Tcode : SFP, We now create a form
In Form we give the Interface which we have created for the form. Here we have 3 tabs : 1. Properties 2. Context 3. Layout
SAP Interactive Forms by Adobe
7|Page
In Context tab , we drap and drop all the data variables from Interface to context of form.
We can now use these variables in our designing for Interactive form. Before using we also have an option for Applying conditions on the fields, As shown in below snap.
SAP Interactive Forms by Adobe
8|Page
When using a Image from Se78, we set the property of Image field as below
SAP Interactive Forms by Adobe
9|Page
Now we have entered for Designing our Form: Below in Hierarchy tab. We get master page by default. Here we can add any number of new pages as per our requirement.
Note : In Tools Tab on Menu Bar we have option for Import and Export. So here Through import we can import any pdf file for easy designing.
In data view: We see here the context which we have mapped from interface to context of form. We can bind these to elements used in Form design.
SAP Interactive Forms by Adobe
10 | P a g e
On the right we have Properties, where we set Properties of our elements used in form. We have Library, Object, Font and Paragraph, etc.
In Object we have Field , Value and Binding. In Layout : we can set width, height, etc..
SAP Interactive Forms by Adobe
11 | P a g e
SAP Interactive Forms by Adobe
12 | P a g e
SAP Interactive Forms by Adobe
13 | P a g e
Here we can set the value of our element as Read oNly or User entered.. Depending upon Our Requirement of making it interactive or not.
SAP Interactive Forms by Adobe
14 | P a g e
Below we see how to bind our elements.
SAP Interactive Forms by Adobe
15 | P a g e
We can set Font and paragraph of the text on the page.
Below we see : Bordering our Element or table or page etc.. depending on our look and requirement.
SAP Interactive Forms by Adobe
16 | P a g e
In palettes: we see more functions to use. Here we also see the option for Script Editor . Where we can code in FormCalc or Java Script Based on our Requirement.
SAP Interactive Forms by Adobe
17 | P a g e
Below Screen Show Few Snippets of Code in Script Editor
SAP Interactive Forms by Adobe
18 | P a g e
SAP Interactive Forms by Adobe
19 | P a g e
This can be applied only to text element. As we know we cannot bind directly any static text to a context value. Floating field gives a good Option for making our form look good. We have to select a text field and on right click we get an option for converting it to Floating field. After that we can name that field and bind it to context value. And set it multiline property. This will help us to display dynamic data in multiple lines. Here we should note that we have set the Expand vertical property and blank expand to fit horizontally. This setting will help us in paragraph self-justified.