Thursday, August 9, 2018

SAP HANA Extended Application Services (SAP HANA XS) flavors

HANA has built-in an application server for native development in the SAP HANA environment. There are actually two flavors application servers. I depict here the two and mention some differences. 

HANA native application development resides on the XS server (or also called as XS Engine or just XS). The XS is a small footprint application server including: web server and basis for an application development environment.  The XS is installed on the same hardware as SAP HANA. It does extend the SAP HANA database. It makes a platform out of it.

XSC - SAP HANA XS classic, lightweight application server includes web based HTTP and OData services. It can consume HANA database artifacts (e.g. calculation views) and it has built in support for the SAP Fiori UI. Also supports transactional services based on core data services (CDS). It uses database permissions, there are DB users in HANA itself. It was introduced in SAP HANA SPS 05 (around year 2012). 

Programming model: OData REST services is generated from any existing SAP HANA Table or View. All metadata and source codes (XS server-side JavaScript (XSJS)) for XS Classic app are stored in the SAP HANA repository.

XSA - SAP HANA XS Advanced is a new application server for native development in the SAP HANA environment. It supersedes SAP HANA XS. It is decoupled from HANA, are not necessary users in HANA DB. XSA started to be delivered SAP HANA SPS 11 (around year 2015).

Programming model: UI rendering and other front end processing is normally done in web browser using HTML5 and client-side JavaScript. Application logic, business logic, calculations, and data processing talks place in HANA DB by using SQL, SQLScript procedures, Calculation Engine (CE) functions. Means data processing is performed in database - close to the data. Three runtimes currently supported: 

XSJS - same as in XSC
Node.js – to support asynchronous web programming model, to leverage node.js’s ecosystem as there are many open source nodejs modules
Java – as there is a huge number of popular Java frameworks out there

More information:
SAP HANA SPS 11 new developer features xs advanced

Tuesday, August 7, 2018


It is OpenJDK implementation released and supported by SAP company. It is intended to enable SAP customers who runs OpenJDK in their environments. As they also use it productevelly SAP needs a platform to support their customers. It is technically fork from OpenJDK project but as SAP needs to react quickly on customer issues they rather providing “their own” OpenJDK implementation as for regular OpenJDK being open-source software the changes are not going on that fast as SAP would need. Another purpose of the SapMachine is used to showcasing and adding a new features of SAP’s proprietary Java Virtual Machine (SAP JVM) – also because they want to make it quicker than regular OpenJDK.

Related links:
What version of JAVA platform does SAP support?

SAP JVM online docu
1278274 - SAP JVM Restrictions (FAQ)

Unified Connectivity (UCon) framework part 2

I wrote about the UCon already few years ago see here: NetWeaver Unified Connectivity (UCON).
This post has refreshed info on the topic.

I introduced whitening / blacking (list) features of SAP in my older blog spot: White / Black Lists. In SAP terminology a securing of some of SAP objects is also called in as Unified Connectivity (UCON). It was introduced on NetWeaver platform in version 74. Very high level speaking the UCON is all about logging and blocking. By using the UCON only those of remote enabled function modules (RFM or BAPI) that are used in deployed scenarios are allowed to be executed. Execution of rest of them is forbidden and thus the NetWeaver system is secured on server side because possible attack to the system is reduced. 

To identify which RFMs are to be exposed and which are to blocked there are three phase process and toolset provided by the UCON. 

First of all, a system parameter ucon/rfc/active needs to be set in tcode RZ11 – system profile parameters. 

In 1st phase (Logging) you need to identify objects that ae accessed from outside systems. Here a tool called ”Phase Tool Unified Connectivity” (tcode UCONPHTL, prog UCON_PHASE_TOOL) is used. Also CCMS contains SAP Unified Connectivity Monitor Templates that are supporting the tool. 

Now in 2nd phase (Evaluation) it checks whether objects are not interrupting deployed business scenarios by being blocked.  Also tcode UCONPHTL is used in here.

And finally in 3rd phase (Activation) it needs to be confirmed that UCON checks will become effective. 

There is also possibility to override blocking settings of some RFM delivered by SAP. This is of course at your own risk. The ABAP program RS_RFC_BLACKLIST_CUSTOM can be used for that. By giving the RFM name to the program you can see what were original settings of the RFM. No need to add that all changes to the settings are logged. So by this way blacklisted RFM can be unblocked. The settings done by the program are transportable.

More information:

Tuesday, July 31, 2018

Can’t navigate in SE80 because left part of screen (tree) is too small?

I experienced this situation couple of times. By accident I made left part of SE80 (ABAP workbench or Object Navigator) screen so small that I couldn’t use the SE80 anymore. The left par basically allows selection of repository with which developer works subsequently object type selection and so on… Without access to that area no productive work can be performed.

The reinstallation of the SAP GUI doesn’t help as this information is persistently written in SAP backend system for every user. The table where the information is residing is called RSEUMOD. The table consists of all settings for ABAP Workbench which are normally maintainable via menu of the SE80 -> Utilities -> Settings.

However, the particular settings related to width of the area is not present in the settings. navigator in pixels. Therefore, only solution is to adjust it manually via tcodes like SE16N. The name of respective parameters is WIDTH - Width of navigator in pixels.

Number of pixel for TREE control on the left part of RSA1 (monitor of info packs). Useful to e.g. it in case it is too small and user can’t navigate e.g. can’t be enlarged. Any value below 50 has no meaning. I suggest to put value like 300 to make the area perfectly visible.

User related settings for tcode RSA1

There are couple of user related settings when it comes to Data Load Monitor function of BW’s Administration Workbench (RSA1). They are stored in table RSRADIOMON. In this post I will discuss what are they about and how to set it. 

Monitor is mostly handled by a report RSMO1_RSM2 and a call of FM RSSM_MON_SHOW_MONITOR_IC_RSM2 (include LRSM2I05, FG RSM2) and FM SELECTOPTIONSDATE. Depending of BW version, the Monitor looks like following:

UNAME                             User for which particular settings is valid for

Below columns are representing customizing of Load Monitor, whether it shall display (possible values either blank or X):
NOW                                Load monitor will show “Today’s” requests only

YESTERDAY                     Load monitor will show ”Yesterday’s and Today’s” requests only

WEEK                               Load monitor will show requests from Past Week (button ”In the Past Week”)

MONAT                             Load monitor will show requests from “This and Last Month”

FREE                                Represents flag: If Active in Time Period (if set means requests will be selected for which the system logged a message in the specified period). Free data range is saved in global memory under ID SELECTOPTIONSDATE, no persistent storage.

Following columns (possible values either blank or X) are representing Request Overview, whether it shall be displayed in format of:
TREE                                Overview Tree

LISTE                               Overview List

DYNPRO                           Planning Table

Following columns are representing visual (look and feel) settings of the Load Monitor:
PICTYPE                          Type of screen on the right side (possible values: 0 = Default; 1 = no; 2 = customer-defined pic)

PICNAME                         Image name for monitor/scheduler

PICSTRETCH                     Whether the picture shall be stretched over the screen (possible values: X or blank)

TREEWIDTH                     Number of pixel for TREE control on the left part of RSA1 (monitor of info packs). Useful to e.g. it in case it is too small and user can’t navigate e.g. can’t be enlarged.

STATSEL                          What statuses of the data load requests shall be filtered in the Load Monitor

RNRSEL                            What Request ID (Request Number) shall be displayed by default

SYSSEL                            What source system shall be selected when user enters Source Systems section

VIEWSEL                         Single-Character Indicator

LIFETIME                         Consider all data monitor entries found (possible values: X or blank)

CHAIN_TREEWIDTH        Number of pixel for TREE control on the left part of RSA1 (monitor and process chain monitor). Useful to e.g. it in case it is too small and user can’t navigate e.g. can’t be enlarged.

CHAIN_ACCESSABLE       Possibility of showing PC tree displayed in Network view. Normally this is not available for SAP GUI for JAVA. If you need to display your PCs in the Network view set this field to Y manually in the table for your user. Possible values: N or Y.

More information:
1991961 - P33; MON; PC: TREE control on left of monitor and PC monitor is too small

Zero elimination for cubes

Zero elimination (sometimes called NULL elimination) is process within BW which does deletion of records in fact table where all Key Figure values are zero. This can be normally seen as BW administration task. It can be performed on Manage screen of cubes in RSA1. On tab called COLLAPSE a check box “With Zero Elimination” is available. 

This task can also be done outside from the RSA1 by executing or scheduling a ABAP report RSCDS_NULLELIM. The report calls FM RSCDS_EXEC_NULLELIM for the task execution. In case the BW system is HANA based there is a report RSHDB_EXECUTE_CLEANUP_NULLELIM for HANA DB.

Parameters of program are very well described in this wiki.

From technical point of view notice there are few limitations of this functionality. Main one is that there is no 100% zero elimination for the Key Figures of type FLTP. It is not possible to precisely evaluate whether the KF type of FLTP is really equal to zero. Value of the KF may be close to zero but not precisely zero. Therefore, as word of advice in scenarios that rely on exact summing never use the KF type of FLTP. Report is using value 1.0E-50 which is pretty close to zero but there might be a values stored in the BW that are even smaller.

Also the NULL elimination is only possible if the KF aggregation is SUM for all of the KF used in the cube. If the cube contains the KF with aggregation types other than SUM (e.g. MIN or MAX) the database cannot eliminate the zero lines during the compression.

More information:
1224631 - Program RSCDS_NULLELIM and Float-Keyfigures (Type FLTP)
1587759 - Duplicate Records in InfoCube Dimensions
1820706 - Report RSCDS_NULLELIM fails on SAP HANA
2206835 - Report RSCDS_NULLELIM now also on SAP HANA
2521338 - Compression with Zero Elimination does not work

Tuesday, July 17, 2018

Issues while setting up SAP RFC Connector for NodeJS (node-rfc) connector

In one of my last posts I wrote about nodejs RFC Connector provided by SAP to connect SAP backend systems. The Connector works very well. However, while I was setting it up I faced few issues. I’m listing them here with solutions how to overcome them; perhaps it will be useful for someone else too.

1. Library MSVCP120.dll missing

One of prerequisites of nodejs RFC Connector is that SAP NW RFC SDK needs to be present on machine which will be used for making called to the SAP system. However sometimes SAP NW RFC SDK is not installed correctly on the machine. Basic check of the installation is to run command rfcexec. In case of issue there is an error like:
The program can’t start because MSVCP120.dll is missing...

Solution is to install Microsoft Visual C++ (2010, 2013, or newer depending on your OS platform) Redistributable component. Once installed there shall be following output of rfcexec:

2. NPM module xyz can’t be found

On attempt to run nodejs app using the Connector call there is a following error thrown:

Error: The specified module could not be found.

Basically the node-rfc tries to find rfc.node in specific folder /build/rfc but it's not in there because by default when it is installed another subfolder is placed there. In my case on OS Windows it is the subfolder "win32_x64". Solution is to just move or copy the rfc.node file to one level up.

3. Issues related to path variable.
As mentioned in point no.1 SAP NW RFC SDK needs to be present on the machine where the calls will be performed from. The folder where the SDK is installed needs to be included in path variable e.g.:

Wednesday, May 30, 2018

Activating change pointers

Change pointers (better to say ALE change pointers) are essential within ALE (Application Link Enabling) technology. While there is any change (think of CRUD type of operation) done to data (like biz object in SAP e.g. material, customer, sales order etc.) a change documents are generated. In case change pointers are setup for the biz object the changed data is transferred to other systems.

To enable the data exchange like this the change pointers, need to be activated in the system. For this there is a t-code BD61 (program RBDTBDA1) available. It sets flag X into field ACTIVE of table TBDA1.

Tuesday, April 17, 2018

How to call BAPI in SAP from nodejs app

Recently I used nodejs RFC Connector provided by SAP. The module called node-rfc provides bindings for SAP NetWeawer RFC Library. Via the library it is possible to call RFC enabled function modules residing in SAP NetWeaver based ABAP system from nodejs, leveraging SAP Remote Function Call (RFC) protocol. For installation of the module into your nodejs framework see here.

Below I provide two example nodejs apps showcasing possibilities to passing values to BAPI’s parameters like single values, structures and tables.

I think that the node-rfc module is great option how to interface with SAP systems from heavily used nodejs app like in case of web based apps.

You can find both examples on my github:

demo_BAPI_params1.js      usage of table and variable parameter

//demo prg to showcase usage of table and variable parameters of SAP's BAPI while called from nodejs app via SAP/node-rfc nodule
"use strict";
var rfc = require('node-rfc');
var abapSystem = {
    user: 'sap_user',
    passwd: 'sap_user_pwd',
    ashost: 'sap.nodomain',
    sysnr: '01',
    client: '800'
var client = new rfc.Client(abapSystem);
var MAX_ROWS = 3;
               PARAMETER: "USERNAME",
               SIGN:      "I",
               OPTION:    "CP",
               LOW:       "A*"
client.connect(function(err) {
    if (err) {
        return console.error('could not connect to server', err);
    client.invoke('BAPI_USER_GETLIST', {
                       MAX_ROWS: MAX_ROWS,
                       SELECTION_RANGE: SELECTION_RANGE_tab
        function(err, res) {
            if (err) {
                return console.error('Error invoking BAPI_USER_GETLIST:', err);
               console.log('Result BAPI_USER_GETLIST:', res);

demo_BAPI_params2.js      usage of structure parameter of SAP's BAPI

//demo prg to showcase usage of structure parameter of SAP's BAPI while called from nodejs app via SAP/node-rfc nodule
"use strict";
var rfc = require('node-rfc');
var abapSystem = {
    user: 'sap_user',
    passwd: 'sap_user_pwd',
    ashost: 'sap.nodomain',
    sysnr: '01',
    client: '800'
var client = new rfc.Client(abapSystem);
client.connect(function(err) {
  if (err) {
    return console.error('could not connect to server', err);
    RFCDATA1: 'some value of structure field RFCDATA1',
    RFCDATA2: 'some value of structure field RFCDATA2'
    function(err, res) {
      if (err) {
        return console.error('Error invoking STFC_STRUCTURE:', err);
      console.log('Result STFC_STRUCTURE:', res);