SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for SAP HANA and ABAP, HANA Database, SQLScript, SAP UI5, Screen Personas, Web Dynpro, Workflow

Check if SAP System is running on HANA Database


To check if underlying database system of a SAP system is HANA database or not, developers can programmatically and SAP professionals can use different methods. For example ABAP programmers can use function modules or SAP classes to detect the central database system used for that SAP system. If you are not an ABAP developer but want to learn the database underlying then you can simply use the System Status screen for data platform used in SAP system.

SAP professional can use the SAP System Status screen to check the database system on which the SAP system is running on.

When you are logged on to the target SAP system, within SAP GUI you can use top menu for: System > Status...

On System Status screen there is Database data section where the Database System is displayed. If the underlying database is SAP HANA Database, it is displayed as HDB

SAP HANA database on System Status

If you want to check the database platform programmatically and execute a code branch if the current database is SAP HANA database then the system parameters structure SY and system parameter SY-DBSYS can be used to identify the underlying database.

SY-DBSYS with HDB value means the current SAP system has SAP HANA database platform to rely on.

SY-DBSYS to identify SAP database system is SAP HANA or not

Another option to detect underlying database system of a SAP system is using CL_DB_SYS class and check class attributes DBSYS_TYPE and also IS_IN_MEMORY_DB.
If CL_DB_SYS class (Queries for Database Information) DBSYS_TYPE attribute is HDB, then the SAP is running on SAP HANA database.

SAP database information query class for HANA using ABAP code

Another option is to call ABAP function module RFC_SYSTEM_INFO. If you don't provide any RFC target system as an argument to the RFC enabled function module RFC_SYSTEM_INFO, you will get the current SAP system's database system in export parameter RFCSI_EXPORT-RFCDBSYS structure field.

It is possible to get another SAP system's database platform by sending the system info using the RFC target sys argument.

DATA lv_rfcsi TYPE rfcsi.
CALL FUNCTION 'RFC_SYSTEM_INFO'
 DESTINATION 'saps4hana_KDY_00'
 IMPORTING
  rfcsi_export = lv_rfcsi.
IF sy-subrc = 0.
 WRITE lv_rfcsi-rfcdbsys. " Central database system
ENDIF.
Code

If your database platform is Oracle then instead of Hana database indicator HDB, you will see ORACLE



SAP HANA and ABAP

Install SAP Free
CRM Companies List
Web Based CRM Software


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.