Skip to Content

cl_gui_frontend_services=>get_sapgui_workdir returns nothing with 7.20

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 27, 2010 at 11:21 AM

    Hi Gregor,

    use "cl_gui_cfw=>flush" after the call and you will get the values.

    Regards and CU in 2011

    Uwe

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 27, 2010 at 10:40 AM

    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

    Add comment
    10|10000 characters needed characters exceeded