‎2009 Aug 21 11:37 PM
Hello experts.
We have a multi-client architecture and I have to frequently create users in many of them at once.
Is there a fast way or does anybody have ABAP code to create users in multiple clients by while also an existing users Roles?
We have a program to copy the users, but I still have to go into every system and assign roles. This is very tedious, so I would appreciate any help.
‎2009 Aug 22 12:36 AM
Hi,
there is a BAPI BAPI_USER_PROFILES_ASSIGN which can be used to assign roles to user. So you can set up RFC destinations to all required clients and then call this BAPI for all RFC destinations from "master" client .
But for this use case SAP provides CUA - Central User Administration. I think you should think about it. Try to avoid these various ABAP solutions which are not reliable, especially in case of user management.
Cheers
‎2009 Aug 22 5:02 AM
‎2009 Aug 22 5:48 AM
Hello,
You can make use of the ALE Distribution Model with the details below to automate this process.
Message type:- USERCLONE
Object type:- USER
Method:- CLONE
IDoc Type:- USERCLONE05
FM for outbound:- ALE_USER_CLONE
FM for Inbound:- IDOC_INPUT_USERCLONE
The program to trigger the Idocs is RSCCUSND but you would need to configure ALE model
(BD64 plus other WExx) transactions first before you can use the program.
Also, the users must exist in the master client from where you distribute the Idocsto other systems/clients.
Hope this helps,
Cheers,
Sougata.
Sent from my iPhone 3GS
‎2009 Aug 22 7:21 AM
Hello Valhalla,
Try this way:
BAPI_USER_CREATE1 is remote enabled so you can create RFC destination for the all the system
you want to create users.
Load all the rfc destination in one table.
Load all the users need to be created in one table.
Loop at rfc_dest_tab.
loop at users_tab.
CALL FUNCTION 'BAPI_USER_CREATE1' DESTINATION rfc_dest_tab-RFC_DESTINATION
EXPORTING
USERNAME = users_tab-USERNAME
NAME_IN =
LOGONDATA =
PASSWORD =
DEFAULTS =
ADDRESS =
COMPANY =
SNC =
REF_USER =
ALIAS =
EX_ADDRESS =
UCLASS =
TABLES
PARAMETER =
RETURN =
ADDTEL =
ADDFAX =
ADDTTX =
ADDTLX =
ADDSMTP =
ADDRML =
ADDX400 =
ADDRFC =
ADDPRT =
ADDSSF =
ADDURI =
ADDPAG =
ADDCOMREM =
GROUPS =
PARAMETER1 =
EXTIDHEAD =
EXTIDPART = .
ENDLOOP.
ENDLOOP.
This will create required user in remote SAP systems.
Hope this solves your issue!
Thanks,
Augustin.
Edited by: Augustarian on Aug 22, 2009 11:52 AM
Edited by: Augustarian on Aug 22, 2009 11:52 AM
‎2009 Aug 22 1:21 PM
Hello
For this purpose SAP has developed the CUA - Central User Administration.
You have a single central CUA system and all other systems (and clients) are child system of the CUA.
You create the user in the CUA and assign as many logical systems (= child CUA systems) as required and then you can distribute the user simultaneously.
The role assignments should be distributed as well yet requires that the roles are present in the target system(s).
Regards
Uwe
‎2009 Aug 23 11:35 AM
hii,
Each client of an ABAP system is considered a separate (logical) system - with its own user management. Such cross-client operations (as wanted by you) are not desired - and therefore not supported.
The (ABAP) Central User Administration (CUA) as well as the SAP NetWeaver Identity Management (IDM) solution allow to perform user administrative tasks in a system landscape (for CUA: only ABAP systems).
you can refer to this link also,hope this would be helpful.
rgrds,
shweta