In
case there is a need to recognize programmatically whether the BW system runs
in cloud or on-premise there are some options on how to check it.
First
let’s see how it is regarding HANA DB. There is ABAP class CL_SHDB_HC (HANA
cloud base functions). Its method IS_HANA_CLOUD fetches versions of the
HANA (major,
minor, revision and patch) via calling system function call DB_GET_REL. The
method returns true in case the HANA DB runs in the cloud and false if it doesn’t.
Subsequently
regarding SAP BW. There is the ABAP class CL_RS_UTILITIES (General Auxiliary
Methods) and its method GET_IS_CLOUD_BW4_SYSTEM. The method reads table RSADMINA
table for column CLOUD_MODE (domain and data element RS_CLOUD_MODE). If the value
of the parameter is X it means the BW system runs in the cloud otherwise it is
considered as on-premise system.
In
case of other SAP systems like S/4 there is the ABAP class CL_COS_UTILITIES (Utility
routines for content separation/client separation) and its method VALIDATE_GV_S4H
that can be used to determine running environment of the system. The other
method IS_CLOUD in the same class is set as obsolete. The VALIDATE_GV_S4H reads
first the information from shared memory via parameters like s4h_public_cloud /
s4h_on_premise. If that is not successful it reads table TDEVC (Development Packages)
for cloud-only packages like 'SR_APS'. Finally, it calls FM 'SFW_IS_BFUNC_SWITCHED_ON'
(checks what Business Functions are activated in the system) to check whether
function 'SIMPLIFY_ON_PREMISE' is active.
My ABAP code snippet
to check whether the BW and underlaying HABA DB runs in cloud or on-premise
environment is available
here.
More
information:
No comments:
Post a Comment