Monday, July 18, 2016

Check Time Zone of SAP NetWeaver system

One more post regarding time zone of SAP NetWeaver system. It is for actual checking of the time zone of the system. To simply find out what is the time zone of the system there is a report: TZONECHECK - Check Time Zone Data for Consistency. By entering client and language on selection screen the real time zone of the system is displayed.


Wednesday, July 13, 2016

RSM37 - Display of process chains with particular scheduling state

Recently I needed to list all process chains that will be executed in next 24 hours in SAP BW system. I looked to SAP basis tables like TBTCO (Job Status Overview Table) and TBTCP (Background Job Step Overview). But I didn’t succeed. Even custom ABAP report (like advised here) didn’t help me.
Then I found out that actually this requirement is covered by standard BW tcode. It is t-code RSM37. The tcode gives a jobs and corresponding process chains list with its program variants.

On selection screen as Job Name we can enter BI_PROCESS_TRIGGER because it is most common job name for the PC. The name like this comes as default and usually it is not common to change this name. Then by specifying all statuses of the job (like planned, released, ready, active, finished and cancelled) and by giving time interval we get a list which we are interested in. 














In the output screen just filter on column Selection for value equals to CHAIN and list of the PC is here. In mind it is very easy to use and useful t-code.

Example of the RSM37 tcode output:


Sunday, July 10, 2016

SAP Application Value (SAV)

Recently there is a lot of noise between SAP customers running their SAP systems on Oracle. In case they obtain their Oracle license through SAP they will pay more for the Oracle license. The thing is that SAP renegotiated their agreement with the Oracle and as per new deal a cost of buying Oracle runtime licenses will be increased from 15 percent of SAV to 19 percent.

In regards to this usually there a term called “SAP application value (SAV)” mentioned. Reason is that the SAP is the basis for calculating database license fees for databases licensed through SAP. What is the SAP then? The SAV is defined as a sum of all named user licenses and all package licenses, excluding certain items defined in the SAP price list

In case of Oracle SAP sells Oracle license is an Application Specific Full Use (ASFU) or also called as Oracle runtime or OEM license. The license only license allows connect SAP software only to the Oracle DB with exception are 3rd party database admin tools. Oracle Enterprise Edition of the DB is needed for most of SAP apps.

The SAP price list is only known to their customers and partners however closer look to documents available like “SAP List of Prices and Conditions SAP Software and Support” shed at least some light into the issue. There are many types of licenses of SAP software itself. There are options like Package Licenses, Names Users Licenses, etc.

Now back to database cost issue. The price of the database license is calculated as a percentage of the SAP Application Value (SAV). So whatever amount is customer paying for SAP software (the SAV) then percentage of is payed to database vendor.

As Oracle DB is now 19% of the SAV and SAP HANA DB is 15% perhaps for some customers this can be a reason for migration to HANA DB. Perhaps ORACLE will do something about this…

More information:
581312 - Oracle database: Licensing restrictions
740897 - Info about the scope of the Oracle license; Required Oracle options
592393 - FAQ: Oracle
Oracle licensing via SAP

Thursday, July 7, 2016

Transport Connection -> Object Changeability

Some of BW objects can be created and also changed directly in production systems. This is a case of most common objects like InfoPackages or DTP but also BEx Queries. Particular BW object can be setup in way that it can be changeable even if the BW system is set to cannot be changed (via tcode SE06).


A function available in RSA1 -> Transport Connection (or directly tcode RSOR) where the setting can be customized. 











I’m not going to discuss the possible settings in here as this is pretty much known to BW folks. However I just want to point to table where the settings are stored. It happened to me recently that I needed to check the Object Changeability but I wasn’t authorized to do so. BTW user has to have an authorization to access SETTINGS wit activity 23 = maintain this is checked by FM RSSB_AUTHORITY_ADMWB_OBJECT.

While debugging I realized that settings are stored in table RSTRACTIVE – “BW CTO Status - Content Can Not Be Changed”. The data from the table are retrieved by FM RSO_MAINTAIN_OBJ_CHANGEABLE.



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:

BW on 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.



REPORT ZMM_PWD_CHECK.

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

CALL FUNCTION 'SUSR_LOGIN_CHECK_RFC'
 EXPORTING
   bname                  = sy-uname
   password               = p_pwd
 EXCEPTIONS
   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'.
  WHEN OTHERS.
ENDCASE.

Source code available at: github.com/softy12/ABAP-PWD-CHECK

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
RSQISET- HANAMODELFL in case of InfoSet
RSPLS_ALVL-HANAMODELFL - in case of Aggregation Level
RSZELTPROP-HANAMODELFL – in case of BEx Query


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 'system-local.bw.bw2hana' 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: