18
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 1 How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more information, visit the EDW homepage . Summary This document demonstrates an easy way to list of all Bex-Reports built on an Info Provider and also list down all workbooks and BO Crystal reports build on those Bex-Reports by the help of a Report Program. Author: Jaya Tiwari Company: Infosys Limited Created on: 4 October 2011 Author Bio Jaya Tiwari is working with Infosys Technologies Limited since 2009. She has expertise on implementation of various SAP BI 7.0 projects.

How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

Embed Size (px)

Citation preview

Page 1: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 1

How to Find Bex-Reports,

Workbook and BO Crystal Reports

Built on an Info Provider

Applies to:

Software Component: SAP_BW. For more information, visit the EDW homepage.

Summary

This document demonstrates an easy way to list of all Bex-Reports built on an Info Provider and also list down all workbooks and BO Crystal reports build on those Bex-Reports by the help of a Report Program.

Author: Jaya Tiwari

Company: Infosys Limited

Created on: 4 October 2011

Author Bio

Jaya Tiwari is working with Infosys Technologies Limited since 2009. She has expertise on implementation of various SAP BI 7.0 projects.

Page 2: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 2

Table of Contents

What can be an Info Provider? ........................................................................................................................... 3

Info object ........................................................................................................................................................ 3

Data Store Object ............................................................................................................................................ 3

Info Cube ......................................................................................................................................................... 3

Multiprovider .................................................................................................................................................... 3

Common Report types In BW: ............................................................................................................................ 3

Bex Queries (Reports): ................................................................................................................................... 3

Workbooks: ..................................................................................................................................................... 3

Common Report types In BO:............................................................................................................................. 4

Web Intelligence (Webi) .................................................................................................................................. 4

Crystal Reports ............................................................................................................................................... 4

Xcelsius Reports ............................................................................................................................................. 4

Live Office ....................................................................................................................................................... 4

Other Reports .................................................................................................................................................. 4

Business Scenario: When this data is required .................................................................................................. 4

Processing Logic Used ....................................................................................................................................... 4

Details of Tables Used: ....................................................................................................................................... 5

Linking between tables: ...................................................................................................................................... 7

Steps to Create Report Program: ....................................................................................................................... 8

Create a report program.................................................................................................................................. 8

Code to write: ...................................................................................................................................................... 9

Using Report Program: ..................................................................................................................................... 16

Related Content ................................................................................................................................................ 17

Disclaimer and Liability Notice .......................................................................................................................... 18

Page 3: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 3

What can be an Info Provider?

An Info Provider is an info object or a group of info objects that is used to store data and server as source of data for a report. The report can be a bex query, workbook, BO report etc. In BW reports we use following Info Providers in general.

Info object

A characteristic serve as an Info Provider if it has master data and is assigned to an Info Area .We need to explicitly define it as an Info Provider in the Info Object maintenance.

Data Store Object

A data store object is an Info Provider which stores data in flat file tabular format at atomic level. Different tables are used to maintain the data in various states and uniquely identified by key fields, while non-key fields are added as data element.

A DSO can have 3 types:

Standard DataStore Object (New, Active and Change Log tables).

Write-Optimized DataStore Objects (WDSO) (Active table only).

DataStore Objects for Direct Update (Active table only).

Info Cube

Info Cube is an Info Provider which stores data in fact and dimension table (start schema).Fact table contain key figures (facts) and dimension id’s of different dimension table which stores information about characteristics (details about fact).The dimension serve purpose of multi-view of data based on functional and reporting requirements .

Multiprovider

A Multi Provider is an Info Provider that can have data coming from a number of other Info Providers. The use of Multi Provider is multi view union based display of data coming from different info providers .This is like a view which is created for reporting purpose and have no data retained in its own.

Common Report types In BW:

Reports provide an efficient way to analyze data present in different info provider. A report removes redundant information and allows efficient evaluation of data based on specific business analysis requirement.

Bex Queries (Reports):

Data coming from same Info Provider can be viewed with different combination of info objects, conditions, reusable structure, filters, formula, customer exits (specific to requirement).

Queries can be viewed as OLAP reporting or tabular reporting.

Bex queries also serve as an Info Provider to workbooks, BO reports to provide more refined data for reporting.

Workbooks:

Bex Analyzer allows you To create a workbook on an Info Provider or Bex- Query which presents data for reporting in macro enabled Microsoft excel sheet .A workbook can be customize further as per business specification like Displaying formatted header information ,color formatting ,use of different formulas and filters on data ,hiding column ,merging different queries in one report etc.

The ability to use excels formatting functions and formulas makes workbook reporting more attractive and efficient.

Page 4: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 4

Common Report types In BO:

Web Intelligence (Webi)

This is a user interface where using intranets and extranets we can create reports in Web and analyze data. User must log into the BI portal Info View via Internet browser to design, execute and distribute Webi reports.

These reports are mainly used for Ad-hoc query & analysis and used for interactive reporting.

Crystal Reports

Crystal reports in SAP BW are formatted reports usually integrated with a bex query. Formatted reporting allows managing report elements to the fixed pixel format. Crystal reports are suitable for formula-based reports with very restricted analytical functions .They do tabular representation of query.

Xcelsius Reports

Xcelsius is data visualization software that provides lots of components that can be used for interactive and dynamic data display via dashboards using data from different sources. The reports created by using this software are called Xcelsius visualization.

It has component like chart, selectors, map, text etc. that can be used to create visualizations and then can be exported to PowerPoint slide, PDF doc, Microsoft Outlook, Microsoft Word, Adobe Flash file, HTML file, Enterprise folder or Adobe AIR.

Live Office

Business Objects™ Live Office is software that integrates Microsoft Office environment to BO reporting data to provide accurate, updatable data in your documents, spreadsheets, and presentations.

The most attractive feature of Live Office is it provides access to live data that is connected to accurate underlying reports and data and provide instant access to the most up-to-date information.

Other Reports

Deski, Web-Rich client, Voyager, Mobile intelligence, Polestar, Qws, Pioneer, and Analytics are some other software’s used in BO reporting.

Business Scenario: When this data is required

There are many scenarios in which we would like to list all the reports built on an info provider. One approach to do this is using tables or by drilling down objects in metadata repository .However, it is cumbersome task to search reports and dependent objects one by one for an Info Provider. Example: - Consider a business scenario where we have some process chain (data load) failure or we have missed SLA .In such situation we need to find the list of Bex reports , workbooks ,crystal reports which will get affected by this and should get published later after completion of loads . Listing all Bex reports, Workbooks and Crystal reports built for many Info Providers can be done efficiently using our approach.

Processing Logic Used

To achieve the above requirement we can built an ABAP report. This report will give us required information by selecting information from following tables,

RSRREPDIR: This table stores all the queries technical name builds on an info provider .We will search all reports technical name by using info provider name.

RSZELTTXT: This table stores description of query .We will read query description by matching ELTUID field of RSZELTTXT table with COMPUID field of table RSRREPDIR for all selected entries.

RSRWORKBOOK: This table stores all workbooks build on a query .We will match GENUNIID field of table RSRREPDIR and RSRWORKBOOK to read workbook details.

Page 5: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 5

RSRWBINDEX: This table stores all workbooks and crystal reports information .Field WBTYP will give information about type of report .It is C for Crystal report and blank for workbooks. Field WORKBOOKID of table RSRWBINDEX and RSRWORKBOOK is used to read the information.

RSRWBINDEXT: This table stores description of workbook and crystal reports. Field WORKBOOKID of table RSRWBINDEXT and RSRWORKBOOK is used to read the information.

Details of Tables Used:

Technical details of table and fields used in program to derive desired data are as following.

TABLE NAME RSRREPDIR

DESCRIPTION Directory of all reports

FIELD NAME DESCRIPTION OF FIELDS

COMPUID UUID in compressed form

OBJVERS Object version

INFOCUBE Info Cube

GENUNIID Internal display of the report identifier

COMPID Name (ID) of a reporting component

AUTHOR Name of author

LASTUSER Last Changed By

MODTIME Last Change of Query Runtime Object

TABLE NAME RSZELTTXT

DESCRIPTION Texts of reporting component elements

FIELD NAME DESCRIPTION OF FIELDS

ELTUID UUID in compressed form

OBJVERS Object version

TXTLG Long description

Page 6: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 6

TABLE NAME RSRWORKBOOK

DESCRIPTION 'Where-used list' for reports in workbooks

FIELD NAME DESCRIPTION OF FIELDS

WORKBOOKID BW Generation tool: GUID in compressed form (CHAR25)

OBJVERS Object version

GENUNIID BW: Unequivocal ID in room and time

TABLE NAME RSRWBINDEXT

DESCRIPTION Titles of binary objects (Excel workbooks) in Info Catalog

FIELD NAME DESCRIPTION OF FIELDS

WORKBOOKID BW Generation tool: GUID in compressed form (CHAR25)

OBJVERS Object version

TITLE Long description

TABLE NAME RSRWBINDEX

DESCRIPTION List of binary large objects (Excel workbooks)

FIELD NAME DESCRIPTION OF FIELDS

WORKBOOKID BW Generation tool: GUID in compressed form (CHAR25)

OBJVERS Object version

WBTYP Type of workbook

Page 7: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 7

Linking between tables:

Following figure (fig 1) displays how the fields between above mentioned table are related and shows diagrammatically data relations in tables.

Fig 1

Page 8: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 8

Steps to Create Report Program:

Create a report program

1. Go to T-Code SE38 in BW system .Create a report program as shown below (fig 2 & fig 3).

Fig 2

Fig 3

Page 9: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 9

2. Following screen will open (fig 4).Write the below mentioned code and save and execute (as shown in fig

5).

Fig 4

Code to write:

*&---------------------------------------------------------------------*

*& Report Z_REPORTSTAT

*&---------------------------------------------------------------------*

*&DESCRIPTION : List of reports in any Info provider

*&---------------------------------------------------------------------*

REPORT Z_REPORTSTAT.

****FOR ALV GRID DISPLAY

TYPE-POOLS: SLIS.

****STANDARD TABLES USED

TABLES : RSRREPDIR ,RSZELTTXT ,RSRWORKBOOK ,RSRWBINDEX .

****STRUCTURE FOR REPORT AND WORKBOOK DETAILS

TYPES: BEGIN OF T_REPORTS ,

COMPUID TYPE SYSUUID_25,

INFOCUBE TYPE RSINFOCUBE, "INFOPROVIDER NAME

GENUNIID TYPE RSGENUNIID,

COMPID TYPE RSZCOMPID, "QUERY NAME

AUTHOR TYPE XUAUTHOR, "CREATED BY

LASTUSER TYPE LAST_USER, "CHANGED BY

MODTIME TYPE RSRMODTIME, "CHANGED DATE

TXTLG TYPE RSTXTLG , "QUERY DESCRIPTION

WBTYP TYPE C LENGTH 15, "TYPE OF REPORT

WORKBOOKID TYPE RSSGUID25 , "WORKBOOK NAME

TITLE TYPE RSTXTLG , "WORKBOOK DESCRIPTION

END OF T_REPORTS .

****STRUCTURE FOR QUERY DETAILS

TYPES : BEGIN OF T_READ ,

COMPUID TYPE SYSUUID_25,

Page 10: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 10

OBJVERS TYPE RSOBJVERS,

INFOCUBE TYPE RSINFOCUBE, "INFOPROVIDER NAME

GENUNIID TYPE RSGENUNIID,

COMPID TYPE RSZCOMPID, "QUERY NAME

AUTHOR TYPE XUAUTHOR, "CREATED BY

LASTUSER TYPE LAST_USER, "CHANGED BY

MODTIME TYPE RSRMODTIME, "CHANGED DATE

END OF T_READ .

****STRUCTURE FOR QUERY TEXT READ

TYPES : BEGIN OF T_QRYTXT,

ELTUID TYPE SYSUUID_25 ,

OBJVERS TYPE RSOBJVERS,

TXTLG TYPE RSTXTLG , "QUERY DESCRIPTION

END OF T_QRYTXT .

****STRUCTURE FOR WORKBOOK DETAILS

TYPES : BEGIN OF T_WREAD ,

WORKBOOKID TYPE RSSGUID25 , "WORKBOOK NAME

OBJVERS TYPE RSOBJVERS,

GENUNIID TYPE RSUNIIDX ,

END OF T_WREAD .

TYPES : BEGIN OF T_WTREAD ,

WORKBOOKID TYPE RSSGUID25 , "WORKBOOK NAME

OBJVERS TYPE RSOBJVERS,

WBTYP TYPE RSWBTYP , "REPORT TYPE

END OF T_WTREAD .

****STRUCTURE FOR WORKBOOK TEXT READ

TYPES : BEGIN OF T_WTXT,

WORKBOOKID TYPE RSSGUID25, "WORKBOOK TECH NAME

OBJVERS TYPE RSOBJVERS,

TITLE TYPE RSTXTLG , "WORKBOOK DESCRIPTION

END OF T_WTXT .

****STRUCTURE FOR INFOPROVIDER NAME READING

TYPES : BEGIN OF T_INFO ,

ICUBE TYPE RSINFOCUBE ,

END OF T_INFO .

DATA :INFOCUBE TYPE C LENGTH 30.

"TABLE FOR INFOOBJECT INPUT VALUES

DATA : IT_INFO TYPE STANDARD TABLE OF T_INFO ,

WA_INFO LIKE LINE OF IT_INFO .

"TABLE FOR REPORTTYPE VALUES

DATA : IT_REPTYPE TYPE STANDARD TABLE OF T_WTREAD WITH HEADER LINE,

WA_REPTYPE LIKE LINE OF IT_REPTYPE .

"TABLE FOR CONSOLIDATED REPORTS INFO

DATA : IT_REPORTS TYPE STANDARD TABLE OF T_REPORTS WITH HEADER LINE ,

IT_REPORTS_TEMP TYPE STANDARD TABLE OF T_REPORTS WITH HEADER LINE ,

WA_REPORTS LIKE LINE OF IT_REPORTS .

FIELD-SYMBOLS: <FS_REPORTS> TYPE T_REPORTS .

"TABLE TO READ QUERY DETAILS

DATA : IT_QREAD TYPE STANDARD TABLE OF T_READ WITH HEADER LINE ,

WA_QREAD LIKE LINE OF IT_QREAD ,

"TABLE TO READ QUERY TEXT

IT_QTXT TYPE STANDARD TABLE OF T_QRYTXT WITH HEADER LINE ,

WA_QTXT LIKE LINE OF IT_QTXT.

"TABLE TO READ WORKBOOK DETAILS

DATA : IT_WREAD TYPE STANDARD TABLE OF T_WREAD WITH HEADER LINE ,

WA_WREAD LIKE LINE OF IT_WREAD ,

Page 11: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 11

"TABLE TO READ WORKBOOK TEXT

IT_WTXT TYPE STANDARD TABLE OF T_WTXT WITH HEADER LINE ,

WA_WTXT LIKE LINE OF IT_WTXT.

DATA: X_ANS(1) TYPE C ,

V_COUNT TYPE I .

***** DECLARATION FOR ALV DISPLAY

*&---------------------------------------------------------------------*

*variable for Report ID

DATA: V_REPID LIKE SY-REPID .

*declaration for fieldcatalog

DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.

DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.

* declaration for events table where user comand or set PF status will

* be defined

DATA: V_EVENTS TYPE SLIS_T_EVENT,

WA_EVENT TYPE SLIS_ALV_EVENT.

* declartion for layout

DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.

* declaration for variant(type of display we want)

DATA: I_VARIANT TYPE DISVARIANT,

I_VARIANT1 TYPE DISVARIANT,

I_SAVE(1) TYPE C.

*Title displayed when the alv list is displayed

DATA: I_TITLE_REPO TYPE LVC_TITLE VALUE 'REPORTS LIST '.

*&---------------------------------------------------------------------*

*& SELECTION SCREEN DEFINATION AND INITIALIZATION OF TEXT VAR

*&---------------------------------------------------------------------*

***Screen to display reports list

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE SCR_Rep.

"SELECTION-SCREEN SKIP 1.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT (40) GF_RDCM2 .

SELECTION-SCREEN POSITION 50.

SELECT-OPTIONS :INFO3 for INFOCUBE .

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK B1.

INITIALIZATION .

SCR_Rep = 'To Display List of Reports'.

GF_RDCM2 = 'Enter InfoProvider Name '.

****VALIDATION OF INPUT : CHECK FOR INFOPROVIDER NAME

AT SELECTION-SCREEN ON BLOCK B1 .

IF INFO3-LOW IS INITIAL AND INFO3-HIGH IS INITIAL.

MESSAGE 'ENTER DETAILS OF INFOPROVIDER ' TYPE 'W'.

ENDIF .

*&--------------------------------------------------------------------*

*& ALV GRID DISPLAY

*&--------------------------------------------------------------------*

INITIALIZATION.

V_REPID = SY-REPID.

START-OF-SELECTION.

PERFORM DATA_RETRIEVAL. “ select data from database table

PERFORM BUILD_FIELDCATLOG. “ display setting

PERFORM DISPLAY_ALV_REPORT.” Display data

Page 12: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 12

*&--------------------------------------------------------------------*

*& Form data_retrieval

*&--------------------------------------------------------------------*

*& Retreiving values from the database tables

*---------------------------------------------------------------------*

FORM DATA_RETRIEVAL.

**READ INFOPROVIDER NAMES

REFRESH : IT_INFO .

CLEAR : WA_INFO.

LOOP AT INFO3 .

WA_INFO-ICUBE = INFO3+3 .

APPEND WA_INFO TO IT_INFO .

ENDLOOP .

*READ QUERY IN INFOPROVIDERS

SELECT COMPUID OBJVERS INFOCUBE GENUNIID COMPID AUTHOR LASTUSER MODTIME

FROM RSRREPDIR

INTO TABLE IT_QREAD

FOR ALL ENTRIES IN IT_INFO

WHERE INFOCUBE = IT_INFO-ICUBE

AND OBJVERS = 'A'.

IF SY-SUBRC <> 0 .

MESSAGE 'NO ACTIVE QUERY EXIST ON THIS INFOPROVIDER.PRESS ENTER TO CONTINUE

' TYPE 'W'.

ELSE.

"READ QUERY DESCRIPTION

SELECT ELTUID OBJVERS TXTLG

FROM RSZELTTXT

INTO TABLE IT_QTXT

FOR ALL ENTRIES IN IT_QREAD

WHERE ELTUID = IT_QREAD-COMPUID

AND OBJVERS = 'A'.

"READ WORKBOOK DETAILS

SELECT WORKBOOKID OBJVERS GENUNIID

FROM RSRWORKBOOK

INTO TABLE IT_WREAD

FOR ALL ENTRIES IN IT_QREAD

WHERE GENUNIID = IT_QREAD-GENUNIID

AND OBJVERS = 'A'.

"TO CHECHK TYPE OF REPORT

SELECT WORKBOOKID OBJVERS WBTYP FROM RSRWBINDEX

INTO TABLE IT_REPTYPE

FOR ALL ENTRIES IN IT_WREAD

WHERE WORKBOOKID = IT_WREAD-WORKBOOKID

AND OBJVERS = 'A'.

IF SY-SUBRC EQ 0 .

"READ REPORT DESCRIPTION

SELECT WORKBOOKID OBJVERS TITLE

FROM RSRWBINDEXT

INTO TABLE IT_WTXT

FOR ALL ENTRIES IN IT_WREAD

WHERE WORKBOOKID = IT_WREAD-WORKBOOKID

AND OBJVERS = 'A'.

ENDIF.

SORT IT_QREAD BY COMPUID .

SORT IT_QTXT BY ELTUID .

Page 13: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 13

LOOP AT IT_QREAD INTO WA_QREAD .

" FILL ALL DETAILS IN ONE INTERNAL TABLE FOR DISPLAY

WA_REPORTS-COMPUID = WA_QREAD-COMPUID .

WA_REPORTS-INFOCUBE = WA_QREAD-INFOCUBE .

WA_REPORTS-GENUNIID = WA_QREAD-GENUNIID .

WA_REPORTS-COMPID = WA_QREAD-COMPID .

WA_REPORTS-AUTHOR = WA_QREAD-AUTHOR .

WA_REPORTS-LASTUSER = WA_QREAD-LASTUSER .

WA_REPORTS-MODTIME = WA_QREAD-MODTIME .

"READ QUERY DESCRIPTION

READ TABLE IT_QTXT INTO WA_QTXT WITH KEY ELTUID = WA_QREAD-

COMPUID BINARY SEARCH .

WA_REPORTS-TXTLG = WA_QTXT-TXTLG .

APPEND WA_REPORTS TO IT_REPORTS .

ENDLOOP.

SORT IT_REPORTS BY GENUNIID .

SORT IT_WTXT BY WORKBOOKID .

IT_REPORTS_TEMP[] = IT_REPORTS[] .

REFRESH : IT_REPORTS .

LOOP AT IT_REPORTS_TEMP INTO WA_REPORTS.

LOOP AT IT_WREAD INTO WA_WREAD WHERE GENUNIID = WA_REPORTS-

GENUNIID.

WA_REPORTS-WORKBOOKID = WA_WREAD-WORKBOOKID .

"READ TYPE OF REPORT

READ TABLE IT_REPTYPE INTO WA_REPTYPE WITH KEY WORKBOOKID = WA_

WREAD-WORKBOOKID BINARY SEARCH.

IF WA_REPTYPE-WBTYP EQ 'C'.

WA_REPORTS-WBTYP = 'CRYSTAL REPORT'.

ELSE.

WA_REPORTS-WBTYP = 'WORKBOOK '.

ENDIF.

READ TABLE IT_WTXT INTO WA_WTXT WITH KEY WORKBOOKID = WA_WREAD-

WORKBOOKID BINARY SEARCH.

WA_REPORTS-TITLE = WA_WTXT-TITLE .

APPEND WA_REPORTS TO IT_REPORTS .

ENDLOOP.

APPEND WA_REPORTS TO IT_REPORTS .

ENDLOOP.

REFRESH :IT_QREAD ,IT_WREAD ,IT_WTXT ,IT_WTXT ,IT_REPORTS_TEMP .

SORT IT_REPORTS BY INFOCUBE COMPID ASCENDING WORKBOOKID DESCENDING .

DELETE ADJACENT DUPLICATES FROM IT_REPORTS COMPARING INFOCUBE COMPID WORK

BOOKID .

ENDIF.

CLEAR : WA_INFO , WA_REPORTS , WA_WTXT , WA_WREAD , WA_QREAD , WA_QTXT .

ENDFORM .

*&--------------------------------------------------------------------*

*& Form BUILD_FIELDCATLOG

*&--------------------------------------------------------------------*

*&Field catalog has all the field details and settings of data to be displayed

*---------------------------------------------------------------------*

FORM BUILD_FIELDCATLOG.

Page 14: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 14

WA_FIELDCAT-TABNAME = 'IT_REPORTS'. ”TABLE TO READ

WA_FIELDCAT-FIELDNAME = 'INFOCUBE '. ”COLUMN NAME IN TABLE STORES DATA

WA_FIELDCAT-SELTEXT_M = 'INFOPROVIDER'. ”COLUMN NAME IN OUTPUT

WA_FIELDCAT-COL_POS = 1. “FIELD POSITION IN OUTPUT DISPLAY

WA_FIELDCAT-OUTPUTLEN = 15.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_REPORTS'.

WA_FIELDCAT-FIELDNAME = 'COMPID'.

WA_FIELDCAT-SELTEXT_M = 'QUERY TECH NAME'.

WA_FIELDCAT-COL_POS = 2.

WA_FIELDCAT-OUTPUTLEN = 25.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_REPORTS'.

WA_FIELDCAT-FIELDNAME = 'AUTHOR'.

WA_FIELDCAT-SELTEXT_M = 'CREATED BY'.

WA_FIELDCAT-COL_POS = 4.

WA_FIELDCAT-OUTPUTLEN = 10.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_REPORTS'.

WA_FIELDCAT-FIELDNAME = 'LASTUSER'.

WA_FIELDCAT-SELTEXT_M = 'LAST CHANGED BY'.

WA_FIELDCAT-COL_POS = 5.

WA_FIELDCAT-OUTPUTLEN = 10.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_REPORTS'.

WA_FIELDCAT-FIELDNAME = 'MODTIME'.

WA_FIELDCAT-SELTEXT_M = 'LAST CHANGE DATETIME'.

WA_FIELDCAT-COL_POS = 6.

WA_FIELDCAT-OUTPUTLEN = 10.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_REPORTS'.

WA_FIELDCAT-FIELDNAME = 'TXTLG'.

WA_FIELDCAT-SELTEXT_M = 'QUERY DESC'.

WA_FIELDCAT-COL_POS = 3.

WA_FIELDCAT-OUTPUTLEN = 40.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_REPORTS'.

WA_FIELDCAT-FIELDNAME = 'WBTYP'.

WA_FIELDCAT-SELTEXT_M = 'REPORT TYPE'.

WA_FIELDCAT-COL_POS = 7.

WA_FIELDCAT-OUTPUTLEN = 15.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_REPORTS'.

WA_FIELDCAT-FIELDNAME = 'WORKBOOKID'.

WA_FIELDCAT-SELTEXT_M = 'REPORT ID'.

WA_FIELDCAT-COL_POS = 8.

WA_FIELDCAT-OUTPUTLEN = 20.

APPEND WA_FIELDCAT TO I_FIELDCAT.

Page 15: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 15

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_REPORTS'.

WA_FIELDCAT-FIELDNAME = 'TITLE'.

WA_FIELDCAT-SELTEXT_M = 'REPORT DESC'.

WA_FIELDCAT-COL_POS = 9.

WA_FIELDCAT-OUTPUTLEN = 40.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

ENDFORM. "BUILD_FIELDCATLOG

*&--------------------------------------------------------------------*

*& DISPLAY REPORT PROGRAM OUTPUT FROM ALV GRID

*&--------------------------------------------------------------------*

* text

*---------------------------------------------------------------------*

FORM DISPLAY_ALV_REPORT.

V_REPID = SY-REPID.

DESCRIBE TABLE IT_REPORTS LINES V_COUNT .

IF V_COUNT NE 0.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = V_REPID

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

I_GRID_TITLE = I_TITLE_REPO”TITLE OF OUTPUT

IT_FIELDCAT = I_FIELDCAT[]

I_SAVE = 'A'

IT_EVENTS = V_EVENTS

TABLES

T_OUTTAB = IT_REPORTS.”TABLE HAVE DATA

IF SY-SUBRC <> 0.

MESSAGE 'ERROR OCCURED IN ALV DISPLAY' TYPE 'W'.

ENDIF.

ELSE.

WRITE : 'NO LOGS TO DISPLAY '.

ENDIF.

ENDFORM .

*&--------------------------------------------------------------------*

*& end of program

*&--------------------------------------------------------------------*

Page 16: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 16

Using Report Program:

1. Run the report from T-CODE SE38 (fig 5).

Fig 5 2. Info Provider’s Technical name is input in following screen (will appear after executing report fig 6).

Fig 6

3. It will display the output in following format (fig 7). Which will a tabular output having info provider name,

Bex query name ,description of query ,id of created by ,id of last changed by ,type of report(workbook, crystal report etc. ) ,technical name of report and description of report .

Fig 7 4. In case of wrong input values or absence of any relevant information warnings and error will get

displayed.

Page 17: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 17

Related Content

Infoproviders in SAP BW

Bex Query Designer

Tables in SAP system gives query workbook and crystal report information

For more information, visit the EDW homepage.

Page 18: How to Find Bex-Reports, Workbook and BO Crystal … to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider Applies to: Software Component: SAP_BW. For more

How to Find Bex-Reports, Workbook and BO Crystal Reports Built on an Info Provider

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 18

Disclaimer and Liability Notice

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.