Mass Users deletion in SRM 4.0

Hi Guys
Can anyone suggest me how to delete large number of Users from the SRM system,i.e Postion, BP, an SU01 data should be removed. As I dont have option for deletion of users from USERS_GEN trxn in SRM 4.0.
Please help by suggesting me with any program or Tcode .
Regards
Srujank
Edited by: srujan K on Oct 5, 2009 4:47 PM

Hi Srujank,
you can use the program RHRHDL00 to delete any object in the org. structure .
kr,
Raz

Similar Messages

  • User deletion in SRM 4.0

    Hi Guys
    Can anyone suggest me how to delete large number of Users from the SRM system,i.e with Postion, BP, an SU01 data should be removed. As I dont have option for deletion of users from USERS_GEN trxn in SRM 4.0.
    Please help by suggesting me with any program or Tcode .
    Regards
    Srujank

    better lock the user since he may some business documnt open and you can not proceed further.
    br
    muthu

  • Mass User Deletion in Portal

    HI Experts,
    Is there anyway to Delete large number of users from Portal ,
    we know about Mass user creation but what about Deletion?
    Any thing regarding the same will be veryhelp and will be rewarded
    With Regards,
    Dayakar.

    Hi dayakar,
    I think there is no standard way to delete mass portal users other than Identity management (advance search) as other said above.There is no standard procedure like IMporting multiple users.
    this is a sample code for deleting a single user ( i never tried for mass deletion ) in WDJ.
    try {
    IUser user = userFact.getUserByLogonID(u201Cuseridu201D);
    userFact.deleteUser(user.getUniqueID());
    } catch (UMException ex)
    String.out.println(ex.toString()) ;
    Regards
    Mahesh

  • Mass user delete in portal?

    I have a feeling what I want to do is not possible in the portal. We are converting all of our UME based users to LDAP. I have created the users in LDAP and prepared the import file for portal.
    I need to mass delete about 120 users UME accounts in the portal. Is there a way to perform a mass delete? Unfortunately I cannot filter out the search results for the users I need to delete.
    Is there some level of functionality in EP like SU10?
    Thanks.
    Todd

    Here's one Idea.
    Delete the 120 IDs in the Source System and Sync with UME. Results depent on Config Settings for UME and the Source System.
    AB.

  • Mass user movement from one org. unit to another in SRM org. structure

    Hi,
    Is there any way by which i can move mass users from one organisational unit to another in SRM org. structure..
    there is a thread available in SDN but it is not conclusive. it talks abt using a FM: BBP_USER_CHANGE_ORG
    BR
    Bharat M

    Bharat-
    I am assuming that your requirement is to move mass users from One Org node to another. Ex One Plant Org node to Another plant Org node.
    If my assumption is correct then, please follow the below steps.
    1) Go in to the change mode of Org Plan using T-code PPOMA_BBP
    2) Using shift key, select all the users that you need to move.
    3) Drag and Drop the selected users to the desired Org node.
    If the user IDs are not in sequence then you can use Ctrl key to select the relevant user ID.
    Let me know if you have any questions.
    If the answer is helpful, please reward points.
    Regards,
    Upendra.

  • Product Category Deletion in SRM (not with Hierarchy)

    Hello All,
    Certain Product categories are to be deleted in SRM which belong to different R3 Back end systems
    I tried the COMM_HIERARCHY Tx in SRM and did the following:
       Select the Product assigned to the relebvant Back end system and delete manually
    But I observed that there are dependencies as in case this P Category is assigned to some Pgrps as RESP_PRCAT
    in which case , this assignment is to be deleted prior to deleting the Pcategory from the system
    It is a huge and manual work.
    Did anybody come across such a scenario?
    Are there any standard reports by SAP or customized reports developed which can be made use of?
    regards,
    Nagarajan

    Hi,
    Use the following reports
    COM_PRODUCT_DELETE_ALL      Used to delete product master data.
    COM_PRODUCT_DELETE_SINGLE     Used to delete product master data.
    For executing above reports please register your user id and program names in below table then only you can execute above reports.COMC_PR_TOOL_REG
    Hope this helps,
    Abraham

  • Mass approval functionality for SRM work items

    Hi,
    We want to implement mass approval functionality for SRM workflow, so that any user is able to approve/reject multiple requests at one go through UWL.
    Please guide if it is possible to implement this functinality for task id TS40007952.
    Regards,
    Avantika

    Hi Avantika,
    The mass approval functionality can be implemented for simple workflow items which have decisions to complete the work item. (User Decision Type)
    In SAP Business Workflow, user can define a task as a decision task by assigning DECISION as the underlying business object type. The task definition allows user to create two or more decision options to complete the task.
    The idea is to simply create a custom view/subview for the UWL item and configure it according to your needs.
    Have a look at this blog:
    Mass/Batch Processing of Work items in UWL
    and also check the documentation:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/4e/72112bc9ea484196f2a5fdc68f5f5f/frameset.htm
    Let me know if you have any questions.
    Thanks,
    Shanti

  • Invoice deletion in SRM system

    Hi All,
    We are using the extended classic scenario.An invoice has to be deleted from SRM system having staus "awaiting approval".
    (p.s:the invoice is still in the SRM system and it is not posted in the backend)
    When we  tried deleting the invoice ,a Pop-up message appears u201CThis Document is locked by another Useru201D .
    Tried to check if it is stuck in the workflow but havent found any entry in the table BBP_WFLOCK.
    Kindly advise on how to go about deleting the invoice.

    Yes it is still showing the same pop up message "locked by another user"
    We believe it is stuck in the workflow.
    Could you please suggest an alternative on how to delete the invoice.
    Quick reply is appreciated.
    Thanks in advance.

  • BPC Mass User Management Tool error in BPC 10

    Hello,
    I've downloaded tranport files from How to use BPC Mass User Management Tool in Netweaver. But Transport import fails with RC12 without any shortdump. ABAP program ZUJE_MASS_USER_MGMT is not created.
    Version used - BPC 10 CPMBPC 801 on Netweaver 7.4 .
    Thanks in advance for your inputs.

    Tried changing transport options but no luck. Transport failed with status RC12 without creating ABAP program. However, Old version transport files imported with error. But I could not find METHOD check_bpc_component_is_valid.
    Can anyone please send the updated program.
    *& Report  ZUJE_MASS_USER_MGMT
    *& Created By: Rich Heilman  SAP Labs, LLC
    *& Created On: 08/2/2010
    REPORT  zuje_mass_user_mgmt.
    TYPE-POOLS: abap, vrm.
    *       CLASS lcl_application DEFINITION
    CLASS lcl_application DEFINITION FINAL.
      PUBLIC SECTION.
        CONSTANTS: lc_comma TYPE char01 VALUE ',',
                   lc_pipe TYPE char01 VALUE '|',
                   lc_tab TYPE char10 VALUE 'TAB'.
        TYPES: BEGIN OF t_appldim,
                appl_id TYPE uj_appl_id,
                dimension TYPE uj_dim_name,
              END OF t_appldim.
        TYPES: BEGIN OF t_appldimmembers,
                appl_id TYPE uj_appl_id,
                dimension TYPE uj_dim_name,
                member TYPE uj_dim_member,
              END OF t_appldimmembers.
        CLASS-METHODS: file_f4 RETURNING value(r_file) TYPE string,
                       directory_f4 RETURNING value(r_path) TYPE string,
                       get_initial_directory RETURNING value(r_path) TYPE string,
                       set_delimiter_listbox,
                       set_delimiter,
                       export_users_to_file,
                       import_users_from_file,
                       export_teams_to_file,
                       import_teams_from_file,
                       export_team_assign_to_file,
                       import_team_assign_from_file,
                       export_task_profiles_to_file,
                       import_task_profiles_from_file,
                       export_mem_profiles_to_file,
                       import_mem_profiles_from_file,
                       export_tap_assign_to_file,
                       import_tap_assign_from_file,
                       export_map_assign_to_file,
                       import_map_assign_from_file,
                       get_appset_data IMPORTING i_appset_id TYPE uj_appset_id
                                       EXCEPTIONS appset_not_found .
      PRIVATE SECTION.
        CLASS-DATA: lv_appset_id TYPE uja_s_appset_info-appset_id.
        CLASS-DATA: lv_delimiter TYPE string.
        CLASS-DATA: ls_appset_info TYPE uja_s_appset_info.
        CLASS-DATA: lt_appl_info TYPE uja_t_appl_info.
        CLASS-DATA: lt_appl_dim TYPE TABLE OF t_appldim.
        CLASS-DATA: lt_members TYPE TABLE OF t_appldimmembers.
        CLASS-DATA: lt_teams_list TYPE uje_t_team.
        CLASS-DATA: lt_users_list TYPE uje_t_user.
        CLASS-DATA: lt_tprofs TYPE uje_t_api_profile_id.
        CLASS-DATA: lt_mprofs TYPE uje_t_api_profile_id.
        CLASS-DATA: lt_tasks TYPE uje_t_role_tskasg.
        CLASS-DATA: lt_roles TYPE uje_t_role.
        CLASS-DATA: lo_context TYPE REF TO if_uj_context.
        CLASS-DATA: lt_alv_messages TYPE uj0_t_message.
        CLASS-METHODS: set_global_context,
                       render_alv,
                       upload IMPORTING i_filepath TYPE any
                              RETURNING value(rt_strtab) TYPE stringtab,
                       download IMPORTING i_filepath TYPE any
                                         it_datatab TYPE STANDARD TABLE,
                       user_is_valid IMPORTING i_user_id TYPE any
                                     RETURNING value(r_boolean) TYPE abap_bool,
                       team_is_valid IMPORTING i_team_id TYPE any
                                     RETURNING value(r_boolean) TYPE abap_bool,
                       tprofile_is_valid IMPORTING i_profile_id TYPE any
                                         RETURNING value(r_boolean) TYPE abap_bool,
                       mprofile_is_valid IMPORTING i_profile_id TYPE any
                                         RETURNING value(r_boolean) TYPE abap_bool,
                       role_is_valid IMPORTING i_role_id TYPE any
                                     RETURNING value(r_boolean) TYPE abap_bool,
                       task_is_valid IMPORTING i_task_id TYPE any
                                     RETURNING value(r_boolean) TYPE abap_bool.
    ENDCLASS.                    "lcl_application DEFINITION
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_export RADIOBUTTON GROUP grp1 DEFAULT 'X' USER-COMMAND chk.
    PARAMETERS: p_import RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: p_appset TYPE uja_appset_info-appset_id.
    PARAMETERS: p_file TYPE string LOWER CASE.
    PARAMETERS: p_delmt TYPE char10 AS LISTBOX VISIBLE LENGTH 20
                           DEFAULT lcl_application=>lc_comma.  "delimiter
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS: p_eusers RADIOBUTTON GROUP grp2 MODIF ID exp.
    PARAMETERS: p_eteams RADIOBUTTON GROUP grp2 MODIF ID exp.
    PARAMETERS: p_eteama RADIOBUTTON GROUP grp2 MODIF ID exp.
    PARAMETERS: p_etprof RADIOBUTTON GROUP grp2 MODIF ID exp.
    PARAMETERS: p_emprof RADIOBUTTON GROUP grp2 MODIF ID exp.
    PARAMETERS: p_etprfa RADIOBUTTON GROUP grp2 MODIF ID exp.
    PARAMETERS: p_emprfa RADIOBUTTON GROUP grp2 MODIF ID exp.
    SELECTION-SCREEN END OF BLOCK b3.
    SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-004.
    PARAMETERS: p_iusers RADIOBUTTON GROUP grp3 MODIF ID imp.
    PARAMETERS: p_iteams RADIOBUTTON GROUP grp3 MODIF ID imp.
    PARAMETERS: p_iteama RADIOBUTTON GROUP grp3 MODIF ID imp.
    PARAMETERS: p_itprof RADIOBUTTON GROUP grp3 MODIF ID imp.
    PARAMETERS: p_improf RADIOBUTTON GROUP grp3 MODIF ID imp.
    PARAMETERS: p_itprfa RADIOBUTTON GROUP grp3 MODIF ID imp.
    PARAMETERS: p_imprfa RADIOBUTTON GROUP grp3 MODIF ID imp.
    SELECTION-SCREEN END OF BLOCK b4.
    INITIALIZATION.
      p_file = lcl_application=>get_initial_directory( ).
      lcl_application=>set_delimiter_listbox( ).
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF p_export = abap_true AND screen-group1 = 'IMP'.
          screen-active = '0'.
        ENDIF.
        IF p_import = abap_true AND screen-group1 = 'EXP'.
          screen-active = '0'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN.
      CASE abap_true.
        WHEN p_export.
          CLEAR: p_iusers, p_iteams, p_iteama, p_itprof,
                 p_improf, p_itprfa, p_imprfa.
        WHEN p_import.
          CLEAR: p_eusers, p_eteams, p_eteama, p_etprof,
                 p_emprof, p_etprfa, p_emprfa.
      ENDCASE.
      IF sy-ucomm <> 'CHK'.
        IF p_appset IS INITIAL.
          MESSAGE e001(00) WITH 'Please enter an AppSet Id'.
        ENDIF.
        IF p_file IS INITIAL.
          MESSAGE e001(00) WITH 'Please enter a valid directory or file'.
        ENDIF.
        IF p_delmt IS INITIAL.
          MESSAGE e001(00) WITH 'Please specify a delimiter'.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CASE abap_true.
        WHEN p_export.  p_file = lcl_application=>directory_f4( ).
        WHEN p_import.  p_file = lcl_application=>file_f4( ).
      ENDCASE.
    START-OF-SELECTION.
      lcl_application=>set_delimiter( ).
      lcl_application=>get_appset_data(
                  EXPORTING
                       i_appset_id =  p_appset
                  EXCEPTIONS
                       appset_not_found  = 1 ).
      IF sy-subrc <> 0.
        RETURN.
      ENDIF.
      CASE abap_true.
        WHEN p_eusers.  lcl_application=>export_users_to_file( ).
        WHEN p_iusers.  lcl_application=>import_users_from_file( ).
        WHEN p_eteams.  lcl_application=>export_teams_to_file( ).
        WHEN p_iteams.  lcl_application=>import_teams_from_file( ).
        WHEN p_eteama.  lcl_application=>export_team_assign_to_file( ).
        WHEN p_iteama.  lcl_application=>import_team_assign_from_file( ).
        WHEN p_etprof.  lcl_application=>export_task_profiles_to_file( ).
        WHEN p_itprof.  lcl_application=>import_task_profiles_from_file( ).
        WHEN p_emprof.  lcl_application=>export_mem_profiles_to_file( ).
        WHEN p_improf.  lcl_application=>import_mem_profiles_from_file( ).
        WHEN p_etprfa.  lcl_application=>export_tap_assign_to_file( ).
        WHEN p_itprfa.  lcl_application=>import_tap_assign_from_file( ).
        WHEN p_emprfa.  lcl_application=>export_map_assign_to_file( ).
        WHEN p_imprfa.  lcl_application=>import_map_assign_from_file( ).
      ENDCASE.
    *       CLASS lcl_application IMPLEMENTATION
    CLASS lcl_application IMPLEMENTATION.
      METHOD file_f4.
        DATA: lt_file_table TYPE filetable.
        DATA: ls_file_table LIKE LINE OF lt_file_table.
        DATA: lv_rc TYPE sy-subrc.
        cl_gui_frontend_services=>file_open_dialog(
          CHANGING
            file_table = lt_file_table
            rc         = lv_rc ).
        CLEAR ls_file_table .
        READ TABLE lt_file_table INTO ls_file_table INDEX 1.
        IF sy-subrc  = 0.
          r_file = ls_file_table-filename.
        ENDIF.
      ENDMETHOD.                                                "file_f4
      METHOD directory_f4.
        cl_gui_frontend_services=>directory_browse(
            CHANGING
              selected_folder      = r_path
            EXCEPTIONS
              OTHERS               = 4 ).
      ENDMETHOD.                    "directory_f4
      METHOD upload.
        cl_gui_frontend_services=>gui_upload(
              EXPORTING
                filename = i_filepath
              CHANGING
                data_tab = rt_strtab
              EXCEPTIONS
                OTHERS   = 19 ).
        IF sy-subrc <> 0.
          MESSAGE e001(00) WITH 'File not found, check file path and name'.
        ENDIF.
        DELETE rt_strtab WHERE table_line IS INITIAL.
      ENDMETHOD.                    "upload
      METHOD download.
        DATA: lt_datatab TYPE stringtab.
        DATA: ls_datatab LIKE LINE OF lt_datatab.
        FIELD-SYMBOLS: <ls_data> TYPE ANY.
        FIELD-SYMBOLS: <lv_field> TYPE ANY.
    * Convert table to delimited string table
        LOOP AT it_datatab ASSIGNING <ls_data>.
          CLEAR ls_datatab.
          DO.
            ASSIGN COMPONENT sy-index
                             OF STRUCTURE <ls_data> TO <lv_field>.
            IF sy-subrc <> 0.
              EXIT.
            ENDIF.
            IF ls_datatab IS INITIAL.
              ls_datatab = <lv_field>.
            ELSE.
              CONCATENATE ls_datatab <lv_field>
                              INTO ls_datatab SEPARATED BY lcl_application=>lv_delimiter.
            ENDIF.
          ENDDO.
          APPEND ls_datatab TO lt_datatab.
        ENDLOOP.
        cl_gui_frontend_services=>gui_download(
           EXPORTING
             filename = i_filepath
           CHANGING
             data_tab = lt_datatab
           EXCEPTIONS
             OTHERS   = 24 ).
        IF sy-subrc <> 0.
          MESSAGE e001(00)
              WITH 'File not downloaded, check file path and name'.
        ENDIF.
      ENDMETHOD.                    "download
      METHOD get_initial_directory.
        cl_gui_frontend_services=>get_desktop_directory(
          CHANGING
            desktop_directory    = r_path ).
        cl_gui_cfw=>flush( ).
        CONCATENATE r_path '\*.csv' INTO r_path.
      ENDMETHOD.                    "get_initial_directory
      METHOD export_users_to_file.
        TYPES: BEGIN OF t_output,
                user_id TYPE uje_user-user_id,
                fullname TYPE uje_user-fullname,
                email TYPE uje_user-email,
               END OF t_output.
        DATA: lt_user_id TYPE uje_t_api_user_id.
        DATA: lt_users TYPE uje_t_user.
        DATA: ls_users LIKE LINE OF lt_users.
        DATA: lt_output TYPE TABLE OF t_output.
        DATA: ls_output LIKE LINE OF lt_output.
        lcl_application=>set_global_context( ).
        CALL FUNCTION 'UJE_API_GET_LIST_USERS'
          EXPORTING
            i_appset_id = lcl_application=>lv_appset_id
            is_user     = lcl_application=>lo_context->ds_user
            it_user_id  = lt_user_id
          IMPORTING
            et_user     = lt_users.
        REFRESH lt_output.
        LOOP AT lt_users INTO ls_users.
          MOVE-CORRESPONDING ls_users TO ls_output.
          APPEND ls_output TO lt_output.
        ENDLOOP.
    * Download table
        lcl_application=>download( EXPORTING i_filepath = p_file
                                             it_datatab = lt_output ).
      ENDMETHOD.                    "export_users_to_file
      METHOD import_users_from_file.
        DATA: lv_action TYPE uj_action.
        DATA: lv_success TYPE uj_bool.
        DATA: ls_user_info TYPE uje_s_userinfo.
        DATA: lt_messages TYPE uj0_t_message.
        DATA: ls_alv_messages LIKE LINE OF lt_alv_messages.
        DATA: lt_team_asin TYPE uje_t_user_team.
        DATA: lt_tprofiles TYPE uje_t_profile_id_act.
        DATA: lt_mprofiles TYPE uje_t_profile_id_act.
        DATA: lt_strtab TYPE stringtab.
        DATA: ls_strtab LIKE LINE OF lt_strtab.
        lt_strtab = lcl_application=>upload( p_file ).
        LOOP AT lt_strtab INTO ls_strtab.
          SPLIT ls_strtab AT lcl_application=>lv_delimiter INTO ls_user_info-user_id
                                      ls_user_info-fullname
                                      ls_user_info-email.
    * Check if user already exists, and set action accordingly.
          IF lcl_application=>user_is_valid( ls_user_info-user_id ) = abap_false.
            lv_action = 'I'.
          ELSE.
            lv_action = 'M'.
          ENDIF.
          CALL FUNCTION 'UJE_API_MANAGE_USER2'
            EXPORTING
              i_appset_id      = lcl_application=>lv_appset_id
              is_user          = lcl_application=>lo_context->ds_user
              is_user_info     = ls_user_info
              i_action         = lv_action
              it_team_asin     = lt_team_asin
              it_tprofile_id   = lt_tprofiles
              it_mprofile_id   = lt_mprofiles
            IMPORTING
              e_success        = lv_success
              et_message_lines = lt_messages.
          IF lv_success = 'Y'.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'S'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'User ID' ls_user_info-user_id
                        'has been created/updated successfully'
                                INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
          ELSE.
            APPEND LINES OF lt_messages TO lt_alv_messages.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'E'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'User ID' ls_user_info-user_id
                        'not created/updated due to error'
                                 INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
          ENDIF.
        ENDLOOP.
        lcl_application=>render_alv( ).
      ENDMETHOD.                    "create_users_from_file
      METHOD export_teams_to_file.
        TYPES: BEGIN OF t_output,
                team_id TYPE uje_s_team-team_id,
                description TYPE uje_s_team-description,
               END OF t_output.
        DATA: lt_teams TYPE uje_t_team.
        DATA: ls_teams LIKE LINE OF lt_teams.
        DATA: lt_output TYPE TABLE OF t_output.
        DATA: ls_output LIKE LINE OF lt_output.
        CALL FUNCTION 'UJE_API_GET_TEAMS'
          EXPORTING
            i_appset_id = lcl_application=>lv_appset_id
            is_user     = lcl_application=>lo_context->ds_user
          IMPORTING
            et_team     = lt_teams.
        REFRESH lt_output.
        LOOP AT lt_teams INTO ls_teams.
          MOVE-CORRESPONDING ls_teams TO ls_output.
          APPEND ls_output TO lt_output.
        ENDLOOP.
    * Download table
        lcl_application=>download( EXPORTING i_filepath = p_file
                                             it_datatab = lt_output ).
      ENDMETHOD.                    "export_teams_to_file
      METHOD import_teams_from_file.
        DATA: lv_action TYPE uj_action.
        DATA: lv_success TYPE uj_bool.
        DATA: ls_team TYPE uje_s_team.
        DATA: lt_messages TYPE uj0_t_message.
        DATA: ls_alv_messages LIKE LINE OF lt_alv_messages.
        DATA: lt_users TYPE uje_t_user_team.
        DATA: lt_tprofiles TYPE uje_t_profile_id_act.
        DATA: lt_mprofiles TYPE uje_t_profile_id_act.
        DATA: lt_strtab TYPE stringtab.
        DATA: ls_strtab LIKE LINE OF lt_strtab.
        lt_strtab = lcl_application=>upload( p_file ).
        LOOP AT lt_strtab INTO ls_strtab.
          SPLIT ls_strtab AT lcl_application=>lv_delimiter INTO ls_team-team_id
                                      ls_team-description.
    * Check if team is already a valid team, set action appropriatly
          IF lcl_application=>team_is_valid( ls_team-team_id ) = abap_false.
            lv_action = 'I'.
          ELSE.
            lv_action = 'M'.
          ENDIF.
          CALL FUNCTION 'UJE_API_MANAGE_TEAM2'
            EXPORTING
              i_appset_id      = lcl_application=>lv_appset_id
              is_user          = lcl_application=>lo_context->ds_user
              is_team          = ls_team
              i_action         = lv_action
              it_users         = lt_users
              it_tprofile_id   = lt_tprofiles
              it_mprofile_id   = lt_mprofiles
            IMPORTING
              e_success        = lv_success
              et_message_lines = lt_messages.
          IF lv_success = 'Y'.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'S'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'Team' ls_team-team_id
                         'has been created/updated successfully'
                             INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
          ELSE.
            APPEND LINES OF lt_messages TO lt_alv_messages.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'E'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'Team' ls_team-team_id
                        'not created/updated due to error'
                              INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
          ENDIF.
        ENDLOOP.
        lcl_application=>render_alv( ).
      ENDMETHOD.                    "create_teams_from_file
      METHOD export_team_assign_to_file.
        TYPES: BEGIN OF t_user_assign,
                user_id TYPE uje_s_user_team-user_id,
                team_id TYPE uje_s_user_team-team_id,
                teamleader TYPE uje_s_user_team-teamleader,
               END OF t_user_assign.
        DATA: lt_user_det TYPE uje_t_user_detail.
        DATA: ls_user_det LIKE LINE OF lt_user_det.
        DATA: ls_user_team TYPE uje_s_user_team.
        DATA: lt_team_assign TYPE TABLE OF t_user_assign.
        DATA: ls_team_assign LIKE LINE OF lt_team_assign.
        CALL FUNCTION 'UJE_API_GET_USERDATA'
          EXPORTING
            i_appset_id = lcl_application=>lv_appset_id
            is_user     = lcl_application=>lo_context->ds_user
          IMPORTING
            et_user     = lt_user_det.
        LOOP AT lt_user_det INTO ls_user_det.
          LOOP AT ls_user_det-t_team_id INTO ls_user_team.
            MOVE-CORRESPONDING ls_user_team TO ls_team_assign.
            APPEND ls_team_assign TO lt_team_assign.
          ENDLOOP.
        ENDLOOP.
    * Download table
        lcl_application=>download( EXPORTING i_filepath = p_file
                                             it_datatab = lt_team_assign ).
      ENDMETHOD.                    "export_team_assign_to_file
      METHOD import_team_assign_from_file.
        TYPES: BEGIN OF t_user_assign,
                user_id TYPE uje_s_user_team-user_id,
                team_id TYPE uje_s_user_team-team_id,
                teamleader TYPE uje_s_user_team-teamleader,
               END OF t_user_assign.
        DATA: lv_success TYPE uj_bool.
        DATA: lt_user_team_temp TYPE uje_t_user_team.
        DATA: ls_user_team_temp TYPE uje_s_user_team.
        DATA: lt_user_team TYPE uje_t_user_team.
        DATA: ls_user_team TYPE uje_s_user_team.
        DATA: ls_team_assign TYPE uje_s_user_team.
        DATA: lt_messages TYPE uj0_t_message.
        DATA: ls_alv_messages LIKE LINE OF lt_alv_messages.
        DATA: lt_tprofiles TYPE uje_t_profile_id_act.
        DATA: ls_tprofiles LIKE LINE OF lt_tprofiles.
        DATA: lt_mprofiles TYPE uje_t_profile_id_act.
        DATA: ls_mprofiles LIKE LINE OF lt_mprofiles.
        DATA: lt_tprofile_ids TYPE uje_t_api_profile_id.
        DATA: ls_tprofile_ids LIKE LINE OF lt_tprofile_ids.
        DATA: lt_mprofile_ids TYPE uje_t_api_profile_id.
        DATA: ls_mprofile_ids LIKE LINE OF lt_mprofile_ids.
        DATA: lt_strtab TYPE stringtab.
        DATA: ls_strtab LIKE LINE OF lt_strtab.
        DATA: ls_teams_list LIKE LINE OF lt_teams_list.
        lt_strtab = lcl_application=>upload( p_file ).
        LOOP AT lt_strtab INTO ls_strtab.
          SPLIT ls_strtab AT lcl_application=>lv_delimiter INTO ls_team_assign-user_id
                                      ls_team_assign-team_id
                                      ls_team_assign-teamleader.
          CLEAR ls_user_team.
          ls_user_team-user_id = ls_team_assign-user_id.
          ls_user_team-team_id = ls_team_assign-team_id.
          ls_user_team-teamleader = ls_team_assign-teamleader.
          TRANSLATE ls_user_team-teamleader USING 'YXyX1XxXN n 0 '. "Translate to X or space
          APPEND ls_user_team TO lt_user_team.
          IF lcl_application=>team_is_valid( ls_team_assign-team_id ) = abap_false.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'E'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'Team' ls_team_assign-team_id 'does not yet exist.'
                        'No user assigments done.'
                              INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
            lcl_application=>render_alv( ).
            RETURN.
          ENDIF.
          IF lcl_application=>user_is_valid( ls_team_assign-user_id ) = abap_false.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'E'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'User' ls_team_assign-user_id 'does not yet exist.'
                        'No user assigments done.'
                              INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
            lcl_application=>render_alv( ).
            RETURN.
          ENDIF.
        ENDLOOP.
        LOOP AT lcl_application=>lt_teams_list INTO ls_teams_list.
          REFRESH lt_user_team_temp.
          REFRESH lt_tprofile_ids.
          REFRESH lt_mprofile_ids.
    * Check that there is data for team assignment, otherwise skip
          READ TABLE lt_user_team TRANSPORTING NO FIELDS
                            WITH KEY team_id = ls_teams_list-team_id.
          IF sy-subrc <> 0.
            CONTINUE.
          ENDIF.
    * Get existing team data for this team.
          CALL FUNCTION 'UJE_API_GET_TEAMDATA'
            EXPORTING
              i_appset_id    = lcl_application=>lv_appset_id
              is_user        = lcl_application=>lo_context->ds_user
              i_team_id      = ls_teams_list-team_id
            IMPORTING
              et_user_team   = lt_user_team_temp
              et_tprofile_id = lt_tprofile_ids
              et_mprofile_id = lt_mprofile_ids.
    * Update with new users.
          LOOP AT lt_user_team INTO ls_user_team
                           WHERE team_id = ls_teams_list-team_id.
            MOVE-CORRESPONDING ls_user_team TO ls_user_team_temp.
            APPEND ls_user_team_temp TO lt_user_team_temp.
          ENDLOOP.
    * Keep existing profiles.
          REFRESH lt_tprofiles.
          LOOP AT lt_tprofile_ids INTO ls_tprofile_ids.
            ls_tprofiles-profile_id = ls_tprofile_ids-profile_id.
            APPEND ls_tprofiles TO lt_tprofiles.
          ENDLOOP.
          REFRESH lt_mprofiles.
          LOOP AT lt_mprofile_ids INTO ls_mprofile_ids.
            ls_mprofiles-profile_id = ls_mprofile_ids-profile_id.
            APPEND ls_mprofiles TO lt_mprofiles.
          ENDLOOP.
    * now update the user/team assignments
          CALL FUNCTION 'UJE_API_MANAGE_TEAM2'
            EXPORTING
              i_appset_id      = lcl_application=>lv_appset_id
              is_user          = lcl_application=>lo_context->ds_user
              is_team          = ls_teams_list
              i_action         = 'M'
              it_users         = lt_user_team_temp
              it_tprofile_id   = lt_tprofiles
              it_mprofile_id   = lt_mprofiles
            IMPORTING
              e_success        = lv_success
              et_message_lines = lt_messages.
          IF lv_success = 'Y'.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'S'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'Team' ls_teams_list-team_id 'user assignments'
                        'have been updated successfully'
                             INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
          ELSE.
            APPEND LINES OF lt_messages TO lt_alv_messages.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'E'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'Team' ls_teams_list-team_id 'user assignments'
                        'not updated due to error'
                             INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
          ENDIF.
        ENDLOOP.
        lcl_application=>render_alv( ).
      ENDMETHOD.                    "import_team_assign_from_file
      METHOD export_task_profiles_to_file.
        TYPES: BEGIN OF t_output,
                identifier TYPE char01, " Row Identifer
                profile TYPE uj_profile_id,
                values TYPE string,
               END OF t_output.
        DATA: ls_tprofs LIKE LINE OF lt_tprofs.
        DATA: lv_profile TYPE uj_profile_id.
        DATA: ls_profile TYPE uje_s_profile.
        DATA: lt_role_id TYPE uje_t_api_role_id.
        DATA: ls_role_id LIKE LINE OF lt_role_id.
        DATA: lt_task_info TYPE  uje_t_task_info.
        DATA: ls_task_info LIKE LINE OF lt_task_info.
        DATA: lt_users_asin TYPE uje_t_api_user_id.
        DATA: ls_users_asin LIKE LINE OF lt_users_asin.
        DATA: lt_teams_asin TYPE uje_t_api_team_id.
        DATA: ls_teams_asin LIKE LINE OF lt_teams_asin.
        DATA: lt_output TYPE TABLE OF t_output.
        DATA: ls_output LIKE LINE OF lt_output.
        LOOP AT lcl_application=>lt_tprofs INTO ls_tprofs.
          lv_profile = ls_tprofs-profile_id.
    * Get relevant data for task profile
          CLEAR ls_profile.
          REFRESH: lt_role_id, lt_task_info, lt_users_asin, lt_teams_asin.
          CALL FUNCTION 'UJE_API_GET_TPROFILEDATA2'
            EXPORTING
              i_appset_id  = lcl_application=>lv_appset_id
              is_user      = lcl_application=>lo_context->ds_user
              i_profile_id = lv_profile
            IMPORTING
              es_profile   = ls_profile
              et_role_id   = lt_role_id
              et_task_info = lt_task_info
              et_user_id   = lt_users_asin
              et_team_id   = lt_teams_asin.
    * Write Header row
          CLEAR ls_output.
          ls_output-identifier = 'H'.
          ls_output-profile  = lv_profile.
          ls_output-values = ls_profile-description.
          APPEND ls_output TO lt_output.
    * Write task assigments
          CLEAR ls_output.
          ls_output-identifier = 'K'.
          ls_output-profile  = lv_profile.
          LOOP AT lt_task_info INTO ls_task_info.
            ls_output-values = ls_task_info-task_id.
            APPEND ls_output TO lt_output.
          ENDLOOP.
    * Write role assigments
          CLEAR ls_output.
          ls_output-identifier = 'R'.
          ls_output-profile  = lv_profile.
          LOOP AT lt_role_id INTO ls_role_id.
            ls_output-values = ls_role_id-role_id.
            APPEND ls_output TO lt_output.
          ENDLOOP.
    * Write user assignments
          CLEAR ls_output.
          ls_output-identifier = 'U'.
          ls_output-profile  = lv_profile.
          LOOP AT lt_users_asin INTO ls_users_asin.
            ls_output-values = ls_users_asin-user_id.
            APPEND ls_output TO lt_output.
          ENDLOOP.
    * Write team assignments
          CLEAR ls_output.
          ls_output-identifier = 'T'.
          ls_output-profile  = lv_profile.
          LOOP AT lt_teams_asin INTO ls_teams_asin.
            ls_output-values = ls_teams_asin-team_id.
            APPEND ls_output TO lt_output.
          ENDLOOP.
        ENDLOOP.
    * Download table
        lcl_application=>download( EXPORTING i_filepath = p_file
                                             it_datatab = lt_output ).
      ENDMETHOD.                    "export_task_profiles_to_file
      METHOD import_task_profiles_from_file.
        TYPES: BEGIN OF t_input,
                identifier TYPE char01, " Row Identifer
                profile TYPE uj_profile_id,
                values TYPE string,
               END OF t_input.
        TYPES: BEGIN OF t_task_profile,
                profile TYPE uje_s_profile,
                roles TYPE uje_t_api_role_id,
                task_info TYPE uje_t_task_info,
                users_asin TYPE uje_t_api_user_id,
                teams_asin TYPE uje_t_api_team_id,
               END OF t_task_profile.
        DATA: lt_task_profile TYPE TABLE OF t_task_profile.
        DATA: ls_task_profile LIKE LINE OF lt_task_profile.
        DATA: ls_alv_messages LIKE LINE OF lt_alv_messages.
        DATA: lt_messages TYPE uj0_t_message.
        DATA: lv_action TYPE uj_action.
        DATA: lv_success TYPE uj_bool.
        DATA: lv_last_profile TYPE uj_profile_id.
        DATA: lt_role_id TYPE uje_t_api_role_id.
        DATA: ls_role_id LIKE LINE OF lt_role_id.
        DATA: lt_task_info TYPE  uje_t_task_info.
        DATA: ls_task_info LIKE LINE OF lt_task_info.
        DATA: lt_users_asin TYPE uje_t_api_user_id.
        DATA: ls_users_asin LIKE LINE OF lt_users_asin.
        DATA: lt_teams_asin TYPE uje_t_api_team_id.
        DATA: ls_teams_asin LIKE LINE OF lt_teams_asin.
        DATA: lt_strtab TYPE stringtab.
        DATA: ls_strtab LIKE LINE OF lt_strtab.
        DATA: lt_input TYPE TABLE OF t_input.
        DATA: ls_input LIKE LINE OF lt_input.
        DATA: lt_obj_asin TYPE uje_t_profile_asin.
        DATA: ls_obj_asin LIKE LINE OF lt_obj_asin.
        DATA: lt_task_asin TYPE uje_t_task_id_act.
        DATA: ls_task_asin LIKE LINE OF lt_task_asin.
    * Upload file
        lt_strtab = lcl_application=>upload( p_file ).
    * Rip import file into internal table
        LOOP AT lt_strtab INTO ls_strtab.
          CLEAR ls_input.
          SPLIT ls_strtab AT lcl_application=>lv_delimiter INTO ls_input-identifier
                                      ls_input-profile
                                      ls_input-values.
          APPEND ls_input TO lt_input.
        ENDLOOP.
    * Build profile table containing all associated data
        SORT lt_input STABLE ASCENDING BY profile identifier values.
        LOOP AT lt_input INTO ls_input.
          IF ls_input-profile <> lv_last_profile
              AND lv_last_profile IS NOT INITIAL.
            APPEND ls_task_profile TO lt_task_profile.
            CLEAR ls_task_profile.
          ENDIF.
    * Based on record identifier
          CASE ls_input-identifier.
            WHEN 'H'.  " Header
              ls_task_profile-profile-profile_id  = ls_input-profile.
              ls_task_profile-profile-description = ls_input-values.
            WHEN 'K'.  " Task info
              SPLIT ls_input-values AT lcl_application=>lv_delimiter INTO ls_task_info-task_id
                                                ls_task_info-description.
              IF lcl_application=>task_is_valid( ls_task_info-task_id ) = abap_false.
                CLEAR ls_alv_messages.
                ls_alv_messages-msgid = '00'.
                ls_alv_messages-msgty = 'E'.
                ls_alv_messages-msgno = '001'.
                CONCATENATE 'Task ID' ls_task_info-task_id  'is not valid.'
                            'No task profile updates done.'
                                    INTO ls_alv_messages-message SEPARATED BY space.
                APPEND ls_alv_messages TO lt_alv_messages.
                lcl_application=>render_alv( ).
                RETURN.
              ENDIF.
              APPEND ls_task_info TO ls_task_profile-task_info.
            WHEN 'R'.  " Roles
              ls_role_id = ls_input-values.
              IF lcl_application=>role_is_valid( ls_role_id ) = abap_false.
                CLEAR ls_alv_messages.
                ls_alv_messages-msgid = '00'.
                ls_alv_messages-msgty = 'E'.
                ls_alv_messages-msgno = '001'.
                CONCATENATE 'Role ID' ls_role_id   'is not valid.'
                       

  • Mass users creation in BI

    Dear experts,
    I would like to create users in BI massively.
    Could I do a mass upload from a flat file such as using USERS_GEN in others system? What are the available options?
    In fact, I have all my users created in SRM.
    How can I do to have them created in BI as well? Any synchronization tools?
    Please note that we are not going to use CUA.
    Thanks for your feedback.
    chris b.

    Hi
    See the below link and also the threads
    http://www.*********************/tutorials/scat.htm
    Mass user creation in NW 2004s
    Creation of MASS USERS
    Hope this will help.
    Regards,
    Prema

  • Mass Role Deletion Transport to ECC6

    Hi,
    Prior to transporting a mass role deletion through to the PRD ECC6 system, is it recommended to end date the majority of position to role relationships? End dating may maintain some visability of previous role assignments... Or is it safe to send it through and be confident that all the relationships will be removed as well as UMR based assignments?
    Any recommendations on this topics?
    Kind Regards
    Nathan

    Hi,
    Delete the roles through transports. but if you are concerning about the UMR history and end date for the roles. If so.. make sure there are no active assignments to the users.then there is no requirement for end date. in my idea generally UMR history will be there for deleted users and their assignments...as text.
    ~Praveen.

  • Deleting the SRM PO in EXtended classsis

    Hi
    Can any help in this...
    I am working in Extended classis.  one of my user deleting the PO in SRM, I am geting an error in the WF log as "The source and target structure have a different number of fields".  . 
    Please update me ASAP.  
    Thanks in Advance
    Satish

    Hi,
    Normally if the PO is ORDERED/ output generated once we can't delete
    the PO. I am not sure how the user is deleting the PO. Please check the
    transfer of PO from SRM to R/3 system using FM bbp_pd_po_transfer_exec (use the PO guid for this)
    Regards,
    Amudha R V

  • BPC Mass User Management Tool in BPC 10.0 NW-Version Component Error

    Hi,
    We have a problem when importing request K900024.RBP and R900024.RBP.
    We changed the UJ_STRING in "DATA: lv_value TYPE uj_value" in the source code as recommended at BPC Mass User Management Tool in BPC 10.0 NW
    Unfortunately, when we try to import CSV files we receive a error message "BPC Version Component must be 800". Our is 801.
    Where can I find this files or its upgrades? Is there a SAP link?
    Can anybody help us?
    Best Regards,
    Ana Teresa

    Hi Ana,
    See note https://css.wdf.sap.corp/sap/support/notes/1861347.  You should solve this issue.
    Best Regards,
    Charlie

  • Mass user address data req

    Dear All,
    How can we get mass user address data such as SAP ID,Full name,E-mail ID,Building code,Contact details in one single report or from any Table?
    Sytem is ECC 6.0
    Regards,
    Mahesh

    Hi Mahesh,
    Table is USR03      User address data
    Check below link:
    http://abaplovers.blogspot.com/2008/07/sap-userand-authorization-systemrelated.html
    Thanks
    Sunny

  • Mass revoke deletion flag for Production order

    Hi all,
    As we know, we can use program PPARCHP1 to mass set deletion flag for production order.
    now, i would like to revoke deletion flag, i had been use tcode: co02  Functions -> Deletion Flag -> Revoke to do it.
    but, i have lots of production order, is there any standard program could mass revoke deletion flag?

    Dear there is no standard functionality or transaction is available to revoke the deletion flag the only option is you have to do it manually one by one order through the option which you already mentioned.
    Cheers
    KK

Maybe you are looking for

  • OS X Server 10.4.11 freezes when misc files are being accessed

    This is an odd problem, to me at least. It seems as if I have some files that are getting corrupted, that then cause my 10.4.11 server to lock up when they're accessed. Has anyone else run into this problem before? This server is really only used for

  • Urgent help on LOB

    Guys, We did some testing on a non-partitioned tables with LOB and it all worked.. Here is the case Check for lob segments to be shrinked SQL> select table_name, segment_name  from dba_lobs where owner='STR'; TABLE_NAME                     SEGMENT_NA

  • Bring All to Front

    This appears under the "Window" menu in most applications. What does it do? Thanks, Paul

  • How do I recover missing iPhoto albums and pictures?

    A week ago, all my iPhoto Albums disappeared that normally would appear in the left iPhoto column under LIBRARY and RECENT. When I opened the iPhoto app from both the Dock and the Applications folder, an iPhoto window opens and asks if I would like t

  • How to Transactional Processes in BPEL

    Hi, TestCase: I have some BPEL processes which needs some Transaction Processes. These process can be DB process with Multiple insertion/selection/retrieval. I could see the 'scope' process activity however I would like to know that: 1) Is there any