SAP Composite Application Framework Creating a Content Package Object Version 1.00 July 2006
SAP AG Neurottstraße 16 69190 Walldorf Germany T +49/18 05/34 34 24 F +49/18 05/34 34 20 www.sap.com 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. 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. SAP, R/3, mysap, mysap.com, xapps, xapp, SAP NetWeaver, 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. These materials are subject to change without notice. These 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. Oracle is a registered trademark of Oracle Corporation. 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. Disclaimer 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. Any Java Source Code delivered with this product is only to be used by SAP s Support Services and may not be modified or altered in any way. 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.
T y p o g r a p h i c C o n v e n t i o n s I c o n s Type Style Example Text Example text EXAMPLE TEXT Example text 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. 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. <Example text> Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. EXAMPLE TEXT Keys on the keyboard, for example, F2 or ENTER. Icon Meaning Caution Example Note Recommendation Syntax
Contents Scenario... 1 About This Document... 1 General prerequisites... 1 Applicable Releases... 2 Disclaimer... 2 The Step By Step Solution... 3 Create a Content Package Object in Guided Procedures Design Time... 3 Adding a folder to the Packaged Content Object... 6 Adding a file to the Packaged Content Object... 6 Adding the extracted content of an archive to the Packaged Content Object... 7 Adding Translated Resource to the Content Package Object... 7 Finishing and activating the Content Package Object... 8 Finalizing content... 8 Granting permission... 9 Activating the Content Package Object... 10
Scenario The purpose of the Content Package Object is to define an object that represents a collection of content such as HTML pages, electronic documents, images and so on. You are able to do this, because in addition to applications or services, you can also encapsulate and use a Content Package as a callable object. As part of a Guided Procedure step, a Content Package type callable object allows you to call and display packaged content. You can include files of different types in a Content Package Folder, File, Archive Content (content of a zip), and Translated Resource for the original files are supported. You may create a directory structure within a package to organize the content, but the front-end of a Content Package should always be an HTML page that will serve as the entry point to the content of the package. To create a Content Package that you can use in a Process, you must: Create a Content Package object Expose it as a callable object. Typically you can use this callable object to integrate a set of documents organized into folders and connected via html links (like a set of javadoc documents or a piece of web site content html pages, images, electronic documents etc). The entry point can be an index HTML page you access when you execute the Content Package callable object that contains links to files or folders included in the Content Package as well, for example. About This Document This tutorial shows the creation of the Content Package Objects in Guided Procedures Design Time, and describes how to include the different file types. For a detailed step by step guide on how to wrap the Content Package Object into a callable object please see document [1]. The most useful way to create a Content Package is to insert a zipped file that contains the collection of different files organized into folders with an HTML file as an entry point to all the content. On addition this content will be extracted and included into the Content Package in one step. Of course you are also able to add files to, or remove files from, a package individually. General prerequisites It is recommended that you have an organized collection of files with an HTML file as the entry point to all the content zipped into one single archive, although this is not essential. - 1 -
Applicable Releases This tutorial is compatible with the following release Beginning with SAP NetWeaver 04s SPS6. 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. - 2 -
The Step By Step Solution Open your Enterprise Portal via http://<server>:<port>/irj/portal, navigate to tab Guided Procedures and tab Design Time Create a Content Package Object in Guided Procedures Design Time 1. In the left section of the window named You Can, choose Create Content Package Object to open the Content Package Object Design Time. - 3 -
2. Enter the basic data for the new Content Package Object Name: e.g. mycontentpackage Description: e.g. My Content Package Object Language: e.g. English Folder: (if blank or doesn t have the correct value select the storage location by using the Choose button) Click on Save and Open button. 3. Now your new Content Package Object is saved. You can manage its content either by clicking on Maintain content on the left-hand side panel, or clicking on the No content has been added to this package link. - 4 -
4. This screen shows the content of your Content Package Object. You can see the current folder at the top of the content table, on the left. You can maintain it by adding Folder - and subfolders in folders File - any type of a single file from a chosen location Archive Content extracted content of a *.zip file Translated Resource - a translated version (into another language) of file that has already been added As you can see the Add Translated Resource button is disabled this is because there are no files selected to add a translated version to. You can remove a folder or file with the Remove button. For navigation in the folders you can use the Open button to see the content of the selected folder. Use the Back button to navigate one folder up in the folder hierarchy. - 5 -
Adding a folder to the Packaged Content Object 1. Click on Add Folder Enter the name of the folder and click on Add. 2. You should see your folder in the content table. 3. To create a subfolder under a folder, just select the parent folder and click the Open button. At the top you can see the name of the current folder. 4. As you did with the parent folder you click on Add Folder, provide the folder name, and click on Add. Your subfolder will appear under the parent folder. Adding a file to the Packaged Content Object 1. Click on Add File Enter the name of the file with its full path you can use the Browse button Choose the Language, e.g. English You can set the Encoding of the file as well Click on Add when you have defined the file and its attributes. - 6 -
2. You should see the file in the content table the name of the file, its file type and language attribute. Adding the extracted content of an archive to the Packaged Content Object 1. Click on Add Archive Content Enter the name of the archive file with its full path you can use the Browse button Choose the Language, e.g. English You can set the Encoding Click on Add when you have defined the archive file and its attributes. 2. The content of the archive will be extracted and inserted into the Content Package Object. Adding Translated Resource to the Content Package Object 1. Select the file to which you would like to add the translated version. Click on Add Translated Resource - 7 -
2. In this screen you should see the original file you selected. Enter the name of the translated file with its full path you can use the Browse button Choose the Language, e.g. German (i.e. the original file s language was English) You can set the Encoding Click on Add when you have finished. 3. Notice that beside the English language the German language has appeared in the Available Languages field of the original file. The intention is that users with different languages should get matching versions of the file from the Content Package. There is a fallback to the original language version of the file if matching is not set for the user. Finishing and activating the Content Package Object Finalizing content 1. Once you have finished adding content, click Done. 2. The Maintaining Content view will be closed, and you should now see that your Content Package Object is not empty. - 8 -
Granting permission 1. To grant different permissions to this Content Package Object click on the Grant permissions link on the lefthand section of the screen. This is optional, if you skip this step, everyone will have full control of the Content Package Object by default. 2. Click on Add button to add a principal. (You can use the Add Defaults button as well which will add the creator of the Content Package Object with Full Control permission). 3. In the Add Users section you can search and find Users, Groups or Roles to add as a principal users. Enter the name of the user, group or role into the Find edit-box, and define which type of item to search for by choosing one in the Within dropdown box. Press Go to initiate the search. Make the selection from the result of the search and click on Add. - 9 -
4. You should see the chosen principal in the list. Select the type of the permission in the Permission column Read, Write or Full Control. (Use the Remove button to delete a granted permission) When you finished with granting permissions click on Save. Activating the Content Package Object 1. Click on the Activate content package link to make this object available for callable object creation. 2. Click on Activate to confirm. - 10 -
3. Your Content Package Object is activated now available to be used in callable object creation. - 11 -
- 12 -