R/3 contains lots of reports. Many of these use data from so-called Information Structures. If you run a report that lists product sales by country by product group, for example, R/3 does not read all sales orders (which could take forever) to provide the data. Instead, aggregated data from an Information Structure is used. SAP ships a few dozen of these, and customers can easily add their own, which will be automatically updated by SAP.
SAP offers two BAPIs, available on the OpenInfoWarehouse object type in the Business Object Repository, to access the Information Structures. This allows you to build your own reporting front-ends (e.g., in a browser) or to extract data for some other purpose.
The first BAPI, OpenInfoWarehouse.GetCatalog, retrieves the metadata for the Information Structures. This includes information about available tables (called Data Sources), columns (called Info Objects), and the relationship between the two. The most important information about the relationship is which Info Objects can be used as parameters or selection criteria for which Data Sources.
The second BAPI, OpenInfoWarehouse.GetData, allows you to execute a query for any of the Data Sources, passing whichever parameters and selection criteria you need. The data itself is returned as a block of long strings which you have to interpret yourself.
If you want more details about these BAPIs (and the building of BAPI-enabled components in general), I
Requires Free Membership to View
When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.
Hannah Smalltree, Editorial DirectorThomas G. Schuessler, www.arasoft.de
This was first published in January 2002