cancel
Showing results for 
Search instead for 
Did you mean: 

Windows Environment Variable

christof_kohler
Explorer
0 Kudos

Hey,

I am trying to use

cl_gui_frontend_services=>gui_download

and include the windows environment variable %USERPROFILE%

in the path for example:

filename = '%USERPROFILE%/filename.txt'

that only creates a directory called %USERPROFILE% but not the Variable.

Has anybody experienced this ?

Thank your for your help,

kind Regards

Christof

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

you have to use the following code to get the environment variable value and then use that with gui_download

call method cl_gui_frontend_services=>environment_get_variable

exporting

variable = p_envir_name

changing

value = ls_envir_path

exceptions

cntl_error = 1

error_no_gui = 2

others = 3.

call method cl_gui_cfw=>flush

exceptions

cntl_system_error = 1

cntl_error = 2

others = 3.

christof_kohler
Explorer
0 Kudos

Hello,

thats what I already tried but it does not work together with the ITS

at cl_gui_frontend_services=>environment_get_variable

I get an error 1 cntl_error.

Thats the reason why I wanted to include the Systemvariable into the path.

Kind Regards

Christof

former_member228142
Active Contributor
0 Kudos

Hi Christof,

according to SAP note 972762 you have to have at least

ITS 620 Patch 23 and SAPKB62061

ITS 640 Kernel Patch 148 and SAPKB64019

ITS 700 Kernel Patch 77 and SAPKB70010

to use cl_gui_frontend_services=>environment_get_variable in webgui. Hope that helps.

Best regards,

Klaus

Answers (0)