Vous êtes sur la page 1sur 30

SAP Composite Application Framework

Creating an Anonymous FormBased Process (Adobe)

Version 1.00 July 2006

SAP AG Neurottstrae 16 69190 Walldorf Germany T +49/18 05/34 34 24 F +49/18 05/34 34 20 www.sap.com SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, Copyright 2005 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. These materials are subject to change without notice. These Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. Disclaimer UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. Any Java Source Code delivered with this product is only to be used by SAPs Support Services and may not be modified or altered in any way. Some components of this product are based on Java. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components. materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

Typographic Conventions
Type Style Example Text Represents Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options. Cross-references to other documentation. Example text Emphasized words or phrases in body text, graphic titles, and table titles. Technical names of system objects. These include report names, program names, transaction codes, table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE. Output on the screen. This includes file and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools. Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation. Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. Keys on the keyboard, for example, F2 or ENTER.

Icons
Icon Meaning Caution Example Note Recommendation Syntax

EXAMPLE TEXT

Example text

Example text

<Example text>

EXAMPLE TEXT

Contents
Scenario..................................................................................................................................... 1 About This Document ................................................................................................................ 1 General Prerequisites......................................................................................................... 1 Applicable Releases........................................................................................................... 1 Disclaimer........................................................................................................................... 1 The Step By Step Solution ........................................................................................................ 2 How to Check the Configuration of the J2EE Engine ........................................................ 2 Prerequisites ............................................................................................................. 2 Description of the Scenario ....................................................................................... 2 How to Create a Standalone Interactive Form................................................................... 3 Prerequisites ............................................................................................................. 3 Description of the Scenario ....................................................................................... 4 How to Manage Impersonalized Interactive Forms............................................................ 9 Prerequisites ............................................................................................................. 9 Description of the Scenario ....................................................................................... 9 How to Use Impersonalized Interactive Forms ................................................................ 11 Prerequisites ........................................................................................................... 11 Description of the Scenario ..................................................................................... 11 Examples of a Standalone Adobe Document.......................................................................... 13

Scenario
Anonymous - or in other words, impersonalized - Interactive Forms can be used to start a Guided Procedures (GP) process without logging in to the SAP Enterprise Portal. You are allowed to download the PDF file containing your impersonalized interactive form and then you can store it in your file system or forward it to somebody else and use it later to start a given GP process. To start the GP process you should open the downloaded PDF file, complete and submit it. If you have filled out the fields on the form, then the GP process started by the form will be initialized according to the parameters you have specified in the form. Additionally you can specify a timestamp after which the downloaded form expires, that is, GP will no longer accept the form.

About This Document


General Prerequisites
To implement an Interactive Form based process using Adobe interactive forms you should perform the configuration steps described in Error! Reference source not found.. To use Adobe interactive forms you should install the Adobe Reader Version 7.0.7.

Applicable Releases
This tutorial is compatible with the following release SAP NetWeaver 04s SPS06.

Disclaimer
Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.

- -

The Step By Step Solution


How to Check the Configuration of the J2EE Engine
Prerequisites
For detailed discussion about the configuration of your J2EE engine see also Error! Reference source not found..

Description of the Scenario


1. Open the Visual Administrator of your J2EE engine. (Start -> Programs -> SAP J2EE Engine -> Visual Administrator) Select your connection configuration and click the Connect button.

2. The Login dialog appears. Enter your password and then click Connect.

- -

3. The main window of the Visual Administrator opens. On the lefthand select the Cluster tab if necessary and then expand the servers node.

4. Expand the Services node.

5. Select the caf/eu/gp/model node.

- -

6. Check the entries on the right-hand side of the window. If you need to adjust any entries, restart the engine after changing the configuration values.

How to Create a Standalone Interactive Form


Prerequisites
We assume that you have already created an XDP file or you that you have saved the XDP contained in the Error! Reference source not found. of this document.

Description of the Scenario


1. Launch the SAP Enterprise Portal (http://<host>:<port>/irj/portal) and login with your GP user. Navigate to Guided Procedures Design Time. Choose Create Callable Object.

- -

2. Enter the name of the callable object and a description. Choose English as the original language, choose a folder in which to store the callable object and select Interactive Form from the Type list.

Then click the

button.

3. Choose to specify an XDP file for the interactive form.

4. Choose the Adobe Based Form from the Template Type drop-down list. Click and specify your XDP file. You can find the source of the XDP file used in this document in section 0 of the Error! Reference source not found.. The encoding used by the XDP document must correspond to the encoding specified in the Encoding drop-down menu. . Choose

- -

5. Click

6. The input parameters of your interactive form are displayed. Here you can specify how the interactive forms fields are pre-filled, (for more information see also Error! Reference source not found.), and then click .

- -

7. The output parameters of your interactive form are displayed. Here you can specify here the validation of the interactive forms fields (for more information see also Error! Reference source not found.), and then click .

8. If you would like to create impersonalized interactive forms to start a GP process for example, then you should specify the following configuration for you callable object: o o Set Enable Use as Standalone Interactive Form Check the Create Impersonalized Interactive Form checkbox. Check the Start Process Upon Completion checkbox Choose .

o o

- -

9. Select the GP process to be started by the Interactive Form.

10. Click

Please note that the GP started by the GP process must satisfy the following conditions as it is started anonymously: o o o All built-in roles should be set to Initiation Defined. All roles defined by the GP process should be set to Initiation Defined. All roles including the built-in roles should have a default user assignment.

One possibility would be that you use the process defined in Error! Reference source not found. and prepare default values for every role. Or you have to change the time-off process that is delivered as standard example. To do this you need the role GP superuser. 11. Click the button.

- -

12. Specify the mapping between the fields on the Interactive Form and the context variables from the GP process to be started by the form. From the attached document the time-off data from the vacation request process (built in Error! Reference source not found.) or the leave request can be mapped. If the Time-Off Data is not shown in the mapping UI, please check that it is marked as exposed in the chosen process. 13. Then click . 14. Choose .

- -

15. Click

16. Activate your callable object.

How to Manage Impersonalized Interactive Forms


Prerequisites
In this scenario we assume that you have created an Interactive Form type callable object as described in 4.2.

Description of the Scenario


1. Launch the SAP Enterprise Portal (http://<host>:<port>/irj/portal) and login with your GP user. Navigate to Guided Procedures Administration. Choose the Interactive Forms submenu and then the Manage Impersonalized Forms menu item.

10

- -

2. Select the line of your callable object from the Impersonalized Form Templates list. Select the square before the line. Do not click the text of the line. Select .

3. Optionally, specify an expiry date for your form button. and then click the

4. Download the PDF file by clicking its link. After downloading the file choose .

5. Your form is displayed among the current requests. The Return Count column shows how many times the downloaded form has been completed and returned to the system.

Similarly the Total Request Count column counts how many times the form has been downloaded.

11

- -

How to Use Impersonalized Interactive Forms


Prerequisites
In this scenario we suppose you have created an Interactive Form type callable object as described in 0 and you have downloaded it as described in 4.3.

Description of the Scenario


6. Open the impersonalized interactive form that you have downloaded. Fill in its fields and then click the Submit button.

7. Launch the SAP Enterprise Portal (http://<host>:<port>/irj/portal) and login with your GP user. Navigate to Guided Procedures Administration. Choose the Interactive Forms submenu and then the Manage Impersonalized Forms menu item.

12

- -

8. Check that your form has been received by Guided Procedures. The Return Count should be incremented and the Last Return Date should correspond to the actual date and time.

If you skipped the previous step because your administration GUI was already open, then you should refresh the list of the current requests, since it will not refreshed automatically. 9. Check that your GP process has been started by your Interactive Form. Login with the user assigned as default user to the process started by the Interactive Form and navigate to Guided Procedures Run Time.

10. Choose Incomplete Processes Where Role Assigned is Owner.

13

- -

11. The process started by the Interactive Form is listed in the list of Running Processes. You can access your process now by clicking its name.

12. If you specified the mapping between the forms fields and the GP process context variables in step 12 of the scenario described in section 0, the GP process will be started with fields initialized according to the Interactive Form content.

Examples of a Standalone Adobe Document


The following screenshot shows an example XDP file containing a request form for the Time-Off process.

14

- -

Figure 1: createRequest.xdp in the Adobe Designer

The corresponding code example can be saved into an XDP file and then you can use it in your GP process.
<?xml version="1.0" encoding="UTF-8"?> <?xfa generator="AdobeDesigner_V7.0_SAP" APIVersion="2.3.5062.0"?> <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" timeStamp="2005-0809T22:41:15Z" uuid="1bfb09c6-2e00-4cf1-8fec-5f837f556b8b"> <template xmlns="http://www.xfa.org/schema/xfa-template/2.2/"> <subform layout="tb" locale="en_US" name="form1"> <pageSet> <pageArea id="Page1" name="Page1"> <contentArea h="756pt" w="576pt" x="0.25in" y="0.25in"/> <medium long="792pt" short="612pt" stock="default"/> </pageArea> </pageSet>

15

- -

<subform h="756pt" w="576pt"> <field h="9.525mm" name="BEGDA" w="114.3mm" x="3.175mm" y="19.05mm"> <ui> <dateTimeEdit> <border> <edge stroke="lowered"/> <edge stroke="lowered"/> <edge stroke="lowered"/> <edge stroke="lowered"/> </border> <margin/> </dateTimeEdit> </ui> <font typeface="Arial"/> <margin bottomInset="1mm" leftInset="1mm" rightInset="1mm" topInset="1mm"/> <para vAlign="middle"/> <value> <date/> </value> <caption reserve="43.13mm"> <font typeface="Arial"/> <para vAlign="middle"/> <value> <text>Start Date</text> </value> </caption> <validate nullTest="error"/> <bind> <picture>YYYYMMDD</picture> </bind> </field> <draw h="12.7mm" name="StaticText1" w="104.775mm" x="3.175mm" y="3.175mm"> <ui> <textEdit> </textEdit> </ui> <value> <text>Create Time-Off Request Form</text>

16

- -

</value> <font size="20pt" typeface="Arial" underline="1" weight="bold"/> <margin bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm" topInset="0.5mm"/> </draw> <field h="9.525mm" name="ENDDA" w="114.3mm" x="3.175mm" y="28.575mm"> <ui> <dateTimeEdit> <border> <edge stroke="lowered"/> <edge stroke="lowered"/> <edge stroke="lowered"/> <edge stroke="lowered"/> </border> <margin/> </dateTimeEdit> </ui> <font typeface="Arial"/> <margin bottomInset="1mm" leftInset="1mm" rightInset="1mm" topInset="1mm"/> <para vAlign="middle"/> <value> <date/> </value> <caption reserve="43.13mm"> <font typeface="Arial"/> <para vAlign="middle"/> <value> <text>End Date</text> </value> </caption> <validate nullTest="error"/> <bind> <picture>YYYYMMDD</picture> </bind> </field> <field h="9.525mm" name="ABSTYPE" w="114.3mm" x="3.175mm" y="38.1mm"> <ui>

17

- -

<choiceList textEntry="1"> <border> <edge stroke="lowered"/> </border> <margin/> </choiceList> </ui> <font typeface="Arial"/> <margin bottomInset="1mm" leftInset="1mm" rightInset="1mm" topInset="1mm"/> <para vAlign="middle"/> <caption reserve="43.39mm"> <font typeface="Arial"/> <para vAlign="middle"/> <value> <text>Absence Type</text> </value> </caption> <items> <text> </text> <text>Vacation</text> <text>Sickness</text> <text>Unpaid Leave</text> <text>Maternity Leave</text> <text>Military Leave</text> </items> <items save="1" presence="hidden"> <text>0</text> <text>1</text> <text>2</text> <text>3</text> <text>4</text> <text>5</text> </items> </field> <field h="9.525mm" name="Button1" w="44.45mm" x="3.175mm" y="92.075mm"> <ui> <button/> </ui>

18

- -

<font typeface="Arial"/> <caption> <value> <text>Submit</text> </value> <para hAlign="center" vAlign="middle"/> <font typeface="Arial"/> </caption> <border hand="right"> <edge stroke="raised"/> <fill> <color value="212,208,200"/> </fill> </border> <bind match="none"/> <event activity="click"> <submit format="xml" target="%com.sap.caf.gp.if.PostProcessorUrl%" textEncoding="UTF-8"/> </event> </field> <field h="41.275mm" name="COMMENT" w="114.3mm" x="3.175mm" y="47.625mm"> <ui> <textEdit multiLine="1"> <border> <edge stroke="lowered"/> </border> <margin/> </textEdit> </ui> <font typeface="Arial"/> <margin bottomInset="1mm" leftInset="1mm" rightInset="1mm" topInset="1mm"/> <para vAlign="middle"/> <caption reserve="43.13mm"> <font typeface="Arial"/> <para vAlign="middle"/> <value> <text>Comments</text> </value> </caption>

19

- -

</field> </subform> <proto/> </subform> <?templateDesigner DefaultLanguage FormCalc?> <?templateDesigner DefaultRunAt client?> <?templateDesigner Grid show:1, snap:1, units:0, color:ff8080, origin:(0,0), interval:(125000,125000)?> <?templateDesigner Rulers horizontal:1, vertical:1, guidelines:1, crosshairs:0?> <?templateDesigner Zoom 63?> <?templateDesigner DefaultPreviewDynamic 0?></template> <config xmlns="http://www.xfa.org/schema/xci/1.0/" xmlns:xfa="http://www.xfa.org/schema/xci/1.0/"> <trace> <area name="font" level="1"/> </trace> <agent name="designer"> <!-[0..n] -->

<destination>pdf</destination> <pdf> <!-[0..n] -->

<fontInfo/> </pdf> </agent> <present> <!-[0..n] -->

<destination>pdf</destination> <pdf> <!-[0..n] -->

<fontInfo> <embed>0</embed> </fontInfo> <tagged>1</tagged> <compression> <compressLogicalStructure>1</compressLogicalStructure> </compression> <interactive>1</interactive> <xdc> <uri>D:\usr\sap\C11\SYS\global\AdobeDocumentServices\lib\acrobat6.xdc</

20

- -

uri> </xdc> </pdf> <coolType> <unicodeDirectory>D:\usr\sap\C11\JC00\j2ee\os_libs\adssap\FontManagerSe rvice\fonts\adobe\typespt\unicode</unicodeDirectory> <commonFontsDirectory>D:\usr\sap\C11\JC00\j2ee\os_libs\adssap\FontManag erService\fonts\adobe\reqrd\cmaps</commonFontsDirectory> <additionalFontsDirectory>D:\usr\sap\C11\JC00\j2ee\cluster\server0\.\pe rsistent\com.adobe~FontManagerService\fonts\customer;D:\usr\sap\C11\JC0 0\j2ee\os_libs\adssap\FontManagerService\fonts\adobe;D:\usr\sap\C11\JC0 0\j2ee\os_libs\adssap\FontManagerService\fonts\adobe\pdfl\6.0\fonts</ad ditionalFontsDirectory> </coolType> <pcl> <fontInfo> <embed>1</embed> </fontInfo> </pcl> <ps> <fontInfo> <embed>1</embed> </fontInfo> </ps> <zpl> <fontInfo> <embed>0</embed> </fontInfo> </zpl> <xdp> <packets>*</packets> </xdp> <output> <to>memory</to> </output> </present> <acrobat> <common> <locale/> <data>

21

- -

<adjustData>1</adjustData> <attributes>preserve</attributes> <xsl> <uri/> <debug> <uri/> </debug> </xsl> <outputXSL> <uri/> </outputXSL> </data> <template> <relevant/> <base/> <uri/> </template> </common> </acrobat> </config> <xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"> <xfa:data xfa:dataNode="dataGroup"/> </xfa:datasets> <localeSet xmlns="http://www.xfa.org/schema/xfa-locale-set/2.1/"> <locale desc="English (United States)" name="en_US"> <calendarSymbols name="gregorian"> <monthNames> <month>January</month> <month>February</month> <month>March</month> <month>April</month> <month>May</month> <month>June</month> <month>July</month> <month>August</month> <month>September</month> <month>October</month> <month>November</month> <month>December</month> </monthNames>

22

- -

<monthNames abbr="1"> <month>Jan</month> <month>Feb</month> <month>Mar</month> <month>Apr</month> <month>May</month> <month>Jun</month> <month>Jul</month> <month>Aug</month> <month>Sep</month> <month>Oct</month> <month>Nov</month> <month>Dec</month> </monthNames> <dayNames> <day>Sunday</day> <day>Monday</day> <day>Tuesday</day> <day>Wednesday</day> <day>Thursday</day> <day>Friday</day> <day>Saturday</day> </dayNames> <dayNames abbr="1"> <day>Sun</day> <day>Mon</day> <day>Tue</day> <day>Wed</day> <day>Thu</day> <day>Fri</day> <day>Sat</day> </dayNames> <meridiemNames> <meridiem>AM</meridiem> <meridiem>PM</meridiem> </meridiemNames> <eraNames> <era>BC</era> <era>AD</era> </eraNames>

23

- -

</calendarSymbols> <datePatterns> <datePattern name="full">EEEE, MMMM D, YYYY</datePattern> <datePattern name="long">MMMM D, YYYY</datePattern> <datePattern name="med">MMM D, YYYY</datePattern> <datePattern name="short">M/D/YY</datePattern> </datePatterns> <timePatterns> <timePattern name="full">h:MM:SS A Z</timePattern> <timePattern name="long">h:MM:SS A Z</timePattern> <timePattern name="med">h:MM:SS A</timePattern> <timePattern name="short">h:MM A</timePattern> </timePatterns> <dateTimeSymbols>GyMdkHmsSEDFwWahKzZ</dateTimeSymbols> <numberPatterns> <numberPattern name="numeric">z,zz9.zzz</numberPattern> <numberPattern name="currency">$z,zz9.99|($z,zz9.99)</numberPattern> <numberPattern name="percent">z,zz9%</numberPattern> </numberPatterns> <numberSymbols> <numberSymbol name="decimal">.</numberSymbol> <numberSymbol name="grouping">,</numberSymbol> <numberSymbol name="percent">%</numberSymbol> <numberSymbol name="minus">-</numberSymbol> <numberSymbol name="zero">0</numberSymbol> </numberSymbols> <currencySymbols> <currencySymbol name="symbol">$</currencySymbol> <currencySymbol name="isoname">USD</currencySymbol> <currencySymbol name="decimal">.</currencySymbol> </currencySymbols> </locale> </localeSet> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1-701"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" xmlns:xap="http://ns.adobe.com/xap/1.0/" xmlns:xapMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="uuid:4fc34b915e78-423e-b328-16ad68887029" pdf:Producer="Adobe PDF Library 6.1" xap:ModifyDate="2005-07-26T12:01:30-07:00" xap:CreateDate="2005-07-

24

- -

26T20:59:50+02:00" xap:MetadataDate="2005-07-26T20:59:50+02:00" xapMM:DocumentID="uuid:7f7a22db-4091-4250-951d-1a8c3eee692b" xapMM:InstanceID="uuid:4fc34b91-5e78-423e-b328-16ad68887029" dc:format="application/pdf"> </rdf:Description> </rdf:RDF> </x:xmpmeta> <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"> <annots/> </xfdf> <PDFSecurity xmlns="http://ns.adobe.com/xtd/" print="1" printHighQuality="1" change="1" modifyAnnots="1" formFieldFilling="1" documentAssembly="1" contentCopy="1" accessibleContent="1" metadata="1"/></xdp:xdp> Figure 2: createRequest.xdp Source Code

25

- -

www.sap.com/netweaver

26

- -