Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
REPORT ZMM_SYS_INFO.
DATA lc_cl_server_info TYPE REF TO cl_server_info.
CREATE OBJECT lc_cl_server_info TYPE cl_server_info.
CALL METHOD lc_cl_server_info->get_startup_time
RECEIVING
startup_time = DATA(lv_startup).
WRITE: / 'startup time: ', 30 lv_startup.
CALL METHOD lc_cl_server_info->get_release_info
RECEIVING
release_info = DATA(lv_info).
WRITE:
/ 'server name:', 30 lv_info->server_name,
/ 'release:', 30 lv_info->release,
/ 'compile date:', 30 lv_info->compile_date,
/ 'compile time:', 30 lv_info->compile_time,
/ 'patchlevel:', 30 lv_info->patchlevel,
/ 'patchnumber:', 30 lv_info->patchnumber,
/ 'sourceid:', 30 lv_info->sourceid,
/ 'compatibility_level:', 30 lv_info->compatibility_level,
/ 'make_variant:', 30 lv_info->make_variant,
/ 'dblib:', 30 lv_info->dblib,
/ 'supportlevel:', 30 lv_info->supportlevel.
WRITE: / 'supported OS:'.
LOOP AT lv_info->supported_os INTO DATA(ls_info_os).
WRITE: /30 ls_info_os.
ENDLOOP.
WRITE: / 'supported ABAP:'.
LOOP AT lv_info->supported_abap INTO DATA(ls_info_abap).
WRITE: /30 ls_info_abap.
ENDLOOP.
WRITE: / 'supported DB:'.
LOOP AT lv_info->supported_db INTO DATA(ls_info_supported_db).
WRITE: /30 ls_info_supported_db.
ENDLOOP.
WRITE: / 'patch comment:'.
LOOP AT lv_info->patchcomment INTO DATA(ls_info_patchcomment).
WRITE: /30 ls_info_patchcomment.
ENDLOOP.
Owner

softy12 commented Nov 3, 2017

demonstration of ABAP class cl_server_info usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment