DATA: itab LIKE thenv OCCURS 0 WITH HEADER LINE. CALL FUNCTION 'TH_ENVIRONMENT' TABLES environment = itab.
变量值存储在内表ITAB中
下面的方法也是,不过,这个方法很不好用。不推荐
CALL METHOD CL_GUI_FRONTEND_SERVICES=>ENVIRONMENT_GET_VARIABLE