đź’ˇ This Confluence page provides the download an overview of how to interpret the Metadata API XML sample files extracted from an SAP BW system (referenced file names are highlighted in blue). You will also learn how the metadata is structured and how the technical relationships are represented across the files.
If you would like a guided walkthrough, you can schedule a session with one of our product experts here.
Download
You can download the sample files for SAP BW here:
đź’ˇ The Metadata API is capable of extracting BW objects such as reporting elements (Queries, key figures), Providers (CompositeProviders, ADSOs), and others. In addition to supplementary information, it also represents their technical structure in XML format.
General information about the BW objects, such as their structure, can be obtained from the following files:
Here, you can see the buildup of the sample Query in Eclipse:
Show Query buildup (SAP)
The build-up information of all objects can be found in the file “Buildups.A4H.xml” - here you can see this kind of information for the sample Query:
Show XML Snippet (Metadata API) - Buildups.A4H.xml
In the same file (“Buildups.A4H.xml”), the definitions of Key Figures (formulas, selections) can also be checked - e.g., for the selections of the restricted Key figure “ZPURV01_RFK_01 (UID: 055QGZV4AT4XGFL26GAVO356U)”:
Show Key Figure definition (SAP)
Here, you can see how we display this kind of information in the “Details.A4H.xml” file:
This is a restricted key figure in SAP BW that calculates the key figure 0SR_POVOC exclusively for material groups 00000001 and 00000002.
The descriptions of the fields can be checked in the file “BuildupDescriptions.A4H.xml” - e. g., for the Calculated Key Figure “055QGZV4AT4XGFL1YQUULKE0G|055QGZV4AT4XFZSRLRULRR4OO|REP”:
Show XML Snippet (Metadata API) - BuildupDescriptions.A4H.xml
đź’ˇ The Metadata API can generate XML files in GraphML format that visualize, at the object or field level, how elements are related to each other and how the mappings are defined.
Object Level Lineage
The file ”Relations.A4H.xml” shows the object-level lineage of the Composite Provider “ZPURV01”, which underlies the query “ZPURV01_REP_001 (UID 055QGZV4AT4XFZSRLRULRR4OO)”.
Show object-level lineage (SAP) and Relations.A4H.xml (Metadata API)
All extracted BW objects are initially listed as nodes:
Show XML Snippet (Metadata API) - Relations.A4H.xml
The snippet below clearly illustrates that the Composite Provider ZPURV01 serves as the source for the query ZPURV01_REP_001 (UID: 055QGZV4AT4XFZSRLRULRR4OO), while also acting as a target for other ADSOs (e.g., ZPURDW10).
Field Level Lineage
In the file "Buildups.A4H.xml", we have already seen that all fields of the object buildups are listed, including their technical metadata and properties.
For transformations — which play an important role in the context of field mapping — the file also provides relevant information (e. g., the RuleID), such as whether the logic represents a direct mapping, a formula, a start/end/field routine, a master data read, or a constant.
Below, the structure of a transformation is illustrated. First, you see a screenshot from SAP:
Show Transformation Mapping (SAP)
Next, the corresponding representation in the Metadata API file "Buildups.A4H.xml" is shown:
The field-level mapping is represented in the file "Mappings.A4H.xml" in a similar way, using nodes (the fields/elements of the BW objects) and edges (the mapping relationships between these fields).
If it is a direct mapping, the Mapping is found in file ”Mappings.A4H.xml”
Show direct mapping of a Transformation (SAP) and Mapping.A4H.xml (Metadata API)
Show code snippet (Metadata API) - Mapping.A4H.xml
The target field 0I_EBELEN of the InfoSource ZPURDW_IS10 is mapped to the source field EBELN of the ADSO ZPURCM10via a direct mapping within the transformation 02ID8HC4OIZVYN0J3MACM38TO9X1P5B4 (Rule Group=2)
Further examples in the file "Buildups.A4H.xml" include constants or formulas that appear within the context of field mapping:
Show Constants & Formulas (SAP) and Buildups.A4H.xml (Metadata API)
Show XML Snippet (Metadata API) - Buildups.A4H.xml
ABAP coding is also extracted via the Metadata API and presented in two files:
The relationships between code objects and tables/views are stored in the file ”ScanCode.A4H.xml” - e.g. for the Transformation “ 02ID8HC4OIZVYN0J3MACM38TO9X1P5B4”:
Show ABAP Coding (SAP) and ScanCode.A4H.xml (Metadata API)
In this example, the table of the InfoObject ZVENDOR is referenced in the transformation coding 02ID8HC4OIZVYN0J3MACM38TO9X1P5B4.
As in the other files where relationships are represented, the relationship between the target (the transformation, including the rule group “8”) and the source (table ZVENDOR) is modeled via the edges:
Show XML Snippet (Metadata API) - ScanCode.A4h.xml
đź’ˇ We GZIP-compress and Base64-encode the ABAP source code to significantly reduce file size and ensure it can be safely stored as a JSON string without encoding or special character issues. The process is fully reversible.
For more detailed information, please refer to our official documentation:
SAP Business Warehouse