Hello community,
the following routine delivers always 1. It is no matter if the entry is written to the Windows registry or not, rc is always 1.
"-Begin-----------------------------------------------------------------
Program ZTEST.
"-Variables---------------------------------------------------------
Data rc Type i.
PerForm CreateKey Using 'Software\Classes\Test' '' '' Changing rc.
"-End-------------------------------------------------------------------
"-Subroutines begin-----------------------------------------------------
"-Function CreateKey--------------------------------------------------
Form CreateKey Using SubKey Type String ValueName Type String
Value Type String Changing rc Type i.
Call Method cl_gui_frontend_services=>registry_set_value
Exporting
root = cl_gui_frontend_services=>hkey_current_user
key = SubKey
value_name = ValueName
value = Value
Importing
rc = rc
Exceptions
registry_error = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
Others = 5.
Call Method cl_gui_cfw=>flush.
EndForm.
"-Subroutines end-------------------------------------------------------
Is it correct?
Thanks for hints and tips.
Cheers
Stefan