Skip to content

Instantly share code, notes, and snippets.

@softy12
Created April 24, 2025 08:24
Show Gist options
  • Select an option

  • Save softy12/a2b52fada07f56abb33d144dd71d485e to your computer and use it in GitHub Desktop.

Select an option

Save softy12/a2b52fada07f56abb33d144dd71d485e to your computer and use it in GitHub Desktop.
simple check whether the BW and underlaying HABA DB runs in cloud or on-premise environment
PROGRAM zmm_runs_in_cloud.
DATA(is_bw_cloud) = SWITCH #( cl_rs_utilities=>get_is_cloud_bw4_system( i_read_from_db = rs_c_true )
WHEN abap_true THEN 'CLOUD' ELSE 'ONPREM' ).
DATA(is_hana_cloud) = SWITCH #( cl_shdb_hc=>is_hana_cloud( )
WHEN abap_true THEN 'CLOUD' ELSE 'ONPREM' ).
cl_demo_output=>display( |Is this BW cloud or on-premise based?: { is_bw_cloud } | && |\n| &&
|Is this HANA DB cloud or on-premise based?: { is_hana_cloud }| ).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment