Skip to content

Instantly share code, notes, and snippets.

@softy12
Created May 31, 2021 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save softy12/f9cf33eccff3e554b5a95783775729b1 to your computer and use it in GitHub Desktop.
Save softy12/f9cf33eccff3e554b5a95783775729b1 to your computer and use it in GitHub Desktop.
PROGRAM GET_BW_RELEASE_INFO.
* Determine whather SAP ABAP Platform bases system is runnign BW4 or not
* Based on standard SAP program's /SSA/BWT and routine GET_BW_RELEASE_INFO
* lv_BWRELEASE contains the BW release (SAP_BW), e.g. 740
* lv_BWSP contains the BW support package, e.g. 7
* lv_ISBW4HANA 'X' if the system is BW/4HANA, blank otherwise
SELECT SINGLE
FROM cvers
FIELDS release, extrelease
WHERE component = 'SAP_BW'
INTO (@DATA(lv_bwrelease), @DATA(lb_bwsp)).
IF sy-subrc <> 0.
SELECT SINGLE comp_type
FROM cvers
INTO @DATA(lv_isbw4hana)
WHERE component = 'DW4CORE'.
IF sy-subrc = 0.
lv_isbw4hana = abap_true.
ELSE.
lv_isbw4hana = abap_false.
ENDIF.
ENDIF.
IF lv_isbw4hana = abap_true.
cl_demo_output=>display( 'This is BW4 system' ).
ELSE.
cl_demo_output=>display( 'This is NOT BW4 system' ).
ENDIF.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment