XML-Based Archiving

Purpose

As in ADK-based archiving, XML-based archiving is used to move and archive data from closed business processes from the database. At the same time, it is possible to access the archived data at a later time, XML archiving is primarily used for XML archiving objects implemented by ABAP applications with XML interfaces. It is based on the following principles:

  • A comprehensive use of standards

  • XML: Generally accepted markup language and exchange format for complex objects, especially business objects, which is supported by a wide range of tools; compared to ADK, this format is used to archive data objects as whole objects (not broken down into different records)

  • XML schema used to validate and describe the structures of XML documents

  • HTTP(s) used for secure communication between the application system and the XML data archiving service (XML DAS)

  • WebDAV used as a model for the hierarchical organization of archived data and as a general (not SAP-specific) protocol for connecting storage systems including archive systems

  • JAVA used as a platform-independent programming language, which is also widely used outside the SAP world

  • J2EE as a standard for the development of JAVA-based enterprise applications

  • Data access is flexible and available even in the long term
    1. Independent from the application system that generates the data (in case a system has a shorter life cycle than the data to be archived)
    2. Independent from the application system technology (also relevant for JAVA applications)
  • Basis for cross-system data accesses and searches

  • Central archiving service to minimize administration efforts for system landscapes with many components

Implementation Considerations

XML DAS is a new technology designed specially for XML archiving objects. One example of an archiving object is CMX_XSTEPS for archiving execution steps. This object is delivered in the business function EA-SCM in SAP ECC Extensions.

In the future, it will also be possible to create custom archiving objects using XML DAS. This function has not, however, been released yet.

Integration

In XML-based archiving, there are two different logically separate systems, which are usually also physically separate: The application system whose database is optimized or that contains the data to be archived and the archiving system in which XML DAS is running.

The application system contains another important component for XML archiving, called the XML DAS connector. If you are working with an ABAP application system the XML DAS connector for ABAP contains the XML archive API, as well as the local archive administration, transaction SARA. The archiving programs of an XML archiving object use the XML archive API instead of ADK. The XML archive API communicates with XML DAS using HTTP(s).

XML DAS is part of the SAP J2EE Engine, which means that the archiving takes place in the JAVA stack of an SAP NetWeaver AS. The meta data and the property indexes (used for value-based searches) are kept in the database of the J2EE Engine, while the actual data that is archived is saved in a storage system connected using the WebDAV protocol. Alternatively, you can also use a robust file system, which must be made available to all servers of the SAP J2EE Engine. The file system or rather, a part of it (folder or WebDAV collection) is used as an archive store for an archiving object using XML DAS administration. These settings (and others) apply across application systems, which means that XML DAS administration is part of the SAP J2EE Engine, making it one of the most important tools for a data archiving administrator (alongside transaction SARA).

The following figure shows how all of these components fit together:



Figure 1: Relationship of the Different Components in XML-Based Archiving

Features

The XML DAS connector for ABAP used by XML archiving objects wraps the most important XML DAS functions. It is important to know the basic XML DAS concepts and functions, both when developing new archiving objects and in the archiving process itself.

Components and Use of the XML DAS Hierarchy

The data objects to be archived from an application exist either directly as XML documents or are read from the database using an XML interface. In addition you can archive the structure information of the XML documents in the form of one or more XML schemas together with the XML documents themselves. The same applies to XSL style sheets. Data objects in any format can be saved (and are passed as type “BIN”).

Resources and Collections

The general term for an archived object in XML DAS is resource. Resources are always located in collections. Collections contain other collections and subcollections, which together create the hierarchy. The concept that the XML DAS hierarchy comprises collections that contain resources is based on the WebDAV standard (RFC 2518). At the same time XML DAS uses the WebDAV protocol for the physical storage of archived data. This means that the collections and resources within the logical hierarchy are physically created in one or more WebDAV systems. The list of collections starting at the root of the XML DAS hierarchy and using the shortest path to a particular resource is the "address" of the resource: Together, the list of collection names (each suffixed with /) is known as an archive path. When you add the name of the resource to this path you have a URI. Only the URI is required to access a specific archived data object.

Properties and Property Indexes

You can also conduct value-based searches for resources. To make this possible, properties must be assigned to the resources. Whether or not the properties are derived from the XML contents or you use another type of attribution procedure, depends on the application. The concept of properties is also based on WebDAV. However, the following changes had to be made to adapt the WebDAV property concept to the fact that an XML archiving session usually processes many similar resources and to ensure more efficient searches.
  • Properties are typed, meaning that name-value pairs contain values of a data type, such as VARCHAR (45), for character-like properties with property values that contain up to 45 characters.

  • Properties are grouped in property indexes and must be defined by the application using the XML archive API before they can be used.
  • The application must specify the property index during archiving and value-based searches.

Home Collections and Home Paths

A part of the XML DAS hierarchy is reserved for each archiving object. This is done using collections called home collections. Data objects from a specific application are archived only in or under the home collection of the archiving object they belong to. The XML DAS Connector checks whether read accesses are permitted: The archive path of the requested resource must start with the home path of the archiving object, but can also have a path extension placing it lower in the hierarchy than the home collection.

Core Functions of XML DAS

The XML archive API provides an application with the following core XML DAS functions:

  • MKCOL – Create collection

  • PUT – Write resource to archive

  • CHECK – Check resources for XML well-formedness or validate

  • HEAD – Existence check for resources or collections

  • GET – Read resource from archive

  • LIST – Show resource list (hierarchical search)

  • SELECT – Select resource (value-based search)

  • INFO – Information about XML DAS and about an archive path

  • FREEZE – Freeze collection

  • DELETE – Delete resources or collections

  • VERIFY_INTEGRITY – Asynchronous check on the integrity of resources in one or more collections

  • INDEX_…

  • CREATE – Create property index

  • DESCRIBE – Describe properties of a property index

  • DROP – Delete property index

  • INSERT – Insert properties of a resource into an index

  • GET – Read properties of a resource from an index

Alongside these functions, the XML archive API provides methods that apply only to the XML DAS connector. For details, see the ABAP system documentation of the class CL_XADK_API.

XML DAS Administration

  • Archive Store

    To store the contents of resource and the collections on appropriate archive media, the XML DAS hierarchy is mapped to storage systems that are also hierarchically organized. The administrator can use storage system with WebDAV interfaces (called WebDAV systems) or file systems that must be reachable by all instances of the SAP J2EE Engine (for example multiple instances of a J2EE cluster).

    Put more precisely, archiving can take place only after each home collection of an archiving object is assigned to an archive store, which itself represents a connection to a real directory or a real WebDAV collection. Alternatively, you can also assign an archive store to those application collections that are direct or indirect subcollections of the home collection. You can do this as long as no archive store has already been assigned to any of their parent collections Before you can assign an archive store you must define it. To do so use XML DAS administration. It can be called as a browser application using the following path:

    Http://<address of SAP J2EE Engine>:<HTTP port>/DataArchivingService/DAS

    You can also use XML DAS administration to test the availability of archive stores, list all home paths known to the XML DAS and pack resources.

  • Pack

    Pack compresses all resources in a collection and writes them to an openly documented file format (see Archiving Format for Packed Resources. Then the resources are physically deleted, although logically they remain unchanged in the XML DAS hierarchy. This means that accesses to packed and unpacked resources only differ in terms of processing time. Although packed resources may mean increased processing times during read operations (due to block accesses and temporary decompression), they considerably reduce the number of files or collections in your system (which means fewer management entries, such as I-Nodes). If necessary you can also permanently unpack packed resources using XML DAS administration.

Restrictions

Archive Information System (SAP AS):

XML archiving does not make use of SAP AS. This means that it is not possible to create info structures or use Archive Explorer to search for resources in the context of XML-based archiving.

Example

XML archiving object BC_SBOOK_X.