Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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