Friday, February 23, 2018

How to find out SAP HANA version in various tools

More information about SAP HANA versions revisions can be found in this blog.

1. from SAP GUI:
1.1 Via menu System -> Status 

1.2 By running FM DB_DBRELINFO 

2. In SAP HANA Studio:
2.1 Right click on HANA system in Systems perspective and choose menu item Properties.
2.2 While in the Systems perspective select Configuration and Monitoring -> Open Administration. Version the information can be found under Overview tab.

3. From SQL console (console can be opened from System perspective by right clink on the particular system and choosing menu item “Open SQL Console”):
By entering following SQL statement:        select * from "SYS"."M_DATABASE";

4. Using command line (for command ninjas):
By executing a command:    HDB version

Useful links:

Monday, February 19, 2018

DTP can’t run via process chain

In event that particular DTP wasn’t finished and while it was in progress there was a BW system shout down (regardless planned or not) going on such the DTP may have issues while running it after the systems was restored back.

After the restart process chain that contains the DTP reports errors like these:

Object DTP DTP_xxxx not found                         Message No. RS_EXCEPTION111
Object INSTANTIATE_TEMPLATE  not found          Message No. RS_EXCEPTION111
Error in BW:                                                  Message No. RS_EXCEPTION105
Exception CX_RS_PROGRAM_ERROR logged         Message No. RSBK228
Could not repair last request (  )                       Message No. RSBK074

First error is very strange as the DTP is in the system. It is normally visible in RSA1/RSDTP t-codes. When you check the tables like RSBKDTP – the DTP entry has regular Active record there. Reactivation of the DTP doesn’t help either. Corresponding transformation is in active state too. Its check doesn’t report any issues. Entry in table RSTRAN is active for the transformation too. Reactivation of the transformation doesn’t help as well.
What needs to be done is just run the DTP standalone outside of PC. During such an attempt the BW system will ask to delete/repair previous run of the DTP that caused red load request in target. Once you confirm it shall be repaired – system asks whether it shall be done synchronously/asynchronously. After any of the two options is confirmed the DTP is successfully executed and data loaded.

Wednesday, February 14, 2018

Texts of hierarchies on top of InfoObjects

Normally a database table (ABAP world) in SAP can have its text table. The text table can be created in ABAP workbench t-code like SE11 and there in Goto menu I item called Text Table available. By this a text table will be created. The text data needed for main table is stored in the text table.

Similarly in BW world an InfoObject can have a text table. In t-code RSA1 -> InfoObject section there in tab called Master Data if “With Text” flag is ticked off. This creates a new table (e.g. in naming convention /BIC/T*, where * represents name of the IO).

Similarly in BW hierarchy’s world the texts are stored in table RSTHIERNODE. This is common table for all hierarchies available in particular BW system. By specifying value in field HIEID where a technical ID of hierarchy goes all three text texts (short, medium, long) can be lookup.

Dummy report for process chain decision processes

For decision processes within process chains (PC) there is sometimes needed a dummy step which the process ends in. Normally it is a dummy ABAP report can be created that has no code at all. For this a new Z* custom ABAP program can be created. But this is not necessary as there are already few ABAP programs w/o any codes.

One of such an example is ABAP_INTRO_DUMMY. So no need to create a new blank report just this one can be used.

Thursday, February 1, 2018

Mass filtering in AfO - not equal to

There is a function in AfO (called as SAP BusinessObjects Analysis or SBOP ANALYSIS MS OFFICE) tool available to make entering multiple values for filtering easy and convenient. In case there are many of values to be filtered out it is not very convenient way to go by each and every value to select it in a list of all members. Instead user may have all the values already prepared either in clipboard or in separate text file. This can be described as putting mass values into the filter.
AfO offers in dialog box of “Filter by Members” function a possibility to paste the filter values from the clipboard or paste it from file.

In case values for the filters are supposed to be set as “not equal to” the values in the filter selections shall be entered with exclamation mark (!) in front of the value: e.g. !xxxxx

However pasting value like that either from the clipboard or from the file doesn’t work. There is an error displayed: iString parameter is null

Even this issue is not listed SAP’s wiki page of Known issues with Analysis Office there is supposed to be a fix provided in SAP Note: 2452938 - Selecting a date value raises a warning message.


Saturday, January 20, 2018

Tools for migrating to SAP BW/4HANA (B4H)

Today I post a similar blog as I did for BW to HANA (BoH). It is with regards to Tools for migrating BW to HANA (BoH) but this time for tools to migrating to SAP BW/4HANA (B4H).

There are few differences with regards to SAP BW/4HANA comparing to “regular” BW systems as we know them. SAP BW/4HANA is not delivered via the SAP NetWeaver stack. The underlying platform is SAP HANA DB and components like DW4CORE, SAP_BASIS, SAP_ABA, SAP_UI, SAP_GWFND of ABAP application server.

Other differences include: (this is not a list of all differences just few important ones)
·         A new request management for all staging/loading processes is in place. It is called transaction sequence numbers (TSN). The request looks like DTPR__request – it contains not of request itself, timestamp, time zone etc.

·         Changes to official interfaces to BW objects (e.g. RSNDI, RSDRI)

·         All “old” things like customer exits (CMOD) and BAdI methods for e.g. BEx/BW exit variables are replaced by corresponding enhancement spots.

·         SAP claims that more than 5 million lines of SAP BW’s ABAP code have been deleted. There is an impact on custom code where non-released ABAP interfaces/code is used. This may be tricky if your development includes non-released objects. Check your custom code first!

First of all there is a bunch of prerequisites for SAP BW/4HANA (B4H). Major one is that it can only be installed on top of SAP BW version 7.5 systems. In particular SAP BW 7.5 SP 5 powered by SAP HANA is needed. In case cases staring point also can be SAP BW 7.0 or higher on AnyDB.
Another important point is with regards to version of HANA DB. Minimum HANA DB version must be Revision 122 or higher in case of HANA 1.0 SPS 12 and Revision 1 or higher in case HANA 2.0 SPS 0.

Now in case existing BW system is going to be converted to the SAP BW/4HANA system following tools can be leveraged for this purpose (tools are not sorted in a sequence of how they shall be executed always refer to particular migration scenario!):

SAP BW Note Analyzer - This tools analyses status of implementation of SAP Notes in particular system and also installs other tools (like Transfer Toolbox) that are needed for migration to B4H. It can be started by report Z_SAP_BW_NOTE_ANALYZER. The SAP BW Note Analyzer can be installed via SAP Note 2383530

SAP BW/4HANA Transfer Toolbox - it converts SID of the SAP BW system either to new one (new system) or existing one. This can be done either via in-place conversion (full system is converted) or remote conversion (selected arts of system like data model will be converted to new system). The tool can be started by a call of t-code “STC01” and executed by task list “SAP_BW4_TRANSFER_INPLACE”

Precheck Tool – so called SAP Readiness Check - Simplification Item Check. The tool analyses the impact on system to be converted based on simplification items. There are two types of check integrated into the tool. Relevancy/Consistency checks.  It can be started by report /SDF/RC_START_CHECK. See Note 2399707.

SAP BW/4HANA Starter Add-On - formerly known as SAP BW, edition for SAP HANA. It needs to be installed on top of SAP BW 7.5 system to enable the conversion to SAP BW/4HANA.

Transfer Toolbox for BPC – similar tool as SAP BW/4HANA Transfer Toolbox but crafted specially for BPC add-on in BW.

Report RS_B4HANA_CONVERSION_CONTROL - it executes and realizes the phase of system conversion to B4H.

Useful information:
2383530 - Conversion from SAP BW to SAP BW/4HANA
2591784 - SAP Readiness Check for SAP BW/4HANA - Preparation
2575059 - (pilot) SAP Readiness Check for SAP BW/4HANA       
2567324 - SAP Readiness Check for SAP BW/4HANA - Object Compatibility
2421930 - Simplification List for SAP BW/4HANA
2513088 - SAP BW/4HANA Conversion Cockpit - System Setup & Pre-requisite
2399707 - SAP Readiness Check - Simplification Item Check

Thursday, January 11, 2018

Something about conversion exits

I recently need to create a new conversion exit to perform additional data formatting on data that were given to my program on input. I learned few interesting things while working on it.

First of all the conversion exit can’t be just one. Is it is input/output type of thing a system forces you to create two function modules. One for input conversion and other one for output. There is function module called RS_CONVEXIT_EXISTS which existence of the two. Conversion exits can only be used in the ABAP code as long the two exits. If only one exists system will throw error message that conversion exits doesn’t exist.

Secondly there is a fixed naming conversion belonging to the names of the conversion exits. The input one must be called like: 'CONVERSION_EXIT_<>_INPUT' and output one 'CONVERSION_EXIT_<>_OUTPUT'. Prefix ('CONVERSION_EXIT_') and postfix ('_INPUT' and '_OUTPUT') must be given to the function module that will be performing the conversion.

Thirdly all the conversion exits are stored in table FUNCNAME among the rest of the function modules.

Fourthly to get a list of all of the existing conversion exits the module called 

Fifthly name that you insert after the prefix and before the postfix can have up to 5 characters. E.g. CONVERSION_EXIT_MADJ1_INPUT.

Sixthly the conversion exits can be used in BW to populate a date for infoobjects. E.g. in case you need to prefill certain value as a constant while data is being loaded to PSA.

Function group is full?

There is actually a limit for number of function modules that can be included in one function group. I wasn’t aware of this until recently when I ran into the limit.

I was about to create a new function module into existing group and I got into this error message:

There are already 99 functions       Message No. FL030
You attempted to add a function module to a function group that is already full. A function group can contain a maximum of 99 function modules.
Create a new function group or reorganize the existing one.

Pretty much is says that there is a technical restriction of how many function modules can be stored in the group. There is no really solution just to use another function group.

Just last note in here the new function modules are created by another function module called RS_FUNCTIONMODULE_INSERT.

Wednesday, January 10, 2018

Security vulnerability – Meltdown and Spectre

Year 2018 started a bit crazy when it comes to computer security. Security researches published a huge security vulnerabilities related to CPUs – computer’s microprocessors. 

If you remember year 2015 and a bug called Heartbleed that was almost nothing comparing to these two. The two are considered as "catastrophic" by security analysts. In short the Meltdown allows a rogue process to read any kernel memory, also in case the process is not authorized to do so. The Spectre is abusing a branch prediction of microprocessor’s cache that affects microprocessors with speculative execution. This involves cashed data which may be read/modified by tricking the accept requests.

One of the issues related to these vulnerabilities is that the Spectre is not easy to be fixed. Also while employing the fixes it is causing CPU’s performance degradation.

The vulnerabilities are affecting wide variety of devices - almost every device using microprocessors especially made by Intel, ARM, possibly also AMD. As SAP systems are running on these processors as well the SAP is paying an attention to the vulnerabilities. There are special SAP Notes (see below) prepared and being updated that advise customers on what to do.

More information:
2585591 - How to protect against speculative execution vulnerabilities on Windows?
2586312 - Linux: How to protect against speculative execution vulnerabilities?

Sunday, January 7, 2018

More than one query with the same technical name?

In BW systems it is not a rare case when there can be multiple BW objects with same technical name. This is especially related to BEx Queries (plus other query components like (REP, CKF, RKF, STR, VAR and SOB can be similarly effected too). Normally one would expect that the technical name is unique identifier of the query. However it is not the case. The technical name (COMPID in table RSZCOMPDIR and others) is not unique similarly as a description of the BEx query is not unique. It just represents language-independent name for the query element. This is in contrary to other objects in SAP systems where the technical name is really unique.

Technically it is not a problem to have duplicate technical names because other field (COMPUID) is used to uniquely distinguish between them. But it may cause problems while using tools like BEx where user needs to specify the query name in OPEN/SAVE dialogs. Only one query will be processed in these tools – whichever is found first in the database.

There can be several cases which may lead to situation causing having more than one query with the same technical name. Some of them can be:

Transports: When one query is imported from system A to system B. Technical name is the same in both systems. Later the query is deleted in the system A and recreated with same name. In case deletion of the query wasn’t transported to system B there will be 2 queries with the same technical name in the B system once recreated query gets transported to system B.

Several dev/test systems used to import objects to one prod systems: of query with the same technical mane is created in both source systems and they are imported to target system the query in there will have the same technical name.
It is very advisable to prevent into running issues like this. However when they occurs there are some possibilities how to deal with this situation.

1. Situation first needs to be analyzed e.g. by ABAP report ANALYZE_RSZ_TABLES.

2. Query can be copied to completely new name with help of t-code RSZC and then re-transported. Query with old tech name shall be deleted (e.g. t-code RSZDELETE).

3. If query (or it parts) needs to be preserved a ABAP report RENAME_DUPLICATE_ELEMENTS can be used to rename the query and/or its components. 

4. While transporting the query a parameter of RSADMIN table called QDEF_NO_DUPLICATE can be defined in order to prevent a situation when query component with the same technical name and different UID that already exit in the target systems is written.

More information:
907025 - Duplicated technical names (COMPID) for query components
1551586 - Duplicated technical names of query components
5541024 - Duplicate query names in the BW system (BW 3.x related Note)
1765828 - Unique technical names for SAP Business Content queries
2061998 - Deletion of a query during transport does not delete an entry in RSRREPDIR

Friday, January 5, 2018

How to check if queries were deleted by tcode RSZDELETE?

Tcode RSZDELETE was used in BW system to either copy or delete BEx Query. In case it latter one and query is needed afterwards usually people start to ask who deleted and why.

To find out this a t-code SLG1 can be used. Basically the RSZDELETE generates logs under object ID = 'RSZ'. Function module 'RSDG_WRITE_PROTOCOL' is used for that.

So a call of the t-code SLG1 looks like:

And here’s and output in case of copying the query, deleting it and using report ANALYZE_RSZ_TABLES.

Different version of BEx query in runtime vs design time?

After query changes done in BEx Query Designer it may happen then these changes are not reflected in the frontend tools like BEx Analyzer or Analysis for Office. Buffering of BW tables is to be blamed for these types of issues. In particular it is important that table RSRREPDIR - Directory of all reports is not buffered. In some BEx versions the table was setup in way that it was buffered. In case there are more application servers in the BW system landscape then the other server which wasn’t used by the BEx Query Designer is reading the query definition from buffer which is not up2date.

Either the table is or is not buffered it can be checked in tcode SE11 -> Technical Settings -> Buffering. Correct setting here is “Buffering not allowed”.

Similarly in case of running BI frontend tool like BEx Analyzer or Analysis for Office on server with more than one application server there can be different results provided by the frontend tool. Again this can be due to table buffering.

More information:
958250 - Query displayed according to obsolete query definition
964390 - Different application Server shows different query result.