comp 300

38
COMP300 Best Practices for Designing Forms with SAP Interactive Forms by Adobe Nikhil Dhairyawan, SAP NetWeaver Product Management Blair Powell, Adobe Systems

Upload: koizak

Post on 25-Nov-2015

19 views

Category:

Documents


2 download

TRANSCRIPT

  • COMP300

    Best Practices for Designing Forms with SAP Interactive Forms by Adobe

    Nikhil Dhairyawan, SAP NetWeaver Product Management

    Blair Powell, Adobe Systems

    SAP TechED 08

  • Disclaimer

    This presentation outlines our general product direction and should not be relied on in making a purchase decision. This presentation is not subject to your license agreement or any other agreement with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or to develop or release any functionality mentioned in this presentation. This presentation and SAP's strategy and possible future developments are subject to change and may be changed by SAP at any time for any reason without notice. This document is provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP assumes no responsibility for errors or omissions in this document, except if such damages were caused by SAP intentionally or grossly negligent.

    SAP TechED 08

  • Introduction1.1.Importance of Best Practices1.2.Software components and process overviewDetailed Description2.1.Anatomy of a PDF2.2.Templates (fields, patterns, fonts, etc.)Optimal Online Forms3.1.Sizing3.2.ZCI and integration with Web DynproSummary ChecklistAgenda

    SAP TechED 08

  • Importance of Best Practices

    According to Wikipedia:SAP provided standardized processes, which were termed best-practice solutions of processes.

    Based on real world use of the technologyGoes beyond the product documentationFocus on the best solutions to common problems

    Always evolving and improving (Kaizen)Documentation around Best Practices is always being updated

    Education is the keyUnderstanding the technology means that the best practices are not just a set of rules to remember.This means you can raise the bar yourself by coming up with your own best practices

    SAP TechED 08

  • Version HistoryFirst released in SAP NetWeaver 6.40 (2003)

    Internally, Adobe releases are packaged as (P2A, P2B, P2C, P3A, P3B, P3C, etc.)

    Current release as September 2008 is P3C, available for SAP NetWeaver 7.01 and SAP NetWeaver 7.1 PI & CE

    Upcoming Adobe P4 release is only available for SAP NetWeaver 7.1 PI & CE

    Each Adobe release has a minimum supported version of Adobe Reader.

    P3C requires Adobe Reader 7.08 or later

    SAP TechED 08

  • The Software ComponentsAdobe Document Services (ADS) is embedded in the Java stack.

    ADS is exposed to both ABAP and Java via SOAP

    SAP

    SAP TechED 08

  • SAP GUI IntegrationTransaction SFPAdobe Designer is embedded inside SAPGUIDesigner has a data view that uses an XML schema generated from the context

    SAP TechED 08

  • Design-Time IntegrationSAP NetWeaver Developer StudioAdobe Designer is embedded inside the Java Web Dynpro perspective in the SAP NetWeaver Developer Studio

    SAP TechED 08

  • Control EJBJava code running in the SAP NetWeaver Application Server Java

    Converts the incoming SOAP packet to a corresponding request to XMLFM and/or PDFMM using CORBA

    SAP TechED 08

  • Forms Processing Design TimeTransaction SFP

    Uses a context to map business logic such as RFC enabled BAPIs, database tables etc. to create a data hierarchy

    SAP TechED 08

  • PDFMM (PDF Management Module)Java code running in the J2EE WebAS application server

    Converts the incoming SOAP packet to a corresponding request to XMLFM and/or PDFMM using CORBA

    Common operations performed by PDFMM:Extract data from a PDFMerge new data into an existing PDFCertification of a PDFRetrieve digital signatures from a signed PDF

    SAP TechED 08

  • XMLFMWritten in native code (C++)

    Renders a template (XDP), data (XML) and configuration (XCI) into either a PDF, PS, PCL or ZPL file using drivers and XDC files.

    SAP TechED 08

  • Forms Processing RuntimeABAP code that processes the template and corresponding ABAP code, which will invoke ADS via SOAP

    Exposes ADS functionality as a PDF object in ABAP.

    Rendered output can then be processed by spooler or any ABAP based application

    For Java based WebAS, the forms processing runtime is built into the Web Dynpro framework. The forms processing design time is part of SAP NetWeaver Developer Studio.

    Web Dynpro framework is now also available in ABAP.

    SAP TechED 08

  • Anatomy of Render ProcessXDC for PCLXDC for PostScriptXDC Acrobat PDF Form Layout DOMForm Layout is built in memory first before rendering to the required output format

    XDC Files are XML files that are used to transform the Layout DOM into the desired format similar to Print DriversXDP FileTemplate of the form in XML FormatXML Schema or XML Data FileXCI FileSpecifies parameters concerning how the form will be rendered

    SAP TechED 08

  • Introduction1.1.Importance of Best Practices1.2.Software components and process overviewDetailed Description2.1.Anatomy of a PDF2.2.Templates (fields, patterns, fonts, etc.)Optimal Online Forms3.1.Sizing3.2.ZCI and integration with Web DynproSummary ChecklistAgenda

    SAP TechED 08

  • Anatomy of a PDFA PDF consists of:Primitives (not structured)Accessibility Tags (HTML like structure for screen reader)XML based packetsXDP (template)XML (data)XCI (configuration)Certification (digitally signature of the PDF itself)Digital signatures (signed XML form data)

    PDFPDF primitivestextimagesdrawsAccessibility Tags

    Digital Signature(s)Certification

    SAP TechED 08

  • Dynamic PDFA dynamic PDF is rebuilt by the XML Form Agent inside Adobe Reader when the PDF is downloaded by the Web Browser.

    Web BrowserAdobe ReaderHTML

    SAP ServerADSXML Form AgentXML Form Agent

    SAP TechED 08

  • Print FormsPrint FormsNo editable fields. Can be a PostScript (PS), PCL (HP Printer language) or a PDF

    For SAP, a print PDF form is commonly rendered as static.

    SAP TechED 08

  • Interactive FormsInteractive Forms:Contain edit fields.

    Interactive forms can update their contents at run-time via HTTP based web services by sending and/or receiving XML data

    In order to improve performance, a PDF can be made dynamic. This means it is rendered completely by the Adobe Reader software on the client

    For SAP, an online, interactive PDF is rendered as dynamic by default.

    SAP TechED 08

  • Anatomy of a TemplateXDP template is an XML based text fileContains one or more:subformsfieldsmaster pagesdata bindingscriptsfontsimagesXLIFF (language translation)Field patternsLocaleAccessibility elementsA public XFA Specification indicates what can be used in the template.

    SAP TechED 08

  • Importance of SubformsSubforms are used to group fields and form elements together

    Different types of subforms positional and flowed content

    Positional subforms force the rendering engine to work harder to position items

    SAP TechED 08

  • Importance of Subforms for complex tablesHow subforms organize the content of a template

    Positional versus Flow Content

    Tables a specific kind of flow content subform

    Nested Subforms can be used to simulate more complex types of tablesNested TablesMulti-line tablesOut of place rows in tables

    SAP TechED 08

  • Document Object ModelTree Like Structure that represents the XML data in memory

    SAP TechED 08

  • SOM ExpressionsSOM: Scripting Object Model

    Used to refer to specific items in a form or data DOM

    For example: RootData.Record[*].Name

    SAP TechED 08

  • Scripting LanguagesTwo languages available: JavaScript and FormCalc.

    FormCalc is a spreadsheet-like language for doing quick calculations and manipulation of the DOM (Document Object Model)

    JavaScript is a fully equipped programming language for more complex tasks.

    Regardless of the language choice, avoid long and/or complex scripts.

    Avoid scripting by using conditional occurrences (data driven subforms)

    SAP TechED 08

  • FontsFonts can be embedded to ensure consistent appearance but will add to the size of the form

    These fonts are recommended for consistent appearance without increasing rendering size:CourierHelveticaTimesArialTimes New Roman

    Some legal forms require the use of a native printer font. This is possible but font mapping may be necessary

    SAP TechED 08

  • Creating Forms that are accessibleScreen reader software such as JAWS

    Accessibility is a complicated issueStandards do not cover all use cases

    Will become more important in the future as more governments and organizations demand compliance

    SAP TechED 08

  • Understanding AccessibilityHTML-like Tags embedded in the PDF are used by a screen reader

    SAP TechED 08

  • Accessibility how it worksTagging Structure

    SAP TechED 08

  • SAP 2008 / SAP TechEd 08 / Page *DEMO

    SAP TechED 08

  • Introduction1.1.Importance of Best Practices1.2.Software components and process overviewDetailed Description2.1.Anatomy of a PDF2.2.Templates (fields, patterns, fonts, etc.)Optimal Online Forms3.1.Sizing3.2.ZCI and integration with Web DynproSummary ChecklistAgenda

    SAP TechED 08

  • SizingFor the question: What do you need in way of the computing resources in order to render interactive forms and print forms within the time required by myself and my users?Answer: Its complicated

    For deploying interactive forms online, the form should be built and tested in small increments. This is common sense but a common omission in most projects.

    Traditional benchmarking using SAPS or SPECINT is not helpful because these measurements assume an atomic operation is at the core. For ADS, the operations performed depend on the template content.

    SAP TechED 08

  • Sizing ConsiderationsThe key is to analyze the contents of the template. These are the following factors:Number of subforms and fields,Presence of large scriptsExplicit data bindingEmbedded imagesAmount of form dataThe size of the template and/or the amount of XML data will also be an important factor.

    SAP TechED 08

  • InternationalizationUnderstanding LocaleCountry and language are distinct elementsThe importance of understanding ambient locale

    Understanding PatternsPatterns are ideal since they can represent symbols in a locale-independent manner.

    Using locale and patterns means your templates are ready to be used anywhere

    SAP TechED 08

  • ZCI (Zero Client Installation) FormsHow it works

    Ensuring that the ZCI scripts in the template are up to date

    What happens when messages are sent to the server

    Browser support

    SAP TechED 08

  • Optimal Integration with Web DynproWeb Dynpro philosophy: Abstraction of client side coding

    Impact of client/server communication with ZCI and WD on performance

    Design decision: either use a small, simple form or create the online form as an offline PDF which minimizes the communication

    SAP TechED 08

  • SAP 2008 / SAP TechEd 08 / Page *DEMO

    SAP TechED 08

  • Introduction1.1.Importance of Best Practices1.2.Software components and process overviewDetailed Description2.1.Anatomy of a PDF2.2.Templates (fields, patterns, fonts, etc.)Optimal Online Forms3.1.Sizing3.2.ZCI and integration with Web DynproSummary ChecklistAgenda

    SAP TechED 08

  • Checklist for creating efficient formsCheck the contents of the template. These are the following factors:Large number of subforms and fields?Are there large scripts (more than 15 lines) that are frequently executed?Are there lots of explicit data binding (SOM expressions with x.y.z[*]) present?Are there large embedded images (i.e. BMP files)?

    How large is the XML data?

    How large is the XML schema?

    How large is the XDP (template)?

    SAP TechED 08

  • SDN Subscriptions offers developers and consultants like you, an annual license to the complete SAP NetWeaver platform software, related services, and educational content, to keep you at the top of your profession. SDN Software Subscriptions: (currently available in U.S. and Germany) A one year low cost, development, test, and commercialization license to the complete SAP NetWeaver software platform Automatic notification for patches and updatesContinuous learning presentations and demos to build expertise in each of the SAP NetWeaver platform componentsA personal SAP namespace SAP NetWeaver Content Subscription: (available globally) An online library of continuous learning content to help build skills. Building Your Business with SDN SubscriptionsTo learn more or to get your own SDN Subscription, visit us at the Community Clubhouse or at www.sdn.sap.com/irj/sdn/subscriptions

    SAP TechED 08

  • Further Information

    SAP TechED 08

  • Further Information (continued)

    SAP TechED 08

  • SAP 2008 / SAP TechEd 08 / Page *Thank you!

    SAP TechED 08

  • Please complete your session evaluation.Be courteous deposit your trash, and do not take the handouts for the following session. Thank You !Feedback

    SAP TechED 08

  • Copyright 2008 SAP AGAll Rights ReservedNo 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.SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, SAP Business ByDesign, ByDesign, PartnerEdge 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 and associated logos displayed are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior written permission of SAP AG. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies, developments, and functionalities of the SAP product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice. SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence.The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.

    Weitergabe und Vervielfltigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrckliche schriftliche Genehmigung durch SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen knnen ohne vorherige Ankndigung gendert werden.Einige von der SAP AG und deren Vertriebspartnern vertriebene Softwareprodukte knnen Softwarekomponenten umfassen, die Eigentum anderer Softwarehersteller sind.SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, SAP Business ByDesign, ByDesign, PartnerEdge und andere in diesem Dokument erwhnte SAP-Produkte und Services sowie die dazugehrigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und in mehreren anderen Lndern weltweit. Alle anderen in diesem Dokument erwhnten Namen von Produkten und Services sowie die damit verbundenen Firmenlogos sind Marken der jeweiligen Unternehmen. Die Angaben im Text sind unverbindlich und dienen lediglich zu Informationszwecken. Produkte knnen lnderspezifische Unterschiede aufweisen.Die in dieser Publikation enthaltene Information ist Eigentum der SAP. Weitergabe und Vervielfltigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, nur mit ausdrcklicher schriftlicher Genehmigung durch SAP AG gestattet. Bei dieser Publikation handelt es sich um eine vorlufige Version, die nicht Ihrem gltigen Lizenzvertrag oder anderen Vereinbarungen mit SAP unterliegt. Diese Publikation enthlt nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP-Produkts. SAP entsteht aus dieser Publikation keine Verpflichtung zu einer bestimmten Geschfts- oder Produktstrategie und/oder bestimmten Entwicklungen. Diese Publikation kann von SAP jederzeit ohne vorherige Ankndigung gendert werden.SAP bernimmt keine Haftung fr Fehler oder Auslassungen in dieser Publikation. Des Weiteren bernimmt SAP keine Garantie fr die Exaktheit oder Vollstndigkeit der Informationen, Texte, Grafiken, Links und sonstigen in dieser Publikation enthaltenen Elementen. Diese Publikation wird ohne jegliche Gewhr, weder ausdrcklich noch stillschweigend, bereitgestellt. Dies gilt u. a., aber nicht ausschlielich, hinsichtlich der Gewhrleistung der Marktgngigkeit und der Eignung fr einen bestimmten Zweck sowie fr die Gewhrleistung der Nichtverletzung geltenden Rechts. SAP haftet nicht fr entstandene Schden. Dies gilt u.a. und uneingeschrnkt fr konkrete, besondere und mittelbare Schden oder Folgeschden, die aus der Nutzung dieser Materialien entstehen knnen. Diese Einschrnkung gilt nicht bei Vorsatz oder grober Fahrlssigkeit.Die gesetzliche Haftung bei Personenschden oder Produkthaftung bleibt unberhrt. Die Informationen, auf die Sie mglicherweise ber die in diesem Material enthaltenen Hotlinks zugreifen, unterliegen nicht dem Einfluss von SAP, und SAP untersttzt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewhrleistungen oder Zusagen ber Internetseiten Dritter ab. Alle Rechte vorbehalten.

    SAP TechED 08

    The Adobe LiveCycle designer is closely integrated inside the Abap WorkbenchThe designer is not part of the SAPGUI installation, however can be downloaded from SAP Service MarketplaceThe Adobe LiveCycle designer is closely integrated inside the SAP NW Developer StudioThe designer is a part of the SAP NW developer studio installationThe slide depics the components and the steps involved in the rendering process of XML Forms For generating a form we need a form Template or an XDP file which contains information about the forms design. To be covered in the Anatomy of the Template slide.

    The definition of the data which an application or databases exposes is structured in the XML Data file or the XML Schema The XCI file is a configuration file which specifies different configurable settings such as locale, PDF tagging etc (Optional)and can be configured by an Admin either for a specific Job or on a enterprise level

    These three files are then sent to the ADS which builds an output independent version of the form(the Form Layout DOM) in memory.

    This is then converted by ADS to a output specific format with the help of an XDC (XML Device Control) file.

    A PDF consists of non structured data such as primitives e.g drawing instructions

    Accessibility information in an HTML tag like structure, containing information for the screen reader

    The XML data packets which are used in the rendering process are also contained inside the PDF. Which Allow the Adobe reader to re-render the form if required

    Certification : To protect the form by certifying it . Certification also includes usage rights which tell the free Adobe Reader to unlock additional functionality into the reader.

    Last but not the lease digital signatures to validate that the form comes from a known user

    A Dynamic PDF gets rebuild on the client side by the XML Form Agent inside the Adobe Reader. Improving performance by shifting the part rendering process to the client.

    A Dynamic Form can dynamically adapt itself to user inputs on the client side by sending and retrieving new data from the SAP Sever.

    Typical scenarios of Dynamic PDF usages being Based on selection of country retrival of the statesetcPrint forms are classic examples of PDFs used for viewing and printing a form.

    These forms offer no editable fields and can be generated in PostScript, Print Command Language or PDF.

    In contras to the Dynamic forms print forms use static rendering i.e the form is rendered on the server by the ADS and cannot be changed on the client

    Typical examples of Print forms are documents intended for viewing only like: Salary Slips, Invoices etc

    Interactive forms as the name suggests contain editable fields. Typical examples being leave requests, Travel expense forms, customer visit recording forms, Maintenance report forms

    Can interact with the SAP system using WebServices directly called through the forms

    Improve performance by using Dynamic forms and using distributed rendering

    SAP form The XDP file or the Adobe XML Data Package file contains information about the forms design likeSubforms Fields .....

    The XDP Template is generated when you design the form in the LCD by draging and dropping fields on the form.

    There exist a public XML Form Architecture specification, specifying what can go inside a template. The XDP is an implementation of the XFA specification

    What are Sub Forms? SubForms are containers used to logically group fields different form elements or other sub forms togetherSub Forms help in making your form understandable and look organized Sub Forms can have positional or flowed. Subforms that flow content allow the ADS to flexibly position objects within the subformSubforms that position content force the ADS to position the objects exactly at the specific anchored positions thus forcing the engine to work harder.

    Shall be covered in the Adobe Live Cycle Designer Demo We saw how Sub forms work and help you organize the objects inside the form and the differences between flowed and positional content

    Use Subforms to structure content because they allow anchoring, layout and geometry management for form objects. (Optional)The objects in a Sub form can be arranges in rows, columns etc

    Nested SubForms look and function like a table. Tables are flow content subforms that contain repeated subforms.You can flexibly simulate Nested Tables or Multi-line tables and out of place rows in a tableTo be covered in Adobe Live Cycle DemoAfter understanding the visual elements on the foms in order to understand the form logic and the scripting possibilities in interactive formsBefore we do that lets us first understand the DOM As mentioned earlier the ADS builds an output independent version of the form in memory, this is the DOM.The DOM is a tree like structure that represents the XML data of the form in memoryForms offer scripting languages to react to user inputs in the form and perform client side validations

    The Scripting Object Model can be used in the form to programatically refer to specific items in a form or data DOMAs you can see the SOM supports simple to understand object oriented access to elementsWhen it comes to fonts we all get creativeHowever it is important to understand the impact the selected fonts could have on the rendering size.In order to ensure consistency of print output allover and avoid inceasing the file size we recommend to use standard fonts like Courier ... Etc in your formsIf esoteric fonts are used in forms design we risk geting a consistent output.

    Having said this we know that some legal forms require usage of native printer font, this is possible but font mapping may be necessaryMany goverment agencies and organizations require electornics forms to be accessible to user with vision impairmentsScreen reader software such as JAWS is used to readout texts on the forms object as the user tabs through the formAvailable accessibility standard donot cover all use cases, SAP has its own accesibility guidelines when it comes to making UIs accessible

    To make a PDF form accessible, in the Adobe Live Cycle designer while designing forms accesibility texts can be specified for each form objectThe designer then generates the tagging structure which is seen hereHere is an example of how a form can be represented in the tagging structureThis tagging structure uses elements that resemble HTML tags and is read aloud by Third-Party screen readers

    Sample form creation in Designer and display in readerCovers Subform Positional and Flowed contentNested SubformsTables usinging nested subformsInteractive(Dynamic) v/s Print (Static) formsAccessibility Palette

    P4 release will have lazy loading, which will help with large formsLocaleField PatternsZCI in Sample form

    Unlike trial versions which expire after 90 days, requiring you to uninstall, reinstall, and re-configure. SDN Subscriptions provides developers uninterrupted access to an environment that they can personalize and completely control, saving them valuable time and increasing productivity through reduced downtime.

    Specific subscriptions include: SAP NetWeaver Development Subscription. Hands-on access and ownership to the complete SAP NetWeaver software platform. (available in Germany and U.S.) Low cost, access to the SAP NetWeaver platform with a one year, development and commercialization license Choice of development method with SAP NetWeaver ABAP, Java, and/or composite applications Continuous learning presentations and demos to build skills in each of the SAP NetWeaver platform components SAP NetWeaver Content Subscription. An online library of continuous learning content to help build skills. (available globally)SAP NetWeaver Composition Subscription. Uninterrupted, total control for creating, testing, and selling Java-based solutions that integrate with SAP applications. (available in Germany and U.S.)

    To learn more or to get your own SDN Subscription, visit SAP NetWeaver, Development Subscription, www.sdn.sap.com/irj/sdn/devsubSAP NetWeaver, Content Subscription, www.sdn.sap.com/irj/sdn/subscriptions/contentSAP NetWeaver, Composition Subscription, www.sdn.sap.com/irj/sdn/subscriptions/composition

    Key Benefits include: Complete control Uninterrupted, hands-on access Latest SAP NetWeaver software Continuous learning And Supporting services