[ABAP] Umgebungsvariablen eines Servers auflisten

DATA: lv_env TYPE spfl_environment_list_t.
DATA: lv_ret TYPE i.

lv_ret = cl_spfl_environment=>get_list( IMPORTING env = lv_env ).

IF lv_rc = 0.
  LOOP AT lv_env INTO DATA(wa_env).
    WRITE: / wa_env-name, wa_env-value.
  ENDLOOP.
ENDIF.