2019 Oct 22 3:18 PM
Hi All,pretty simple how to copy it to another user.
let me know for any Function Modules
2019 Oct 23 9:37 AM
"get the data from the User that we want.
select single *
from usdocu
where bname eq @previous_username
into @data(ls_docu).
append ls_docu to lt_docu.
loop at lt_docu assigning <lf_docu>.
<lf_docu>-bname = lv_new_username.
endloop.
call function 'SUID_IDENTITY_SAVE_TO_DB'
exporting
it_usdocu_insert = lt_docu
is_timestamp = ls_timestamp.
2019 Oct 22 3:29 PM
Hi,
Please check the FMs in function group SU_USER. Copying the user may not be possible with one FM. You can use FMs to read the user and then pass the values to create user FM. It should help to achieve what you want to.
Regards
GK
2019 Oct 22 3:57 PM
2019 Oct 22 6:10 PM
A quick search in Google with terms sap su01 documentation points to a lot of results and the first in the list is SU01 - Documentation Tab - Documentation for User. It has an accepted answer and the links to SAP help look quite promising (I cannot test the solution at the moment).
Did you already try that?
2019 Oct 23 8:35 AM
can you please let me know which method of that class reads the docuementation of the user?or sets it?
2019 Oct 23 8:47 AM
Simply follow the link which I provided and read the accepted answer.
I have no access to a system where the class mentioned in the official documentation is available so I cannot tell you whether these methods are suitable for your use case, you need to do this yourself.
2019 Oct 23 9:37 AM
"get the data from the User that we want.
select single *
from usdocu
where bname eq @previous_username
into @data(ls_docu).
append ls_docu to lt_docu.
loop at lt_docu assigning <lf_docu>.
<lf_docu>-bname = lv_new_username.
endloop.
call function 'SUID_IDENTITY_SAVE_TO_DB'
exporting
it_usdocu_insert = lt_docu
is_timestamp = ls_timestamp.