Wednesday, June 8, 2016

Changes in BW system after HANA migration

This is just yet another blog about BWonHANA (BoH). In particular it is about changes in the BW system that was brought to HANA DB offers. Basically I go through things that are visible once the BW system is migrated to HANA DB.

Let’s go via t-code RSA1’s left pane sections:

Modeling -> “SAP HANA Analysis Process” there is a new section called or HAP. The HAP enables to run SAP HANA native functions (e.g. AFL functions like PAL or L or R scripts or SQL procedure) directly on BW’s InfoProvider. The data can be processed as data set as opposite to classic BW transformation. Each HAP process has source (it can be most of most BW InfoProviders) then function and finally target (Analytic index, DSO, DB tab, or another HAP process).

Modeling -> InfoProvider -> new objects: Open DSO views and Composite Providers. Within this part of the RSA1 -> Modeling -> InfoProvider section there is a possibility to create and maintain these new objects:

Modeling -> InfoProvider -> cubes: Star scheme of classic BW’s infocubes was reorganized to just 2 tables: fact and 1 dimension table. There is only package dimension which has its own dimension table available. The SIDs of all other characteristics are stored directly in the fact table.

Moreover following are HANA related things that can be spotted in infocube’s settings screen:

External SAP HANA view: flag that tells an external SAP HANA view is generated for the infocube. The external HANA view can be used by native HANA apps as interface to BW models and data.

Auditable: if this flag is set then an audit dimension is added into the cube. Later it can be used to cover audit reporting to e.g. see who and when did a change into planning data in case of planning cube.

Also there are few less tabs on Manage screen of infocube (Performance and Rollup tabs are gone):

Before HANA:


Also in case cube is converted to HANA-Optimized cube there is a new icon indicating it on right side of the cube:

Modeling -> InfoProvider -> DSO: here is new flag call “External SAP HANA View”. See below on IO part for details of this flag.

All DSOs that are not HANA optimized (no X flag in RSDODSO-IMOFL) are having a little square icon next to the icon of the DSO. This is similar way of “marking” obsolete objects as it was in BW 7.x while marking 3.x related objects like DS, IS, etc…

Modeling -> PC: There are few new processes related to Hana within process chain’s processes. Especially when it comes to Execution of the HAP processes.

Modeling -> TRFN: in the menu Extras of Transformation maintenance screen there is a possibility to display generated HANA transformation similarly as it is possible to display generated ABAP program.

Modeling -> DTP: On the DTP maintenance screen here are following new things. First there is a checkbox which indicates whether the DTP shall be executed in HANA. In this case all data is processed directly by the database no ABAP app server is involved. This mode of execution is called SAP HANA Processing mode.

In addition to the checkbox there is a button called “Check Availability”. This button helps to determine whether the DTP can be pushed to the HANA DB for execution. There are few prerequisites that must be met in order to have the possibility to execute the DTP in HANA. See here for details on these prerequisites.

Modeling -> InfoObjects: Here at IO maintenance screen there is couple of new things as well. First there are field SAP HANA Package and SAP HANA View. These serve as source of data for the IO (e.g. MD). By this the data from the IO will be taken from SAP HAN View specified here. The Package field says where in which HANA package the view is stored.

Moreover there are also following checkboxes. They are following ones: “External SAP HANA View for MD” and “External SAP HANA View for MD InfoProvider”. These two basically serves for purposes of generating SAP HANA Views for InfoObjects. Having the view generated enables consumption of BW data in the HANA. This supports so called mixed scenarios when BW data and HANA data is merged together in HANA with HANA tools. See more details about the flags here. Of course there are some restrictions. For details on the restrictions see here.

Administration: Also here some new objects and features can be spotted.

On general Admin view there is an External SAP HANA View part. It can be used to view the Views.

On Monitors view there is a monitor screen available for the HAP processes. It servers for monitoring of the HAP runs.

On Current Setting part a settings related to External SAP HANA Views.

Transport Connection obviously also here few new objects were added in order to support operations with them. See below comparison between how the Transport Connection screens look like in BW 74 system on any DB and on HANA DB.

That’s all for now! As a disclaimer I need to say that there might be many more ways how to observe the new exciting things that are coming to BW system while running on HANA DB.

Tuesday, May 31, 2016

Evaluating user password in NetWeaver ABAP systems

ABAP programmers sometime need to authenticate a user during the runtime of some ABAP application. As an example of this need; one can say that if user is supposed to confirm some data in ABAP application a system shall ask for user’s password and once it is correct it really does the confirmation. Assumption here is that once user is entering the password he or she must be really aware that a particular activity (e.g. confirming a batch in manufacturing process) is untended to be done.

So being as the ABAP programmer how would I validate the user password? Luckily SAP is providing a very handy function module to do that. The name of the FM is SUSR_LOGIN_CHECK_RFC. It has very simple interface of importing parameters and by evaluating exceptions I can suite my application with regards either validation passed, user is locked, password is wrong etc.


PARAMETERS: p_usr TYPE sy-uname,
            p_pwd TYPE rsyst-bcode.

   bname                  = sy-uname
   password               = p_pwd
   wait                   = 1
   user_locked            = 2
   user_not_active        = 3
   password_expired       = 4
   wrong_password         = 5
   no_check_for_this_user = 6
   internal_error         = 7.

WRITE: sy-subrc.
CASE sy-subrc.
  WHEN 0. WRITE: 'everything OK'.
  WHEN 1. WRITE: 'wait'.
  WHEN 2. WRITE: 'user_locked '.
  WHEN 3. WRITE: 'user_not_active'.
  WHEN 4. WRITE: 'password_expired'.
  WHEN 5. WRITE: 'wrong_password '.
  WHEN 6. WRITE: 'no_check_for_this_user'.
  WHEN 7. WRITE: 'internal_error'.

Source code available at:

Monday, May 9, 2016

Historic versions of DTP

DTP or Data Transfer Process is basically used to load data between two BW’s InfoProviders. It carries an information like from the data is extracted from; where the data is supposed to be loaded to; setting on how the extraction and loading shall be executed, error handling etc. All these information can be adjusted for one DTP.  This leads to creation of many version of the DTP over its life time.

These versions are stored in table RSBKDTPH - DTP: Historic Versions. Normally when the DPT is shown in tcode RSA1 the latest version is shown. When former version of the DTP or called as Historic Versions in BW’s terminology shall be shown it can be used as well. Within the UI of the DTP within the RSA there is a screen called Version Management available.

However in this screen only meta-data of the DTP version is shown. No real picture of the DTP how it really looked at the time when now historic version was active one.

To showing historic version of the DTP how it really looked in the common DTP framework we need to use different tool. The tool is called tcode RSDTP. Below are screenshots of the same DTP displayed its different historic versions in the RSDTP. In this view it is clearly visible what was different in the two versions.

Sunday, May 1, 2016

Development package for obsolete standard BW’s DDIC Objects

Some time back I wrote about BW system Data Dictionary (DDIC) objects that are being locked for further changes. This means the changes are not foreseen to be done into these objects (stored in development package RS_DTEL_LOCKED). There is another interesting development package called BW_WHM_TO_BE_DELETED available in BW systems.

This one stores obsolete BW objects that are not supposed to be used anymore. However due to many references that may exist in SAP standard or customer ABAP programs the objects are not deleted just “parked” in this way into special development package.

As an example of the objects stored in here I list a database table “RSDDSTAT - Statistics data BW for aggregate selection and accounting”. The table was in pre 7.x versions of BW used to stored BI Statistics data. In the 7.x version is not needed anymore.

Saturday, April 30, 2016

Statistics of BEx Query Views

This is very common case. BW users are using BEx Query Views created by them and BW admin would like to analyze how the query views are utilized in the BW system. The query views are a modified view of the data for a BEx query. In some system it is very used functionality. Users adjust the query by their needs and they just keep them using.

As BW administrator we usually do assessment of how users are using the system. This can serve as base for further clean ups in the system. For example queries that are not used shall be deleted in the system. This approach can be advanced also to the Query Views. But how to analyze a usage of the Query Views? Naturally one may turn to BW Statistics. Unfortunately the BW statistics doesn’t support the Query Views. Although this is not official information there are forum posts on SDN which may suggest that SAP confirmed that currently (the post is from 2011) and even now (2016) the function is not available for the Query Views. Also you can encounter SDN forum posts saying that statistics of the query views are available via tcode ST13 -> tool name: BW_QUERY_USAGE. However this is not case either.

So how to solve the issue? The only way I can think of is to look at the statistics of the BEx Query which is providing the data for to the Query View. So whenever is the to the Query View run by the user this cause also the run the query on which the query view is based on. So by analyzing BW Statistics of the query we can get an overview how the query view is used.

Monday, March 21, 2016

Admin Cockpit Sanity Check Tool

BI Administration Cockpit is important function within SAP BW system. It basically brings all pieces needed to run BI Statistic together. Even when we talk about the BI (or BW) Statistic we refer to it as BI Administration Cockpit. The cockpit or Statistic is not deployed in many even productions BW systems. It is really a pity as it provides many useful functions.

There is a tool to quickly check what a status of deploying of BI Statistics is. It is available via tcode ACPTOOL (ABAP program RSTCT_ADM_CP_CHECK_TOOL).

Selection screen:

Output Log:

Useful posts:

Thursday, March 17, 2016

BEx Query Mass Maintenance tool

In case we need to change some settings of BEx query we either do it in BEx Query Designer or in tcode RSRT. Sometimes we need to setup same settings for several queries. In such a case it would be a lengthy process to perform the same activity all over for multiple queries.

Luckily there is a possibility to perform a mass maintenance of BEx Queries. This function is available within tcode RSRT -> menu: Environment -> Query Mass Maintenance. Once you enter the tool you get a selection screen where you can enter any InfoProvider. Based on the InfoProvider entered all queries associated with the InfoProvider are shown in a list below.

Here you can select particular queries for which you want to do the maintenance. Once confirmed you enter next screen dedicated to the maintenance itself. Over here it is possible to select particular property/ies to be maintained and its/their values. Once saved all queries are maintained.

Sunday, March 13, 2016

External SAP HANA view for BW object

As mentioned in my previous post there is a possibility to generate external SAP HANA view for BEx Query. There are also other BW objects which the external SAP HANA view can be generated for. In case a particular BW object has flag enabled than the HANA once it is accessing the BW objects is using this view. This means that whole data access is faster as no BW runtime is used but an external SAP HANA view is used instead.

Basically following are BW object types for which it is possible to use external HANA views:

·         BEx Query, flag is visible at BEx Query Designer->Query Properties->Extended

·         InfoObject, flag is visible at RSA1->Modelling->IO maintenance screen->tab Master Data/Texts

·         InfoProvider (e.g. (a)DSO/Cube/CompositeProvider), flag is visible at RSA1->Modelling->InfoProvider properties at Settings section

However there are many limitations as of now. Always check documentation or documentation  for this feature. The flag is stored in following physical database tables:

RSDDBOBJPROP-HANA_VIEW – in case of InfoCube or InfoObject
RSDCHA or RSDCHABAS field HANAMODELFL in case of InfoObject
RSDCUBE-HANAMODELFL - in case of cube
RSOADSO or RSDODSO field HANA_VIEW – in case of DSO
RSLTIP-HANA_VIEW - in case of Transient Provider
RSOHCPR-HANAMODELFL - in case of HANA CompositeProvider
RSPLS_ALVL-HANAMODELFL - in case of Aggregation Level

As the external view is stored in the HANA DB it needs to be able customize in which HANA’s content package the views are stored. The customizing of the HANA content package is available in tcode RS2HANA_VIEW (ABAP program RS2HANA_VIEW_SETTINGS). It is stored under identificator called RS2HANA_PACKAGE and its default value is '' in the table RS2HANA_VIEW_SET.

Among the content package also other thigs relevant to external view can be customized. It is basically how the HANA privileges are assigned to the HANA user. In case the HANA privileges are assigned to BW’s roles then field RS2HANA_ASSIGN_TYPE has value R in the same table. In addition it can be specified whether the HANA privileges are directly assigned to the SAP HANA user then field RS2HANA_DBMS_USER_MAPPING has value D.

More information:

BEx Query: Release of external access to query

BW queries can be consumed by 3rd party BI tools for long time. This feature needs to be enabled for particular query. To enable it there are settings that are to be done in BEx Query Designer. Furthermore there are even more settings that can be set in the query level with regards to external access to the query’s data. In this blog post I look at these settings.
Following flags are available in BEx Query Designer under Properties section of the query and on tab called “Extended”.

1. flag 'By OLE DB for OLAP' = Allows to consume the query in external reporting tools that uses the query as data source. Sometimes such a query is it is referred as ODBO provider or just ODBO (Ole DB for Olap. The flag is present physically in following database tables:
RSRREPDIR-RFCSUPPORT - Report supports access using OLAP API

2. flag 'By Easy Query' = so called Easy Query (EQ) flag. It allows an access of the query for external access as an Easy Query. The EQ is static query with no formatting settings and it can be used as SOAP service. Once this flag is enabled for particular query then it needs to be managed in Easy Query Manager (tcode EQMANAGER) in BW’s backend system. The flag is present physically in following database table:
RSZELTPROP- EQSUPPORT - Query: RFC Publishing as VirtualProvider (yes/no)

3. flag 'By OData' = so called OData Query flag. It allows consuming of the query data by ODATA service. It is also an integration of SAP Business Warehouse with SAP Gateway system where it provides analytic queries of in BW system as BW OData Queries for mobile scenarios. The flag is present physically in following database table:

Both the EQ and OData techniques are focused on so called lightweight consumption. This means that need SAP Gateway to be used. Easy queries can be used also via SOAP or RFC as REST based services.

The above two techniques are also part of BW’s Open Analysis Interfaces. This is meat with regards to extraction of the data from source systems and analyzing of the data in BW in various reporting front-end tools.

4. flag 'HANASUPPORT' – Means generation of external SAP HANA view for BW object. There are many BW’s objects for which the HANA view can be generated and the BEx query is one of these. The HANA view is not used by BW itself but by SAP HANA natively while accessing the SAP BW. The flag is present physically in following database table:

For assigning the HANA external view flag to other SAP BW objects see here.

Please note that flag no 1 is available for long time and was introduced in BEx Query Designer 7.x. However for flags 2 and 3 there is a prerequisite to run SAP NetWeaver 7.0 BW Front End for GUI 720.

Useful information:
1598778 - Query property 'Release for External Access by Easy Query'
1601473 - Query property 'Release for External Access by Easy Query'
2103222 - Generation and Transportation of BEx Query with active OData-Flag

Thursday, March 10, 2016

Qlikview's SAP connectors

Qlikview is popular BI tool used also by organization running SAP BW systems as frontend tool. As every tool that is used on top of the SAP BW it needs to extract the data from out of the BW and render it to user. To do this Qlikview uses so called SAP Connector.

There are following types of SAP Connector’s delivered by Qlikview:

Connectors for Any SAP systems:        Purpose:
Qlikview SAP SQL Connector                    Connector for any DB table in the SAP system.
QlikView SAP Report Connector                Connector for SAP ABAP reports.
Qlikview SAP Query Connector                 Connector for classic SAP Query.
QlikView SAP Extractor Connector             Connector for DataSources in SAP system .delivered by SAP BW API
Qlikview SAP BAPI Connector                   Connector for remote function modules in SAP systems (so called BAPIs).

Connectors for SAP BW systems:        Purpose:
Qlikview SAP OLAP Connector                  Connector for BW BEx Queries and cubes.
QlikView SAP DSO/ODS Connector            Connector for BW’s objects like DSO/ODS, capable of fetching also metadata of DSO/ODS objects (e.g. DSO’s structure).

Physically the Qlikview SAP Connector is delivered as SAP transport which consists of following development packages:

/QTQVC/QTDEV                  Developmentclass QlickTech

/QTQVC/QTDEV_BW            Qlik development for BW systems

Wednesday, March 9, 2016

White / Black Lists

In general similar to any other industry or area of people's interests also in terms of SAP we talk about white and black lists.

Basically anything which is on the white list is approved or recognized or just simply speaking it is considered to be safe. On other hand anything which is on the black list is forbidden, unknown or just not safe.

In terms of SAP we can talk similarly here in here about programming objects. It can be also an access to certain objects where there are some objects that can be accessed (while list) and objects to which an access is denied (black list).

Let focus on e.g. RFC function modules. Some of them can be protected by authorization and therefore are on the white list. Access to some other RFC FM can be forbidden and they are put to black list. Usually the RFC FM are protected by authorization object S_RFC.

Related information:

1664340 - Documentation of authorization object S_RFC is unclear

Special characters in Analysis Authorization values

First a brief info on what Analysis Authorization is.

Analysis Authorizations (AAUT) is concept used in BW systems to grant an access to the data in the system for users. This AUT concept is not based on the standard authorization concept of SAP as it is used in SAP transactional systems like ECC. The AAUT concept serves the purpose of users that access query data.

Unlike standard authorization concept of SAP which is based on classic authorization objects the AAUT concept is based on so called Analysis Authorization object. Such an object includes a group of characteristics and there are values defined for these characteristics which an access will be granted to. The AAUT object (or so called authorization objects for reporting) can include any characteristics that are flagged as authorization-relevant characteristics. This flag is available on maintenance screen of the characteristics in RSA1 -> Modeling -> Business Explorer -> Authorization Relevant. Once the flag is enabled AAUT objects for reporting can be generated for the characteristic.

While BW report or query is running by user the system selects the data from infoprovider. Once there is an authorization relevant characteristics part of the data set the system evaluates whether user has enough authorization for the whole data set. Only in case use fulfills the AUT values they the data is displayed.

The AAUT objects are maintained in tcode RSECAUTH (you can jump there also via tcode RSECADMIN). One AAUT object can have multiple characteristic included and each of them can have multiple values against which an access is evaluated. Basically the values can be of two types: flat values or hierarchy values. All operators like EQ, BT, GT, LE etc. are possible.
Now let’s see what different flat values that can be entered here are. Except regular values where the value is precisely spelled out there can be also following ones:

* (asterisk): represents any number of characters

+ (plus): represents exactly one character

: (colon): authorization for aggregated values, serves for purposes of displaying aggregated values (e.g. totals), in case there are two characteristic values tied to different key figures and user is only authorized to see the data for characteristics of one value having Colon in the AAUT object will enable the user to see the total coming from both values of the characteristic.

$ (dollar sign): enables usage of BW variables of type customer exit in authorizations, the variable name is introduced by dollar sign.

Few examples:
I EQ      02                                   //fixed value
I EQ      0TCT_24                           // fixed value          
I CP      A*                                   // patter                
I EQ      $VAR_SECT                       //variable

I EQ      :                                     //for aggregated values