Skip to Content
avatar image
Former Member

SAP table for Deleted Users

Hi,

Can someone Pl tell us the SAP table name that stores Deleted Users Records.

Our requirement is we need to display a list of Deleted User in last 3 months. But I am not able to identify deleted users in USR02 table.

Pl advise

Thanks

Hardik

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Dec 07, 2009 at 12:47 PM

    Hi Hardik,

    The tables are USR02, USR04, UST10S

    Also If you know the actual user-id you will find the persnumber in ADR7 (fields ADR7-UNAME and ADR7-PERSNUMBER): look it up via ADR7-UNAME.

    With that persnumber you should be able to find the real name of that user-id in table ADRP (field ADRP-PERSNUMBER and e.g. ADRP-NAME_TEXT).

    Regards

    Abhii

    Edited by: Abhii on Dec 7, 2009 1:48 PM

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Hardik,

      I find that a deleted user does not exist in USR02, but it will exist in USH02.

      Also check the t-code S_BCE_68001439(program RSUSR100), there are change docs created for users which are deleted. Debug the code & find out how the program behaves 😉

      Added:

      I just check the code in the program RSUSR100, you can check the field USH04-PROFS. For deleted users you will get the line with USH04-PROFS = 'D'.

      @Abhii: I think USH04 is for Change History for Auth. How does it tell the user is deleted?

      BR,

      Suhas

  • avatar image
    Former Member
    Dec 07, 2009 at 01:30 PM

    Hi Hardik,

    Try with USH02 & USH04 as I suggested earlier, you will find an answer. Also if you need to know any user ID locked or not use RSUSR200.

    Rehards

    Abhii

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 06, 2010 at 01:54 PM

    Hi Hardik,

    Dieter Gröhn has already given you the report which will help you to find out the list of users deleted.

    Use the different selection to generate the list as you want.

    Execute RSUSR100

    1. In the selection screen select the start date and end date.

    2. Selection cretarion for Changed Authorizations - Select only "Deleted Users"

    3. Selection cretarion for Changed Header Data - Deselect all.

    This will give you the list of users those were deleted in the period mentioned.

    Thanks Dieter Gröhn.

    Regards,

    Anuj Nigam

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 07, 2009 at 01:20 PM

    Hello

    USH04. If user was deleted - USH04-PROFS = 'D'

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 06, 2010 at 01:58 PM

    Check the table USH04 where PROFS = 'D'

    check this copied code

    FORM CHECK_FOR_DELETED_USER. 
    * When a user is deleted, a record is written to ush04, with nrpro = 1 
    * and the first byte of profs = 'D'.  If the same user is then created, 
    * another record is written, with a different nrpro value and with 
    * profs = 'C'.  This form captures all these records and positions us 
    * at the most recent one so we can check for a 'D'. 
      CLEAR ITAB4. 
      REFRESH ITAB4. 
      SELECT * FROM USH04 
        WHERE BNAME EQ ITAB1-BNAME 
          AND MODDA LE ITAB1-MODDA 
          AND MODDA GE ITAB2-MODDA. 
    * Check that record is prior to current change. 
        IF USH04-MODDA EQ ITAB1-MODDA. 
          CHECK USH04-MODTI LT ITAB1-MODTI. 
        ENDIF. 
    * Check that record is later than any previous change.  (This is needed 
    * because simple changes to a user, such as a password change, do not 
    * result in a record written to ush04.) 
        IF USH04-MODDA EQ ITAB2-MODDA. 
          CHECK USH04-MODTI GT ITAB2-MODTI. 
        ENDIF. 
        MOVE: USH04-BNAME    TO ITAB4-BNAME, 
              USH04-MODDA    TO ITAB4-MODDA, 
              USH04-MODTI    TO ITAB4-MODTI, 
              USH04-NRPRO    TO ITAB4-NRPRO, 
              USH04-PROFS(1) TO ITAB4-PROFS. 
        APPEND ITAB4. 
      ENDSELECT. 
    
    

    Edited by: Keshav.T on Jan 6, 2010 7:34 PM

    Add comment
    10|10000 characters needed characters exceeded