Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

Not what you were looking for? View more on this topic or Ask a question