So, I had this dump "insert duprec" in SU01 when copying a user to an ID that had (at one point in time) existed, but was eventually deleted. Recreating the user is no longer possible since we have some major incosistencies on table ESDUS (personalization).
I opened a call at SAP

They pointed me to note note 1597172.... which itself points to note 197012 which delivers a correction report that mostly doesn't work, because:
- Code: Select all
SELECT * FROM esdus INTO TABLE lt_data
WHERE uname IN so_uname
AND ( action LIKE 'MEPO%' "#EC *
OR action LIKE 'MIGO%' "#EC *
OR action LIKE 'MEOUT%' "#EC *
OR action LIKE 'PurchaseOrder' "#EC *
OR action LIKE 'PurchaseRequisition' "#EC *
OR action LIKE 'OutlineAgreent' ). "#EC *
that's what's coded, but you probably have entries in ESDUS with action AC03, MIRO, ME23N. ML81N ... just to name a few. So after several days of ping-pong with SAP they gave me another report. It covers all the possible actions, only NOW you can run it for just one user at a time.
Needless to say, I have 439 users that no longer exist in the system but still have personalization data in ESDUS.
Here's the coding of the report they don't give to you freely - working on one user at a time:
- Code: Select all
*&---------------------------------------------------------------------*
*& Report ZDELESDUS
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zzdelesdus_modified.
*--------------------------------------------------------------------*
* define types
*--------------------------------------------------------------------*
TYPE-POOLS icon.
TYPES:
type_v_icon TYPE c LENGTH 40,
type_t_data TYPE SORTED TABLE OF esdus WITH NON-UNIQUE KEY uname action.
TYPES:
BEGIN OF type_s_outtab,
icon TYPE type_v_icon,
uname TYPE esdus-uname,
action TYPE esdus-action,
element TYPE esdus-element,
active TYPE esdus-active,
END OF type_s_outtab.
TYPES:
type_t_outtab TYPE STANDARD TABLE OF type_s_outtab WITH DEFAULT KEY.
*--------------------------------------------------*
* define data objects
*--------------------------------------------------*
DATA: lv_green TYPE type_v_icon,
lv_red TYPE type_v_icon,
lv_info TYPE icont-quickinfo,
ls_outtab TYPE type_s_outtab,
lt_data TYPE type_t_data,
lt_outtab TYPE type_t_outtab,
lo_alv TYPE REF TO cl_salv_table,
lo_sort TYPE REF TO cl_salv_sorts,
lo_functions TYPE REF TO cl_salv_functions_list,
lo_columns TYPE REF TO cl_salv_columns,
lo_alv_top TYPE REF TO cl_salv_form_layout_grid.
FIELD-SYMBOLS:
<ls_data> TYPE esdus.
*--------------------------------------------------*
* define screen elements
*--------------------------------------------------*
SELECT-OPTIONS:
so_uname FOR sy-uname OBLIGATORY.
PARAMETERS:
p_test AS CHECKBOX DEFAULT 'X'.
START-OF-SELECTION.
* pre-conditions
IF so_uname IS INITIAL.
RETURN.
ENDIF.
* create icons
lv_info = 'Update successful'. "#EC *
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_green_light
info = lv_info
IMPORTING
result = lv_green
EXCEPTIONS
icon_not_found = 0
outputfield_too_short = 0
OTHERS = 0.
lv_info = 'Update failed'. "#EC *
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_red_light
info = lv_info
IMPORTING
result = lv_red
EXCEPTIONS
icon_not_found = 0
outputfield_too_short = 0
OTHERS = 0.
*--------------------------------------------------*
* data base fetch
*--------------------------------------------------*
SELECT * FROM esdus INTO TABLE lt_data
WHERE uname IN so_uname.
*
IF lines( lt_data ) GE 1.
* prepare data for display
LOOP AT lt_data ASSIGNING <ls_data>.
MOVE-CORRESPONDING <ls_data> TO ls_outtab.
ls_outtab-icon = lv_green.
INSERT ls_outtab INTO TABLE lt_outtab.
ENDLOOP.
ELSE.
ls_outtab-icon = lv_red.
ls_outtab-uname = sy-uname.
INSERT ls_outtab INTO TABLE lt_outtab.
ENDIF.
IF p_test IS INITIAL.
DELETE esdus FROM TABLE lt_data.
COMMIT WORK.
ENDIF.
cl_salv_table=>factory( IMPORTING r_salv_table = lo_alv
CHANGING t_table = lt_outtab ).
lo_functions = lo_alv->get_functions( ).
lo_functions->set_default( abap_false ).
lo_columns = lo_alv->get_columns( ).
lo_columns->set_optimize( abap_true ).
lo_sort = lo_alv->get_sorts( ).
lo_sort->add_sort( 'UNAME' ). "#EC *
lo_sort->add_sort( 'ACTION' ). "#EC *
CREATE OBJECT lo_alv_top
EXPORTING
columns = 2.
IF p_test EQ abap_false.
lo_alv_top->create_header_information(
row = 1
column = 1
text = 'Production Run' "#EC *
tooltip = 'Run with Commit Work' ). "#EC *
ENDIF.
* output result
lo_alv->set_top_of_list( lo_alv_top ).
So, my lovelies - can one of the abapers please modify this thing for me, so I will be able to delete all entries in ESDUS for all the 439 users in my system in one go?
Thank you a lot in advance.