BEX Workbook Size Analysis report

One element influencing the performance of a BEx Workbook is its size. Each time you open a BEX Workbook from your BEx Analyzer, the excel file corresponding to the BEx Workbook is retrieved from the BW servers (it is stored as blob format in table RSRWBSTORE) and transferred to the front end.

Thus, before even doing a first refresh, there might be a perceivable delay due to the workbook transfer.

You can monitor the sizes of all the workbooks in your BW system with the following report available in Saplink format:

Download – PROG_ZBI_WORKBOOK_SIZES.slnk –  2.4 kB – 271   downloads

The size displayed by the report is in lines in table RSRBWSTORE. The real size is about 2000kb multiplied by the number of lines.

(Note: The BEx Workbooks are also stored in temp directory on the PC when executed. I do not know however if this means that the entire workbook is not always transferred on opening. If you have any info on the subject, please leave a comment.)

The below code also displays the French and Dutch workbook title.  (Just change the F and N to E and D to have it in English and German for instance.

*&---------------------------------------------------------------------*
*& Report  ZBI_WORKBOOK_SIZES
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  zbi_workbook_sizes.

TYPES:
   BEGIN OF ty_output,
     workbookid TYPE rsrwbindex-workbookid,
     lines TYPE i,
     title_n TYPE rsrwbindext-title,
     title_f TYPE rsrwbindext-title,
   END OF ty_output.

DATA:
      l_lines TYPE i,
      lt_output TYPE TABLE OF ty_output,
      ls_output TYPE ty_output,
      ls_rsrwbindex TYPE rsrwbindex,
      ls_rsrwbindext_n TYPE rsrwbindext,
      ls_rsrwbindext_f TYPE rsrwbindext,
      lt_rsrwbindex TYPE TABLE OF rsrwbindex.

" Selection parameters
SELECT-OPTIONS s_wbk FOR ls_rsrwbindex-workbookid.

" Get list of workbooks
SELECT * FROM rsrwbindex INTO TABLE lt_rsrwbindex
  WHERE workbookid IN s_wbk
    AND objvers = 'A'.

LOOP AT lt_rsrwbindex INTO ls_rsrwbindex.
  SELECT MAX( linenumber ) FROM rsrwbstore INTO l_lines
    WHERE objvers = 'A'
      AND workbookid = ls_rsrwbindex-workbookid.
  SELECT SINGLE * FROM rsrwbindext INTO ls_rsrwbindext_n
    WHERE objvers = 'A'
     AND langu = 'N'
     AND  workbookid = ls_rsrwbindex-workbookid.

  SELECT SINGLE * FROM rsrwbindext INTO ls_rsrwbindext_f
WHERE objvers = 'A'
 AND langu = 'F'
 AND  workbookid = ls_rsrwbindex-workbookid.
  ls_output-workbookid = ls_rsrwbindex-workbookid.
  ls_output-lines = l_lines.
  ls_output-title_n = ls_rsrwbindext_n-title.
  ls_output-title_f = ls_rsrwbindext_f-title.
  APPEND ls_output TO lt_output.
ENDLOOP.
SORT lt_output BY lines DESCENDING.
LOOP AT lt_output INTO ls_output.
  WRITE:  ls_output-title_n, ls_output-title_f, ls_output-lines, ls_output-workbookid .
  NEW-LINE.
ENDLOOP.

Leave a Reply