Attachments
A Web Dynpro-developed user interface component used to attach any type of document or file to a business object instance.
The Attachments user interface (UI) component can be used to anchor a new attachment to a pre-existing object instance. Also known as a UI pattern, it is a simple UI component that can be embedded in any composite application.
You can upload and attach documents located in the SAP Knowledge Management repository from:
● Local file systems or file servers
● Document Management System on the Enterprise Portal
● World Wide Web as a link
The entity service Document is created for each attached file. See Core Project for more information on predefined services delivered with the CAF library.
The Attachments UI can be divided into the following parts:
● Attachments Configurator
● Attachments UI layout
After configuring the Attachments Configurator, you can generate the UI used to adapt it to the attachment of a business object.
You use the toolbar along the top of the layout to open a new attachments configuration (New), a previously created one (Open), to save (Save, Save as) or delete (Delete) it, or to preview (Preview) and test your configuration in a separate window.
In the following tables, you see a list of configuration fields used to create an Attachments component. Those marked with an asterisk (*) in the table and a red asterisk in the screen layout are required fields.
Object-Related Entries |
Description |
Service Module* |
Contains aspects and queries associated with the object. You can enter it directly or browse for it. |
Aspect for Object* |
An ESF (Enterprise Service Framework) term, which lists the key word needed to activate the result of a query or view of the object in the database. |
Relation Name for Attachment* |
The default value relatedDocuments specifies the relationship to other documents. |
Attachment Attributes to be Displayed |
Select the attributes to be shown at runtime as columns in the Attachments pattern table. Displayed values depend on the service module selected. |
Aspect Field for Object ID* |
Indicates which view is used for listing the object identifier. Here you can use a global unique identifier. |
Aspect Field for Attachment Name* |
Lists the default value title to view the name of the entity service document. |
Aspect Field for Attachment URL*
|
Aspect Field is the resource identifier in Knowledge Management (KM).
Field values for Aspect Field for Object ID, Attachment Name and Attachment URL do not change if using KM. They will be provided by CAF. |
Related Object Name* |
Navigates to the library where the related object is stored. |
KM-Related Entries |
Description |
KM Repository Address for Document Edit* |
This URL points to the location in KM so that you can edit the Attachments documents.
KM host and port values will be substituted at runtime from the caf~runtime~ear application process. |
New Attachment UI Component
|
The UI component is the technical basis for generating a new attachment document. Default is com.sap.caf.ui.ptn.newattachment.NewAttachment. |
New Attachment UI Development Component |
Contains coding information for launching the new attachment. Default is sap.com/caf~UI~ptn~attachments. |
Configuration Name of New Attachment |
Contains the name of the configured New Attachment UI component. You can indicate if this pattern is to be launched as a pop-up window outside the Attachments pattern (Pop-up) or as an embedded component (In Place). |
New Attachment Mode |
You can select how the attachment can be accessed. |
Optional Properties |
Description |
Edit Mode |
Enabling this box allows you to edit the attachment (document) content. The checkboxes Allow Add and Allow Delete will also be automatically activated. |
Allow Add |
Enable checkbox to allow adding an attachment. |
Allow Delete |
Enable checkbox to allow deleting an attachment. |
Allow Versioning |
Enable checkbox to allow creating a version of the document after it has been edited. |
Allow Unlocking |
Enable checkbox to allow unlocking a document if has been locked. |
Allow Multi-Select |
Enable checkbox to allow selection of more than one document at a time to remove. |
View Mode |
You can only view the attachment. |
File Download Mode |
You can view and select which files to download. |
Terminology Attachment |
This text will appear in the header of the Attachments component at runtime. |
Number of Visible Rows |
Default value is 5, however you can define how many rows should be displayed in a list. |
Properties |
Launches the property editor for selected documents (read only). |
The following entries are only visible when the Properties checkbox is enabled.
Property-Related Entries |
Description |
Property Editor UI Component |
Name of property editor component. Default is com.sap.caf.ui.ptn.propedit.components.PropertyEditorComp. |
Property Editor UI Development Component |
Name of Property Editor UI development component. |
Configuration Name of Property Editor |
Name of the Property Editor UI component. See documentation on the Property Editor UI component for more information. |
With the Attachments UI, you can upload additional attachments from other sources such as from a local directory, the World Wide Web, or from a document management system such as SAP Knowledge Management. See Adding Attachments for information on this procedure.
The Attachments pattern uses the New Attachment UI component to add a document to the object instance. See also the following UI components: