Is it possible to determine via code if the current system is R/3 or S/4?
I need it because I have a method that returns the software component of Human Resources related data, but this component should be different to R/3 and S/4 systems.
DATA(lv_software_component) = mo_configuration->get_software_component( ).
SELECT * FROM tadir INTO TABLE @DATA(lt_inftype_tables)
WHERE pgmid = 'R3TR'
AND object = 'TABL'
AND devclass IN ( SELECT devclass FROM tdevc
WHERE dlvunit = @lv_software_component
OR dlvunit = 'SAP_HRGXX'
OR dlvunit = 'SAP_HRRXX' )
On R/3, lv_software_component
should be 'SAP_HRCMX'
, for example, while on S/4 it should be 'S4HCMCMX'
. Currently, I have no idea on how to tell the difference between the releases, programmatically speaking.
The best I've come up with is hardcoding SY-SYSID
, since I know which systems are S/4 and which aren't, but that shouldn't be ideal.
I appreciate any help, thanks!