Get list of workbooks in roles and queries included in workbooks.

How to get list of workbooks in roles and queries included in workbooks.

This blog provides information about how to get list of all workbooks in roles and queries included in workbooks. In scenarios like migration of all 3.x queries to BI 7.0 queries and also migration to BusinessObjects reports, we may need information of all BW queries which are included in workbooks, the metadata repository can provide list of all queries and workbooks but it can include queries or workbooks which are created for adhoc purpose.

To get list of workbooks

In order to get the list of workbooks which are included in roles, the SAP table AGR_HIER is useful.

In below example we retrieved the list of workbooks included in BWCRM* role.

The table output field SAP_GUID will provide the workbook ID’s.

These entries can be provided to table RSRWBINDEXT to get workbook descriptions.

Once we get the list of all workbooks we can move forward to get information of the query included in it.

Below are some important tables for Workbooks.

WORKBOOKS

RSRWBINDEX

List of binary large objects (Excel workbooks)

RSRWBINDEXT

Titles of binary objects (Excel workbooks)

RSRWBSTORE

Storage for binary large objects (Excel workbooks)

RSRWBTEMPLATE

Assignment of Excel workbooks as personal templates

RSRWORKBOOK

Where-used list for reports in workbooks

Get queries included in Workbooks.

Function Module:

RRMX_WORKBOOK_QUERIES_GET is SAP standard function module which is created for retrieving the query used in workbook. Below is the sample ABAP code which will provide the list of queries included in workbook.

*&---------------------------------------------------------------------**& Form F_GET_DATA*&---------------------------------------------------------------------** Get the data for given selection criteria.*----------------------------------------------------------------------*FORM f_get_data .