Skip to Content
author's profile photo Former Member
Former Member

Provide user role assigements in batch file (help in design )

HI All ,

I have to provide new class which can provide the user assignments to roles .

the user assignments to roles need be provided to by CSV file to on the server .

i want to run on all the users with bapi get details .

i need help in thinking on edge case .

Regards

Nina

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Oct 02, 2009 at 12:17 AM

    Hi,

    I would define a class with the attributes username and table of roles and the following simple methods:

    static method getUser - parameter username

    It would simply return a object with stored user name and all roles assigned to this user using BAPI BAPI_USER_GET_DETAIL or throw exception user does not exist.

    method addRole - parameter role. This method would simply add role into list of roles.

    method removeRole - parameter role. This method would simply remove role into list of roles.

    method storeUser - this method would commit changes to DB using BAPI BAPI_USER_ACTGROUPS_ASSIGN and BAPI_USER_ACTGROUPS_DELETE.

    After you implement this basic class you can add additional methods like getRolesFromFile which would read and parse CSV file and use methods removeRole and addRole.

    Cheers

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI Martin,

      Thanks

      What i need is to provide service which just provide the user assignments (GET )which already exist in the BE ,

      i don't need to create new roles to user .

      what i need is to know how to optimize the process i.e. after the initial load (send all the user with there assignments )

      i want to calculate the the deltas and not to calculate all the the users .

      i think that that i can do it with time stemp which i send to the caller, and one of the problem is how to know if the user is deleted from the list or if for some user some role are deleted from is list and etc .

      What do u think i want to catch the edge cases ?

      Regards

      Nina

      Edited by: Nina C on Oct 5, 2009 9:31 AM

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.