on 12-26-2010 6:33 PM
Hi SAP GUI Experts,
I've installed the SAP GUI 7.20 and patched it to Patchlevel 4 on Windows 7, 64 Bit. When I run the following report
REPORT z_test_frontend_services.
DATA: temp_dir TYPE string,
sapworkdir type string.
cl_gui_frontend_services=>get_temp_directory(
CHANGING
temp_dir = temp_dir " Temporary Directory
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4
).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
WRITE: / 'Temp Dir: ', temp_dir.
cl_gui_frontend_services=>get_sapgui_workdir(
CHANGING
sapworkdir = sapworkdir
EXCEPTIONS
get_sapworkdir_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
others = 5
).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
WRITE: / 'SAP Workdir: ', sapworkdir.
No values for the requested directories are returned. In the Security Settings of the Options menu I set the Default Action to Allow. As far as I understand [SAP Note 1442303 - SAP GUI 7.20 - replacement of SAPWORKDIR|https://service.sap.com/sap/support/notes/1442303] it should still work.
Best regards
Gregor
Hi Gregor,
use "cl_gui_cfw=>flush" after the call and you will get the values.
Regards and CU in 2011
Uwe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Uwe, Hi Julius,
thank you, calling the "cl_gui_cfw=>flush( )." made it work. The returned Values are:
Temp Dir: C:\Users\gregor\AppData\Local\SAP\SAP GUI\tmp
SAP Workdir: C:\Windows\system32
According to Note 1442303 that seems to be the correct behaviour as I've not used the "SAP Installation Server Administration Tool". But could anyone provide a reason why the SAP Workdir can ony be set when using the Admin Tool? Shouldn't the standalone installation of SAP GUI which most users of the NetWeaver Developer/Trial Edition will use provide this as a default? I've found the according documentation for the [GET_TEMP_DIRECTORY|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/d8/369513b5994669abacb70ddf61960b/frameset.htm] where it's explicitly stated:
"Call CL_GUI_CFW=>FLUSH in the ABAP program after calling this method to actually execute the method on the client."
But for the [GET_SAPGUI_WORKDIR|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/61/41d2c60d5d4747bfdd92626e9038ba/frameset.htm] method it is not mentioned that the cl_gui_cfw=>flush( ) has to be called. According to the documentation for [CL_GUI_FRONTEND_SERVICES|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/c8/9421e2cf1d45c18adf862476234c0c/frameset.htm] where I've found:
"If the caller needs to call the FLUSH himself, this is noted in the documentation."
So it seems to me like a error in the documentation. I will open a OSS ticket to get this solved.
Best regards
Gregor
Hi Gregor,
What does method get_temp_directory return in temp_dir?
The note says:
Important: This registry value was always set by the installation for the SAP GUI for Windows 7.10 and earlier. The installer for the SAP GUI for Windows 7.20 will set this value only if a value has been specified in the "SAP Installation Server Administration Tool". Therefore, it can no longer be assumed that this registry value will exist on a client PC.
Check whether you have set this regedit key and whether the value isn't blank there?
Cheers,
Julius
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.