02-15-2008 9:45 AM
Hello,
I want to use the Method "cl_gui_frontend_services=>environment_get_variable".
I try this coding with same keywords ('%TMP%', 'TMP', ...), but the result is ever sy-subrc = 0 und s_path is initial.
DATA s_path TYPE string.
CALL METHOD cl_gui_frontend_services=>environment_get_variable
EXPORTING
variable = 'USERPROFILE'
CHANGING
value = s_path
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Please, can every body tell what is wrong.
Thanks
02-17-2008 10:04 PM
If Ralf's suggestion doesn't help, after the CALL METHOD cl_gui_frontend_services=>environment_get_variable
CALL METHOD cl_gui_cfw=>flush
before looking at the value returned in s_path.
02-15-2008 10:11 AM
hi,
seems to be a problem with java environment...
see link and note
[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_fes/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31303237303133%7d]
take a look at the env-variable:
QTJAVA=d:Javajre1.5.0_11libextQTJava.zip
and try to change it to older relase (1.4!)
Bye
02-17-2008 10:04 PM
If Ralf's suggestion doesn't help, after the CALL METHOD cl_gui_frontend_services=>environment_get_variable
CALL METHOD cl_gui_cfw=>flush
before looking at the value returned in s_path.