Mass user Uploader
Dear All
I am trying to create multiple users using Mass user Uploader but i dont know the format conversion from excel sheet so that i can place it into notepad and then upload it in portal.Please guide me .
Waitng for your reply.
Hi
Upload data from an Excel file
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/009696a7-7d33-2a10-8e94-ff15c5d37544
Creating An Import File For UME From Excel
thanks,
Tulasi Palnati
Similar Messages
-
Mass user upload through LSMW and ECATT
Hi Experts,
How to upload mass users using LSMW and ECATT. How to use these tcodes and can some one tell me how role mapping is done with these tcodes. I havent't used these before and please giveme the procedure or steps if some one has got.
Your answer is much appreciated.
Thanks in Advance.
SandhyaThanks for pointing us there! A very usefull document.
Having said that, I think it is a pity the blog's writer gave a step by step tutorial without explaining what the steps mean. Once you really understand how to automate stuff with ECATT and know its limitations you can get rid of a lot of repititive jobs.
Julius, this looks like one for the sticky thread. -
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.'
-
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 -
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 TeresaHi Ana,
See note https://css.wdf.sap.corp/sap/support/notes/1861347. You should solve this issue.
Best Regards,
Charlie -
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,
MaheshHi Mahesh,
Table is USR03 User address data
Check below link:
http://abaplovers.blogspot.com/2008/07/sap-userand-authorization-systemrelated.html
Thanks
Sunny -
Hi All,
Hope you all are doing fine.
I have to do master data upload for my next project. I have gone through LSMW, DX-WB, Recording etc. and now I am quite comfortable with all of these.
As i have tested these tools for maximum 8-10 records, I am interested in hearing from you all, your experiences regarding actual data upload where volume is high and data may be difficult to verify manualy. Particularly I am interested in how to make upload faster,Error free,consistent(No record being posted twice etc.)
Your inputs would be higlhly appreciated.
Thanks a lot for patient reading.
Bye and Regards.Hi navdeep,
the mass data upload depending on tht data u want to upload, there ara several function module to upload data like create reservation or upload long text inspection method tell me what the data u want to upload
Best Regard
Waleed Sadat -
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 MBharat-
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. -
Delete mass photo upload task?
Hello everybody,
I have tried to use the mass photo upload iview in the portal (com.sap.netweaver.coll.demo.UserPhotoAdministrationMassUpload) to upload some photos. Unfortunately I entered an invalid path for the parameter "upload folder". This resulted in a photo upload task that is still running. I have tried to restart the portal, but the task stays active. Does anyone know how to delete this task?
Best regards,
ArdilesHi Ardiles,
We also have the probleme. This problem is statet as an Customer message to SAP-OSS.(Message No. 0020079747 0000068749 2006)
Answer from SAP:
the problem is fixed with Sps 16.
Sorry for any inconveniences this bug might cause.
Regards,
Alfons Riedlsperger -
How to create mass users and map them to existing hrms users
Hi,
Im running oracle ebusiness suite 12i . I want to create mass users , and map them to existing hrms users.
The users I want to create exist in an excel spreadsheet with the columns employee id, user name. They will all be granted the same responsibility. I want to map them to existing hrms users using the employee id key.
I have read about the package FND_USER_PKG.CREATEUSER and I can loop over it by using sql loader to create a temporary table, but I m lost on how to automatically map them to hrms users as part of the script.
Any help.
dulaThanks a lot Omka,
I managed to create the users by running the script:
declare
Cursor C1 is
select d.product_code,b.responsibility_key from FND_USER_RESP_GROUPS_ALL a,fnd_responsibility b,fnd_user c,fnd_application d
where a.user_id = c.user_id
and a.responsibility_id = b.responsibility_id
and b.application_id = d.application_id
and c.user_name ='JOCHIENG';
Cursor employee is
SELECT EMPLOYEE_ID,EMPLOYEE_NAME from eldoret_final;
BEGIN
for e in employee loop
fnd_user_pkg.createuser
x_user_name => e.EMPLOYEE_NAME
*,x_owner => ''*
*,x_unencrypted_password => 'welcome123'*
*,x_start_date => SYSDATE - 10*
*,x_end_date => NULL*
*,x_description => 'CBK Employee'*
*,X_EMPLOYEE_ID => e.EMPLOYEE_ID*
fnd_user_pkg.addresp(upper (e.EMPLOYEE_NAME),'PER', 'CBK_EMPLOYEE_DIRECT_ACCESS','STANDARD', 'DESCRIPTION', sysdate, null);
end loop;
commit;
end;
I had first created the user JOCHIENG and assigned it the responsibility for Self service. So the script just assigns the responsibilities by copying from the one assgined to this user.
Everything seems ok. However, when trying to log in as the new user, the login error: Login failed. Please verify your login information or contact the system administrator.
is returned. But I can reset the password using the forms under Security > Define. Even with the correct password, the login doesn't go through.
Any idea?
dula -
Hi All,
when using the Mass role upload from SAP backend systems, i expect that all roles will be uploaded to the final stage in the role methodology inthe ERM and that they will be already generated.
After all, those roles already exists in the systems.
well, i see that this is not the case and i have to go through the different stages with every role.
is this indeed the system behavior or did we do somthing wrong ?
thanksHi
We did as you suggested but configured the approval stage in the methodology since the role is already approved and is in ECC PROD.
Now we encountered a situation where we need to update the role in ERM as part of continuos maintainance (after upload) but we don't have the authorization option to enter and change it but only the "save" and "change history" push buttons.
We changed bach the methodology to the relevant one with all the stages but still we can't maintain the uploaded role. the change in the methodology did not effect the role already uploaded.
Do you have any suggestions regarding how we can fix this issue?
Thank you -
My iPhoto library is in Shared Folders so both users can access and edit the pictures. However, if one users uploads new photos, for some reason these become only available to him and the other user cannot even view them.
All permissions have been set so that both users have them on the shared folders. For some reason, when creating a folder, the permissions are not kept....
Please help.The same thing has started happening to us since upgrading to iPhoto 11 and Lion. If I import photos from my camera, then my partner can see thumbnails of those photo, but cannot click them to see them sull size. Similarly if my partner imports photos.
We have used a shared iPhoto library stored in Users/Shared/Photos for several years and everything has been fine until now.
I am backing up now and will then check and repair the library permissions. I'll post back the results. -
Mass Data upload in SAP from 3rd party system
Hi Experts.
Can anyone help me how to do mass data upload in SAP. Actually, when any new joining is done, a form is being filled by employee(joining form), and that data is finally updated in SAP manually using various infotypes. Now, i m planning to make that form available in webpage. The employee will go to the webpage, fill the data , also the HR will fill the required fields, and once the form is complete, the data will get updated in SAP, in resp. infotypes. Like personal details in infotye 2, address in infotype 6, bank details in 9 and so on, in a single shot. Is there any BAPI or something like that, using which this can be achieved.
Thnx
S KumarYou can try BAPI_BANK_CREATE for IT0009, BAPI_ADDRESSEMP_CREATE for IT0006 and BAPI_PERSDATA_CREATE for IT0002. Otherwise, you can also use FM HR_MAINTAIN_MASTERDATA to create any infotype.
Have a look also at the Life and Work Events functionality in SAP Portal (http://help.sap.com/erp2005_ehp_04/helpdata/EN/f6/263359f8c14ef98384ae7a2becd156/frameset.htm) -
User Uploaded Image won't display on Mac OSX
I am experiencing something very strange with user uploaded
images on Mac OSX, latest Debug Flash Player 9, Safari and Firefox
2. Everything works fine on Windows (XP and Vista) on all major
browsers.
A user selects a local image to upload. The file gets
uploaded to server, resampled, saved to a public location, and a
response is sent back to the Flash Player in the form of a JSON
object. The response contains the URL to the uploaded image on the
server. The Flash Player downloads the image and adds the Loader to
a sprite that is already on the stage. All appropriate events are
fired. The progress events show that the image is downloading, and
the complete and init events are both fired. Using the Charles Web
debugging Proxy I can verify that everything is working correctly
(upload and download), and no security violations are occuring.
Charles even shows the actual image that gets downloaded. However,
on Mac, the image doesn't display (stays blank, as if it's an empty
sprite), whereas on PC/Windows the image displays fine.
I have placed a crossdomain file in the appropriate location
- even though it is never requested as I don't try to do anything
with the image's bitmap data.
Unfortunately, I haven't had a chance to create a new project
to test this out in, but will do as soon as I can, and post a link.
Any ideas?
Many thanks,
Shaun.We had a similar problem, maybe it is related to this (it was
done in as2, but the real problem was outside flash)
flash took an enormous time to display thumbs for a gallery
of images.. and directly in ff on osx, the thumb (about 100x100 px)
would load only half way.. and again wait for about half a minute
or more.. and then display. In flash the thumb would remain blank
until the loading was over.. that is for about half a minute or
more.
What this turned out to be, was that the php script on the
server somehow returned header information that the image had the
dimensions of the full-sized image. So after all the data for the
thumb downloaded, the client (browser or flash) would just wait
until a predefined timeout..
Since you are resizing uploaded images I thought this could
be one of the possible reasons, maybe the flash player for osx and
for windows handle such "missing data" cases differently. -
Hi All,
Employee Mass Photo upload:
Is there any functional way for doing same like Tcode: OAAD/ We dont need any technical team to involve in this photo load
Please let me know any thread related to this.
Appreciating immediate response
SDHello,
to mass upload the employee photos please use the program included in note 685520.
Hope this help
Sarah
Maybe you are looking for
-
How to create an new column from ordered pairs
Hi, Wondering if anyone can help this problem. I am analyzing network traffic between a PC and a Server. I can easily get a count of packets in each direction, PC1 to Server1 and the return path, Server 1 to PC1. But want I really want is a count of
-
In CS6, every time I need to preflight, edit, export images from Acrobat Pro I have to try and build a new toolset. The little icons that appear at the top are generally meaningless, as I don't use this every day. Is there a way to make it behave mor
-
Differences between == and .equals
I'm rather new to Java programming and have learned that == can only be used to compare primitive types in Java (for example when comparing to int) and when comparing objects, one should use the .equals-method (that should be overloaded from the one
-
i have a 64 bit windows 7 and i have itunes 11 on it . itunes doesn't work as properly as one on 32 bit windows 7 .
-
Drop one datafile from Tablespace
Hi, I have 9i Database on Linux. I want to drop one datafile from tablespace. I have tried to drop datafile through following command but it gave no effect. alter database datafile <datafile name> offline drop; What should i have to do for dropping d