Program to Create Users in Multiple Clients at Once

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.

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

Similar Messages

  • Using BAPI to create users across all Clients and R/3 Systems

    Hi everyone,
    I'm currently writing a program where I'm using a BAPI to create multiple new users via central user admin (SU01) and assigning Roles to these users.
    My objective is to create these new users in all clients of all R/3 systems using RFC. At the moment, in SM59, our DEV environment is set up as "DEV", QA as "TST" and PRD as "PRD". When I use syntax:
    CALL FUNCTION 'BAPI_USER_CREATE1' DESTINATION 'TST' the system presents a logon screen to login to TST system. Can this logon be made automatic i.e. without this screen prompt?
    Also, I can't create the users in all clients of 'TST'. Our test system has 5 clients...how do I create the users in all clients of TST automatically?
    Your help will be greatly appreciated.
    Thanks.
    Sougata.

    Try to see the SAP HELP:
    RFC logon to target system (remote logon)
    RFC logon within an R/3 system can be successfully undertaken using the same user ID even if the logon is to take place in a different client.
    In principle, all necessary logon data for a particular RFC destination (language, user, client, and password) are used when an RFC logs on to the target system.
    Typically the password field (for a particular user) must be maintained when an RFC communicates with other clients or user IDs.
    If one of the fields language, client or user is not maintained for the designated RFC destination, default values are taken from the system environment (system table).
    Tips:
    With RFC communication within a single R/3 system with the same client and user the logon fields do not have to be maintained. Password entry is also unnecessary in this special case.
    If an RFC logon in online mode is unsuccessful, an RFC logon window is displayed (not during background processing) where you can logon to the target system online at runtime.
    The default values for the RFC logon screen fields are as follows:
    Client
    The standard value of the target system application server is used. This value is read from the target server's "login/system_client" profile parameter.
    User
    The system inserts the user ID of the current user in this field.
    Language
    Information from the RFC destination is used to fill the language field. If the language field has not been maintained in the destination, the current language of the calling system is inserted.
    The RFC logon window does not appear if the initial function module call of the RFC destination originates from the system-specific function group 'SRFC'. The function modules RFC_PING and RFC_SYSTEM_INFO belong to this group among others.
    If you would like to have an RFC logon window displayed regardless, you must end RFC communication to that particular RFC destination after the call using the function module 'RFC_CONNECTION_CLOSE'.
    Be aware that no logon screen is usually offered when using trusted/trusting systems.
    Documentation to authorization checks in the RFC environment can be found in RFC authorization concept.
    Max

  • Program to create users

    Is there any program in SAP , where i can customise to create users.
    Like when i enter a number 123 it should create a user called abc123 wiht a default role
    Thanks in Advance

    Hello Balaji,
    You can find it on your own.
    Go to transaction SE93 and provide the transaction name & click on display button. it will show the corresponding program
    eg: Transaction: SU01
    Program name : SAPMSUU0
    Screen number: 0000
    Considerable ABAP knowledge is required for customizing standard programs.
    Open the ABAP program eg: SAPMSUU0 in ABAP editor (SE38) and choose copy program from the menu. Give your new Zprogram name, Then do the modifications in your newly created Zprogram.
    NB: A transaction may consist of several screens & Programs (includes etc..)
    Regards,
    Ammey Kesarkar
    <i>'Award points for useful info'</i>

  • Creating user in multiple databases

    Hi All,
    I want to create an user in multiple Databases (100+)
    Could any one can share the script .
    Oracle DB Version - 9.2.0.6,9.2.0.7 & 10.2.0.2
    Os - Hp Unix.
    Kindly help me out from this.
    Thanks,
    Ram.

    895188 wrote:
    Hi
    Thanks a lot for your reply
    I can follow your command but my requirement is to do the same in all 100+ databases which is a pain ful proces, So looking for script to create an user in all databases in one shot.
    You need to connect to each DB; one at a time.
    Realize that "script" is Operating System dependent & you decided not to share your OS with us.
    We had an common server which can able to connect all the databases individually, by using the TNS Entries.
    I am glad you have this since it will be needed to complete your task.

  • Calling an AS400 RPG program to create users on AS400

    Hi,
    our customer has a custom application on AS400.
    To create users for this application, the customer uses a RPG program that both creates the AS400 user, populates the application custom tables, and do other stuff needed for the user definition.
    Now,
    Is it possible to use the IDM OS400 adapter to invoke the RPG program?
    Or ... which is the best way to create a custom adapter to fulfill this task?
    Regards!

    Hi, We also need to call RPG from ABAP via RFC. We have installed the RFC SDK on A/S400 and tried call ABAP RFC from RPG, but still don't know how to make RPG program callable from ABAP
    Any advice!
    Many thanks
    Tim

  • Create users for other clients from client 000

    Hello!
    I have the following question:
    What is the Tcode allows me to see all created users (perhaps wuth their password) in all clients from e.g. client 000?
    Is it possible to create new users for other clients from client 000?
    Thank you very much!
    regards
    Thom

    <b>SU10 User Mass Maintenance</b>
    SCUA Central User Administration
    SCUM Central User Administration
    SCUG Copy users
    SU01/SUCOMP User Maintenance/User company address maintenance
    SU01D User Display
    SCUL Central User Management Log

  • Write a program to create users in FileRealm

    I am trying to create several hundred users in the default file realm and would be interested if anyone has a solution to this problem.

    Hi Greg,
    I've never tried what you want, but I noticed a post where someone was doing something very similar to what you want, and may help you..
    Check out
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.security&item=6093&utag=
    Cheers,
    Joe Jerry

  • ABAP Program to unlock users

    Hi Everyone,
    I am trying to develop a ABAP Program to unlock users in sap client. Please if anyone can help me I will be thankful to them.
    Thanks in advance.
    Regards,
    Gaurav.

    eh, such a functionality already exists. in SU01 you got a button for that.

  • Send data to multiple clients from a server

    My problem statement is this:
    A server is created, say X. Multiple clients are created, say A, B & C. If X sends a message to A it should reach only A and should not go to B or C. Similarly if X sends message to B it should not reach A or C. I made a one to one communication with the following code:
    //Server
    import java.io.*;
    import java.net.*;
    class X
    public static void main(String args[])throws Exception
    ServerSocket ss=new ServerSocket(4321);
    try
    Socket s=ss.accept();
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    DataOutputStream out = new DataOutputStream(s.getOutputStream());
    String str=in.readLine();
    out.writeBytes(str+"\n");
    s.close();
    ss.close();
    catch (IOException e){}
    //Client A
    import java.io.*;
    import java.net.*;
    class A
    public static void main(String args[])throws Exception
    try
    Socket s=new Socket("localhost",4321);
    BufferedReader in=new BufferedReader(new InputStreamReader(s.getInputStream()));
    System.out.println(in.readLine());
    s.close();
    catch(Exception e){}
    }But i dont know how to keep track of each client. Because all the clients sockets are created at the same port, ie. 4321. I think thread will help. But even then i dont know how to identify each client. Somebody please help. Thanks in advance.
    Edited by: sowndar on Dec 5, 2009 1:21 AM

    YoungWinston wrote:
    sowndar wrote:
    Ok. I think i have to attach an unique ID to each client message. So that, with the help of that ID, the server can identify each client. Have i caught ur point?If you don't mind using a port per client, you could do something like a receptionist taking incoming calls (on 4321 only).
    - Hi I'm Client xyz.
    - Hi Client xyz, please call me back on port abcd and I'll put you straight through to our server.
    Since 4321 is an "open line" you might have to have some sort of ID so that Clients know which return messages are meant for them, but messages on the other ports would all be direct Client to Server. Also, the Server is then is charge of port allocation and communication on the "open" port is kept to a minimum.4321 is the socket that the server is listening to. It's not what the actual communication will be carried out over. Run this, then telnet to port 12345 a few times
    public class TestServerSocket {
      public static void main(String[] args) throws Exception {
              ServerSocket server = new ServerSocket(12345);
              while (true) {
                   Socket socket = server.accept();
                   System.err.println(socket.getPort());
    }Notice how each inbound connection is allocated a unique outbound socket.

  • Can Multiple DOE users access same client

    Dear All,
    I have a use case where manager and his team have to use the same physical device ( It mean same client in the handheld and also the same application). Manager and all the team members are DOE Users.
    As far as i know, we will have multiple local users in the client and mapped to single doe user, where as synchronization will happen through DOE sync user, who is configured in the client. During Sync DOE authenticates this user.
    But in my use case, DOE should authenticate all the users (user with which i am synchronizing the data). Is this possible in the standard client? Is there any possibility to achieve this?
    Regards,
    Kiran.

    HI,
    Your requirement is a standard behavior and there is nothing like  all the local client users are mapped to DOE users in default client.
    If each local client user has a corresponding DOE server username(i guess it need to be the same username or so) , with a user logged in , he/she can provide their own sync password which will take sync user as the currently logged in local client user.
    Only catch here that irrespective of which user is synching, all the messages in the queue (new data,modifications etc ) created by all the users will be send to server with this sync.
    Regards,
    Liji

  • How does create a server with multiple Clients ?

    Any people can lead me .
    How does create a server with multiple Clients ?
    Thanks

    For a multithreaded server you will need a thread to listen and at least one thread per client. If the conversation is half duplex, one thread per client works very well, if it's full duplex you will find one thread to send and one to receive much easier to program.
    I posted a Simple Socket Server that uses 1+2*clients threads.

  • Multiple Clients in Client/Server Program

    I'm currently trying to make a small Client/Server application that will mimic a very basic chat room program. The basic idea is that the Server side of the program is started and multiple Client programs can connect and communicate with each other. However, I'm having a few problems at the moment, mostly with figuring out how it can work.
    Firstly, I can communicate one to one with the server and the client as the client socket is stored in a variable. However, to make it possible to allow multiple connections I've used a thread for each new connection but I'm not sure how I can broadcast messages to every connection. Would it be safe enough to store each client socket in a list and then communicate that way? Not sure what will happen when the client disconnects though it seems to be an issue.
    I'm also not sure how every message can be broadcasted to every single connections to the server. The server program can send a message to every client but the clients message at the moment only goes to the server. Anyway here's a bit of my code so far:
    SwingWorker<Socket, Void> worker = new SwingWorker<Socket, Void>() {
            protected Socket doInBackground() throws Exception {
                // Client socket
                try {
                    while (!stopRequested) {
                        clientSocket = serverSocket.accept();
                        // Stop requested is checked twice because the accept() method
                        // waits for a connection
                        if (!stopRequested) {
                            HostFrame.getFeedbackTextArea().append("New Connection Found");
                            Thread clientThread = new HandlerThread(clientSocket);
                            clientThread.start();
                        else {
                            serverSocket.close();
                            clientSocket.close();
                catch (Exception e) {
                    HostFrame.getFeedbackTextArea().append("Failed to Connect with Client");
                    System.out.println(e.getMessage());
                return clientSocket;
        };The SwingWorker is used so that the GUI doesn't freeze when the server tries to find a connection. At the moment it just creates a thread for each new connection but I'm guessing this isn't what I'm going to be needing to handle more than one client. Also at the moment I have no way of directing a message to a specific socket I'm pretty much just using the standard method shown on the Sun website about Sockets. Any help would be much appreciated

    clientSocket = serverSocket.accept();'clientSocket' should be a local variable here.
    else {
    serverSocket.close();
    clientSocket.close();You shouldn't close 'clientSocket here'. All you're accomplishing is closing the most recently accepted client socket. What about the others? Generally speaking you should let the client-handling threads take care of their own sockets completely.
    return clientSocket;This return statement is meaningless. You may as well return null. SwingWorker doesn't care. Don't just return something because you've got it lying around. In this case you shouldn't have it lying around.
    At the moment it just creates a thread for each new connection but I'm guessing this isn't what I'm going to be needing to handle more than one client.That is exactly what you have to do to handle more than one client. Once you fix it as per above.
    Also at the moment I have no way of directing a message to a specific socket I'm pretty much just using the standard method shown on the Sun website about Sockets.You probably need to keep a Map of client sockets accepted, keyed by some client identifier.

  • We have created shared folder on multiple client machine in domain environment on different 2 OS like-XP,Vista, etc. from some day's When we facing problem when we are access from host name that shared folder is accessible but same time same computer when

    Hello All,
    we have created shared folder on multiple client machine in domain environment on different 2 OS like-XP,Vista, etc.
    from some day's When we facing problem when we are access from host name that shared folder is accessible but same time same computer when we are trying to access the share folder with IP it asking for credentials i have type again and again
    correct credential but unable to access that. If i re-share the folder then we are access it but when we are restarted the system then same problem is occurring.
    I have checked IP,DNS,Gateway and more each & everything is well.
    Pls suggest us.
    Pankaj Kumar

    Hi,
    According to your description, my understanding is that the same shared folder can be accessed by name, but can’t be accessed be IP address and asks for credentials.
    Please try to enable the option below on the device which has shared folder:
    Besides, check the Advanced Shring settings of shared folder and confrim that if there is any limitation settings.
    Best Regards,
    Eve Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Program for creating a model is locked by User

    Hi Guys,
    We have created a process chain to create the Integration Model and to activate the Integration Model using this prg RIMODGEN. So, This prg we have created variants for different location wise. This process chain contains 13 processes For each location, which is running in parallel. Some time we are getting the error message " Program for creating a model is locked by User
    Regards

    Dear  Pullaiah,
    Locking happens if there is any overlap of models or duplicate  scheduling of jobs with same variant.                                                                               
    See include LCIFIF01                                                                               
    CALL FUNCTION 'ENQUEUE_ECIF_IMOD'                                    
      EXPORTING                                                          
        mode_cif_imod  = 'E'                                             
        modelname      = i_modid                                         
        logsys         = i_logsys                                        
        apoapp         = i_appl                                          
      EXCEPTIONS                                                         
        foreign_lock   = 1                                               
        system_failure = 2                                               
        OTHERS         = 3.                                                                               
    So this means for you, you get the lockentry if the modelname, logsys and apoapp is the same. So please check again your variants if there is one with the same integrationmodels.            
    This can be the only reason we you get here this entry in your joblog.
    Regards,
    Tibor

  • User Exit to call program to create IDocs.

    Hi All,
    For any creation/changes of material master using MM01/MM02 (after save ) one of the user exit will trigger.
    From the user exit, I have to call the custom program to create MATMAS IDOCs.
    if any failures in changes/creation of material master. It has to roll back eveything created by program.
    Please let me know how to achieve this with out calling an event.
    Thanks - Vinay

    There are a number of standard methods to automatically create the IDOC.  You can activate the change pointers and depending on need, use BD64 to create a distribution model, and create the necessary WE20 setups to create the outbound IDOC.
    If you have to process the IDOC using custom logic, you can define that as well - although it's not clear why you need a custom generating program.  You can insert code into one of the IDOC user-exits to manipulate the content if needed.  Also, don't overlook the pre-delivered stuff from SAP that provides filtering out of segments and the like.
    There are a few good SAP PRess books about doing ALE distribution -- if this is an unfamiliar area, it's worth the cost to buy one -- if you spend any time around IDOCS, you'll appreciate it.

Maybe you are looking for

  • Multiple Documents (Invoice) per report generation

    Hello helpers, i have some question during development with bi publisher. I want to generate one report with several invoices, because starting the reporting should be once a month. I have a list with invoices to print and i will mark all or some inv

  • JDBC : error in receiver communication channel?

    Hi Experts , I am doing a JDBC to JDBC scenario. The following error comes in my receiver communication channel monitoring. Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for

  • How do I turn off message preview?

    How do I turn off message preview on the update 5.1.1? It's not in the usual settings and message options.

  • Download Folder Icon

    Recently, the icon, fan, grid, or any view setting for checking my download folder on the dock has stopped updating any changes made to it. If I delete a file from the Downloads folder, the icon or any view on the dock will still show the file listed

  • Change in the cost center group

    Hi, Can we change the cost center from one cost center group to another group, when there are some postings in the cost center? If yes, how to go about it? help me out