‎2011 Mar 31 2:03 PM
Hi All,
Is there any function module that I can use to get the file path in the system for TEMP folder.
I mean, i am supposed to give only TEMP as the input for that function module and I need to get the path of that in the system as the output.
I am unsing 4.0 version.
Please advice.
Regards
Ramesh
‎2011 Mar 31 2:19 PM
In Higher versions, we can use the below code:
-
call method CL_GUI_FRONTEND_SERVICES=>ENVIRONMENT_GET_VARIABLE
exporting
VARIABLE = 'TEMP'
importing
VALUE = LV_TMP
exceptions
CNTL_ERROR = 1
others = 2.
if SY-SUBRC <> 0.
message id SY-MSGID type SY-MSGTY number SY-MSGNO
with SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call method CL_GUI_CFW=>FLUSH
exceptions
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
others = 3.
if SY-SUBRC <> 0.
Error handling
endif.
concatenate lv_tmp '\' into folder_path.
-
But need to know in the lower versions like 3.1h and 4.0,
‎2011 Mar 31 2:26 PM