Tag Archives: sap bw

BEx Analyzer – Default Workbook

Via the “Global Settings” option in the BEx Analyzer add-on menu you can define the Workbook ID of the Default Workbook. The default workbook is the workbook into which queries are opened. By default, the “SAP Default Workbook” is used, but this can be changed to a customized Default Workbook.

References

How to identify the Workbook ID of the SAP Default Workbook?

Go to table RSRWBINDEXT

Search a record with
LANGU = EN OBJVERS
OBJVERS = D
TITLE = “SAP Default Workbook”

FindSAPDefaultWbk1FindSAPDefaultWbk2

How to check which Default Workbook is being used by a user

Check table RSRWBTEMPLATE

See following SCN Post Setting the Global Workbook Template in SAP NetWeaver 2004s BI or BW 3.x

How to open the SAP Default Workbook to make a copy => TCD RRMXP

Line Item dimensions and High Cardinality

Flagging a dimension as line item dimension changes the data modell by that it removes the intermediate SID table that is normally put between fact tables and the actual dimension tables (for flexibility reasons) and joins the fact table directly with the dimension table.

It changes this :

[DIMENSION-TAB1] >-----<  (SID-TAB1) >---< [[FACT TABLE]] >---<  (SID-TAB2) >-----< [DIMENSION-TAB2]

to this:

 [DIMENSION-TAB1] >-----< [[FACT TABLE]]  >---<  (SID-TAB2) >-----< [DIMENSION-TAB2]

 

 

References:

 

“Ready for Input” BEx Variables and MDX

When a front end tool wants to set values for “Ready for Input” BEx Variable via an MDX query, it will use the SAP specific MDX statement: “SAP VARIABLES”.

Here’s the syntax for the SAP VARIABLES clause:

SAP VARIABLES <sap_variables> INCLUDING|EXCLUDING <unique_member_name>

Referenceshttp://lbsackett.typepad.com/larry_sackett/2008/07/mdx-for-netweaver-bi-variables.html

Note: I am working on a project involving OBIEE reporting on top of SAP BW BEx Queries.  OBIEE queries are sent to BW via the MDX query language.

BW Inactive Objects Checker – ZBI_INACTIVE_OBJECTS

ZBI_INACTIVE_OBJECTS is a tool that I adapted from a program found on SCN that checks for inactive BW objects. In addition it stores a snapshot of the inactive objects. This way you can execute it before and after a transport operation. A ‘diff’ option will display

  • new or activted objects (that either did not exist or were inactive at the previous execution)
  • inactivated objects (that were active at the previous execution)

In the future I plan to adapt the tool so as to integrate it to the CTS import mechanism. In this way, when a transport contains BW objects, a diff on inactive objects would be automatically be performed and the result inserted in the log and/or mailed to the owner of the transport request.

Download – [NUGG_ZBI_INACTIVE_OBJECTS.nugg] –  34.6 kB – 474   downloads

RSCOMPCONS and Check Consistency Flag on Multiprovider

MPRO_COnsistencyFlag1

In BW 3.5 the identification of characteristics and navigation attributes in MultiProviders did not need to be consistent. This means that for compounded characteristics, the assignments for each underlying infoprovider must be consistent with regards of compounded characteristics and compunding objects.(See  Note 920416 – Checking compounding consistency in MultiProviders for details)

During activation this caused only a warning message up to BW 3.5.

As of BW 7.x this warning was changed to an error. This can cause problems to migrated Infoproviders.

Several notes were released to solve this. At some point the possibility to convert the error to a warning on the level of the individual Multiprovider has been added.

Yo can find the optional setting when editing/displaying the Multiprovider in RSA1, via the Extras menu entry.

MPRO_COnsistencyFlag2

 

Here is a list of notes to check in relation to this problem.

See also the following article in SDN.

Consistency Issues in MultiProviders – BI 7.0

Keywords:
BRAIN A152
R7I 135
RSCOMPCONS

RSADMIN

Using the RSADMIN table in BW

 

Using the RSADMIN table in BW

The RSADMIN table is used as a configuration table for many BW processes and functionnalities.

The following links provide information on the parameter and pointers to specific SAP Notes related to each parameter.

See also http://wiki.sdn.sap.com/wiki/display/BI/Important+RSADMIN+Parameters

How to update parameters

Use program SAP_RSADMIN_MAINTAIN to insert, update, delete.
Also to access via ABAP use function module RSA2_RSADMIN_GET or class CL_RSDRI_INFOPROV->RSADMIN_PARAM_READ.

Transporting RSADMIN parameters

 

It should be maintained in each system separately (Dev, Acceptance, Production), but it is possible to transport parameters by creating a transport request and manually adding key values as follows:

Prog ID:        R3TR
Object Type: TABU 
Object Name: RSADMIN
Object Key:   names_of_parameters_that_you_want_to_transport
 
 

 

 

 

BRAIN 670 – Error in BW: error creating tmp table – RS_EXCEPTION 105 error creating tmp table

SAP_DROP_TABLE_1

After a BW SP upgrade you might get the following error at query execution

EError in BW: error creating tmp table                                                                                               RS_EXCEPTION        105error creating tmp table

AAn error occurred when getting data from the processor.                                                                             BRAIN               670

I>> Row: xx Inc: IF_RSDRH_HIER_STORAGE~CREATE Prog: CL_RSDRH_DBTAB_STORAGE                                                           RS_EXCEPTION        301CL_RSDRH_DBTAB_STORAGE

This seems to be an error that occurs regularly on BW systems after an upgrade. To solve it try deleting the temporary tables with the report SAP_DROP_TMPTABLES (see SAP notes 698280 and 449891)..

You should run report SAP_DROP_TMPTABLE + Option “Temp. Hierarchy Table (02/08).

SAP_DROP_TABLE_2

Once done, execute again the BEx report in RSRT. The error message should not appear anymore.

 

 

 

 

Locate the PSA for a Data Source

Business scenario:
For a given BW master data object, I needed to identify deletions that take place in the source system. However for this particular object, the data source does not provide you with a deletion flag. Instead, the object is simply removed from the source tables.

psa

I therefore created a transformation in BW that flags as ‘deleted’ those master data records that do not appear any more in the PSA table of the daily FULL load.

The transformation i created is a loop-back transformation (the source and target of the transformation are the same object). In the source routine, the PSA table of the objects data source is checked.

To identify the PSA table dynamically I used the functions described in the Following SDN Article. (If you use SAPLINK, the report described in the article is available for download below.
You can download the code of the function here in Saplink format.
Download – PROG_ZBW_IDENTIFY_PSA.slnk – 5.2 kB – 300   downloads

See also SAP FM ZAIB2_PSA_TAB_AND_REQ_GET returns lots of info (PSA table, last request et al)

Some information on how to access PSA data:
When the system detects an incompatible change to the transfer structure, a new version of the PSA, meaning a new PSA table, is created. Data is written to the new table when the next request is updated.

The original table remains unchanged and is given a version. You can continue to use all of the PSA functions for each request that was written to the old table.
Data is read from a PSA table in the appropriate format.

1.  If the request was written to the PSA table before the transfer structure was changed, the system uses the format that the transfer structure had before the change.

2.  If the request was been written to the PSA table after the transfer structure was changed, the system uses the format that the transfer structure has after the changed

Find which parent Process Chains call a given local child Process Chain

ParentChild

During the course of BW daily load maintenance I often need to figure out which Process Chains are calling a given Process Chain.

One way to locate all the parent Process Chains that contain a Process Step of type “Local Process Chain” that start a given ‘child”  Process Chain is to look up the information in table RSPCCHAIN. (Please let me know if there is a standard RSA1 approach to do the same that I missed out). 

First identify the  name of the start process variant in PC you want to locate. This is the technical name of the topmost step (start chain) in your child process chain.

Once you have found the name of the start process variant, do a SE16 search on table RSPCCHAIN with the following field selections
TYPE = CHAIN
VARIANTE = Start process variant technical name
OBJVERS  = ‘A’

All the resulting CHAIN_ID values correspond to the names of the parent process chains

The following very simple program does just what is described above.
Download – NUGG_ZBI_PROCESS_CHAINS_PARENTS.nugg –   6.3 kB – Invalid download ID.   downloads

Source code (1 program + 2 FM):

.
*&---------------------------------------------------------------------*
*& Report  ZBI_PROCESS_CHAINS_PARENTS
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

report  zbi_process_chains_parents.

data:
      lt_chains type bapiret2_t,
      ls_chain type bapiret2,
      ls_rspcchain type rspcchain,
      lt_rspcchain type standard table of rspcchain.

select-options s_pc for ls_rspcchain-chain_id.
select * from rspcchain into table lt_rspcchain
  where objvers = 'A'
    and type = 'TRIGGER'
    and chain_id in s_pc.

loop at lt_rspcchain into ls_rspcchain.
  ls_chain-message_v1 = ls_rspcchain-chain_id.
  append ls_chain to lt_chains.
endloop.

call function 'ZBW_PC_ANCESTORS_GET'
  changing
    ct_chains = lt_chains.

loop at lt_chains into ls_chain.
  if ls_chain-row = '0'.
    new-line.skip.
  endif.
    write: / '  '.
  do ls_chain-row times.
    write: '  '.
  enddo.
  if ls_chain-row > 0.
    write: '<=='.
  endif.
  write: ls_chain-message_v1. "', '|'.
*    WRITE: ls_chain-row, '|'.
endloop.
.

.

function zbw_pc_ancestors_get.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  CHANGING
*"     REFERENCE(CT_CHAINS) TYPE  BAPIRET2_T
*"----------------------------------------------------------------------

  data:
        ls_parent type rspc_chain,
        ls_child type rspc_chain,
        lt_parents type rsb_t_pcchain,
        l_recurse type flag,
        ls_chain type bapiret2,
        ls_maxlvl type bapiret2,
        ls_newlvl type bapiret2,
        lt_chains_new type bapiret2_t,
        lt_chains_oldest type bapiret2_t.

  lt_chains_oldest = ct_chains.
  sort lt_chains_oldest by row descending.
  read table lt_chains_oldest into ls_maxlvl index 1.
  ls_newlvl-row = ls_maxlvl-row + 1.
  loop at ct_chains into ls_chain.
    append ls_chain to lt_chains_new.
    if ls_chain-row = ls_maxlvl-row.
      ls_child = ls_chain-message_v1.
      call function 'ZBW_PC_PARENTS_GET'
        exporting
          i_chain_id = ls_child
        importing
          et_parents = lt_parents.
      loop at lt_parents into ls_parent.
        ls_chain-message_v1 = ls_parent.
        ls_chain-row = ls_newlvl-row.
        append ls_chain to lt_chains_new.
        l_recurse = 'X'.
      endloop.
    endif.
  endloop.

  if l_recurse = 'X'.
    call function 'ZBW_PC_ANCESTORS_GET'
      changing
        ct_chains = lt_chains_new.
  endif.
    ct_chains = lt_chains_new.
endfunction.

.

function zbw_pc_parents_get.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(I_CHAIN_ID) TYPE  RSPC_CHAIN
*"  EXPORTING
*"     REFERENCE(ET_PARENTS) TYPE  RSB_T_PCCHAIN
*"----------------------------------------------------------------------

data:
      lt_rspcchain type standard table of rspcchain,
      ls_rspcchain_trigger type rspcchain,
      ls_rspcchain type rspcchain.

refresh et_parents.

" 1st get the corresponding Start Process variants

select * from rspcchain into table lt_rspcchain
  where objvers = 'A'
    and type = 'TRIGGER'
    and chain_id = i_chain_id.

loop at lt_rspcchain into ls_rspcchain_trigger.

  select * from rspcchain into ls_rspcchain
    where objvers = 'A'
      and type = 'CHAIN'
      and variante = ls_rspcchain_trigger-variante.

    append ls_rspcchain-chain_id to et_parents.
  endselect.
endloop.

endfunction.