I have always thought that the sapworkdir was the directory that was selected in the input history field under the options of the sap gui.
Now I am testing the new sap gui 7.30 and I have also read the note
Note 1442303 - SAP GUI 7.20 - replacement of SAPWORKDIR
but now I am confused what and how I can retrieve the directory that is set in input history in a sap standard way ?
none of the methods in cl_gui_frontend_services return this directory.
A few years ago I made a function that directly reads a registry key with the right directory. in sap gui 7.30 this is luckily still functioning.
but now I am curious if there is also a sap standard function that can retrieve the input history and also curious if I was always wrong in my assumption that the input history = sapworkdir ?
CALL METHOD cl_gui_frontend_services=>registry_get_value
EXPORTING
root = '1'
key = 'Software\SAP\SAPGUI Front\SAP Frontend Server\LocalData'
value = 'DataPath'
IMPORTING
reg_value = E_SAPWORKDIR
EXCEPTIONS
get_regvalue_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.
kind regards
arthur