Does your head spin when you encounter terms like HTML, XML, and XML/A? This XML overview will get you through the alphabet soup and provide a solid foundation for future learning on this increasingly popular markup language. It also highlights how XML facilitates various features and functions in BW.
Key Concept
Extensible Markup Language (XML) is a flexible markup language that forms the basis of many languages used widely for data transfer over the Internet. It is generically a highly used tool set that is intertwined in all areas of BW. XML supports metadata and enables improved Java scripting in BW templates and is used in other areas throughout BW.
Since its introduction in the 1990s, XML — or Extensible Markup Language — has become one of the most prominent languages on the Internet. Like Hypertext Markup Language (HTML), XML is based on the original Standard Generalized Markup Language (SGML), which uses embedded tags and attributes to structure an electronic document. Unlike HTML, which is restricted to a list of tags that can be identified and read by HTML-compliant browsers, XML is much more flexible and capable of working with an almost infinite number of tags.
Because the XML tag set is almost unlimited, tags are defined for specific purposes that go well beyond text formatting. With HTML tags like and, definitions must be more rigid so Web browsers like Internet Explorer will know how to properly set up tagged text and display it to the end user. For XML-based languages, agreements are made between interested parties as to how an XML processor should interpret tags in XML-based documents and decode the data on the page. For example, a group of cooks who share recipes using XML may agree that information contained in the tag set is a component of a recipe.
You and your BW team need to understand the capabilities of XML because of the expanding role it plays in BW and across the SAP landscape. SAP has identified XML as an important vehicle for moving information and uses it to accomplish various data exchange tasks within BW and elsewhere in SAP’s product offerings. The NetWeaver platform has tightly integrated XML with its native support for many Web services and its XML-enabled Exchange Infrastructure (XI).
BW and XML
XML is integrated in all levels of the BW system from loading to reporting. BW supports — and is supported by — XML in such main areas as metadata exchange and query processing as well as functions such as data mining. And the list of areas that XML supports in BW continues to grow.
XML has spawned a number of unique languages with tag sets geared to support specific functionality. While it offers great flexibility, there are some problems associated with the limitless tag set. How can you know the requirements or tags of another XML-based language without specific information, and how can applications talk back and forth without knowing these requirements?
Various groups are collaborating to develop ground rules for many of the more popular XML-based languages. SAP has participated in the development of many of these languages and has incorporated Web services into its products to facilitate their use. This has made and will make the transfer of information from organization to organization more seamless.
XML for Metadata Transfer
The foundation of BW is its metadata, so it is appropriate that a discussion of XML in BW starts with its role in processing metadata. The industry defines metadata simply as data about the data, but I prefer this more detailed definition: Information that describes the objects used in an application such as BW. For example, an InfoCube definition including its characteristics, key figures, dimensions, author, creation date, and last change date are metadata.
BW 3.0B and greater support the XML-based Metadata Interchange language (XMI) to transfer object definitions into and out of BW. XMI was established by the Object Management Group (OMG), a consortium of companies created to set standards for the access and transfer of metadata across various hardware and application technologies.
XMI — and XML — can be processed into and out of BW in various ways including using a URL or through menu paths in the BW Administrator Workbench. The first method requires no GUI access, just a browser. The only prerequisite is that you have access to BW through your intranet and that the Basis team has activated the appropriate Web Service using transaction SICF.
XMI in BW provides powerful features such as allowing you to transfer object definitions between BW systems that are not on your transport path. In addition, this enables you to perform near-miraculous acts such as sending an InfoCube to a colleague by email!
Let’s look at how you can send an associate an XMI-based InfoCube. The easiest method is via the BW Metadata Repository in the Administrator Workbench (Figure 1), which is accessed by selecting the XML Export or Import in the Extras menu. Buttons are provided to import and export XML representations of BW objects. The BW Metadata Repository also supports other options such generating an XML-based list of objects for one or all the object types in your data warehouse, which is handy if you want the details for a specific object, but don’t know its technical name.

Figure 1
Access via the metadata repository
While the XML Export or Import tool offers a direct way to import and export XML-based object metadata, you can also access XML-based metadata using the Export and Import options in the BW Transport screen. This also is accessed via the Administrator Workbench by selecting the Transport button. Click on the import icon to load an XML page into the BW sever and select the generate icon to parse the page and create the appropriate object in your BW system.
To export an object, first search for it. Then using the Grouping button, collect any additional related objects associated with your main object. After all the objects have been collected, click on the export icon and create the XML output, then follow the prompts to file the output on your PC.
Either way you access the XML Export or Import function, it offers a straight-forward solution for generating an InfoCube. There are a lot fewer steps involved in passing XML definitions than there would be in setting up the Change and Transport System (CTS) to pass the InfoCube from your colleague’s BW system to yours. The function also offers a quick avenue to review objects in your warehouse or a simple way to jump-start the phase-in or phase-out of a data warehouse by passing definitions of objects between the different systems.
Remember that just because you can read another XMI-compliant file does not mean your application can create any-thing with it. Your XMI-compliant data warehouse system may not have all the features of the sender’s system. For example, the architecture in a third-party warehouse may not support a navigational attribute even though the system is XMI-compliant. In such a case, it would not be able to process an entire BW InfoObject if exported using XMI. In terms of functionality, full XMI compatibility between vendors is in the future and will probably require some customization.
Note
For moving objects into the QA and production systems in BW, SAP strongly recommends using the standard functions in BW, and not bypassing the controls and security of CTS by using this XMI method. CTS is a proven control system that ensures control over the movement of objects to your critical production system.
XML for Loading Data
In addition to providing access to object definitions, XML supports data loading. Consider a business case where an Internet application generates an XML document when an object is added to a shopping cart regardless if the item is actually purchased. The XML data stream can be targeted to various systems that can read the language, including BW, so that you can track what visitors click on when they come to your site.
Since the introduction of BW 3.0, XML documents such as those generated from the shopping cart application can be parsed and loaded into BW. In order to ensure that they are successfully loaded, XML documents must be compliant with the Simple Object Access Protocol (SOAP). SOAP is an industry standard that offers rules for sending XML documents over the Internet. It governs the exchange of documents complete with a formal response related to the success or failure of the transfer.
To find out more about SOAP, visit https://msdn.microsoft.com/library/en-us/dnsoap/html/
understandsoap.asp.
Figure 2 represents an XML page generated to transfer SOAP-compliant XML purchase order data over the Internet.

Figure 2
SOAP for loading data
Note
While XML is great for some applications, it is not appropriate for all jobs. As you can see in Figure 2, there are many more tags than actual data, so it would not be a good idea to use XML to handle large numbers of transactions. It is designed to accommodate the flow of individual records or a few records at a time, not millions of records for the initial load of data to a BW system.
XML-Based Data Loads
Figure 3 depicts the various steps required to load XML documents into BW. Technically, XML documents are pushed by a custom Internet application into the BW delta queue, known as the Myself source system. Although the process is extremely simple once the system is set up, configuration is more complicated. These are the steps:

Figure 3
Steps for loading an XML document to the BW delta queue
Step 1. Create a normal flat-file fed InfoSource with transfer structure fields for the flat file data source corresponding to the tags identifying the data on the XML SOAP page being sent to BW.
Note
The flat file data source in Step 1 supports creating the XML data source in the next step. Although it is not required, the flat file data source could be used for the mass historical data load and the XML data source could be enlisted to handle later delta loads.
Step 2. Create a SOAP-compliant Myself DataSource using the Extras>Create Soap Compliant DataSource menu path in the original flat-file InfoSource after it is activated. Note that the function module that pushes the parsed XML page into the delta queue is created automatically during this step.
Step 3. Create and execute an InfoPackage to initialize the XML-based SOAP-compliant Myself DataSource. Use the Without data transfer option on the InfoPackage because it will be used for changes and new records, rather than for historical data loads.
Step 4. Using a custom Internet application like the one that sends an XML page as items are added to a shopping cart, post the XML page with tags matching the original flat-file field names to the BW server. Posting the XML page to the SOAP remote function call Web service on BW triggers the function module automatically created in Step 2 to push the data to the BW delta queue. To comply with the SOAP specification, BW posts an HTTP response to the originating server indicating the success or failure of the load.
Step 5. Load a delta InfoPackage for the XML data source from the Myself source system as you would from any other source system.
XML for BW Queries
You can also use XML as a front-end tool in BW for querying data. You may think that it’s unnecessary to use XML for queries because BW supplies plenty of robust tools for query design. While this is true, there are business cases for Internet applications that require limited data — for example, a listing sales by part number for a customer, or inventory for a specific part number. Here, a Web application can query BW via an XML request and receive an XML response with the tagged data. This data can then be incorporated into the custom Internet site.
A specific XML-based language has been developed especially for this type of analytical task. Known as XML for Analytics (XML/A), it offers an alternative method to running BW queries using the query designer — or any other third-party tool for that matter.
XML/A also employs the SOAP standard along with a standardized XML-based format to define query requests. This format is based on Microsoft’s MDX language. The output delivered from the XML/A query is also tagged in accordance with the XML/A format. This data is then processed using style sheets that are translated into tags that an HTML browser understands or in other ways incorporated into the logic of a custom Web application.
More XML in BW
XML is also used by BW to support CRM for online data mining results. Data mining is not new to BW and algorithms supporting this feature go back to BW 2.1C. SAP is offering even more data-mining capabilities in BW 3.5. (For more on the new data-mining features available in BW 3.5, see “Data Mining with the Analysis Process Designer in SAP BW 3.5.,” BW uses the XML-based language PMML to facilitate data mining requests and responses across systems and companies.
Using PMML, you can send an XML-formatted page to a data mining company to determine the degree of confidence you can have that a certain product will be purchased by a certain group of people. As the targeted data mining application, BW is able to return a confidence number along with other related parameters. PMML is an emerging language used by the latest version of SAP CRM/BW. As the use of data mining moves into other areas, such as HR and finance, the importance of BW’s support of PMML will be more significant.
In closing, I’d like to mention the last place that XML is being used in BW. XML resides in the BW Web Application Designer in BW 3.5. SAP provides new Web items that will return an XML-based display of Web object properties. The XML-based information is processed via JavaScript to manipulate the page in response to a property’s current setting. In addition to these, other new Web items also facilitate the output of the data like the XML/A for the same purposes. Stay tuned to this channel in the future for even more uses for XML!
Ned Falk
Ned Falk is a senior education consultant at SAP. In prior positions, he implemented many ERP solutions, including SAP R/3. While at SAP, he initially focused on logistics. Now he focuses on SAP HANA, SAP BW (formerly SAP NetWeaver BW), SAP CRM, and the integration of SAP BW and SAP BusinessObjects tools. You can meet him in person when he teaches SAP HANA, SAP BW, or SAP CRM classes from the Atlanta SAP office, or in a virtual training class over the web. If you need an SAP education plan for SAP HANA, SAP BW, BusinessObjects, or SAP CRM, you may contact Ned via email.
You may contact the author at ned.falk@sap.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.