FM to delete a user in Infotype 0105?

Hi,
I need to delete a user for an employee in IT0105 and then assign him a new user.
Is there a FM which will delete the user in IT 0105 and then a FM to create a new user for an employee in IT 0105.
Or maybe just update the table with the new user?
Any help will be appreciated.
Thansk

What about the following FM: HR_MAINTAIN_MASTERDATA?
You think i can use this to modify the field?
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
   EXPORTING
    pernr                    = lv_pernr
  MASSN                    =
    ACTIO                    = 'MOD'
  TCLAS                    = 'A'
   BEGDA                     = '19000101'
   ENDDA                     = '99991231'
  OBJPS                    =
  SEQNR                    =
  SPRPS                    =
     subty                     = '0001'
  WERKS                    =
  PERSG                    =
  PERSK                    =
  PLANS                    =
  DIALOG_MODE              = '0'
  LUW_MODE                 = '1'
  NO_EXISTENCE_CHECK       = ' '
  NO_ENQUEUE               = ' '
IMPORTING
    RETURN                   = ls_return
    RETURN1                  = ls_retunr1
    HR_RETURN                = ls_hrreturn
    TABLES
    proposed_values          = lt_values
  MODIFIED_KEYS            =

Similar Messages

  • Sap Username Infotype 0105

    Hello,
    i wrote a report to extract HR Data. I#m looking for a way to extract the information about the corrsponding SAP user which is configured in infotype 0105 (sy-name). I defined the following passage in my coding, but that's the way to extract the last user who did changes in that infotype:
    *sapUsername
    attributes_wa-attr_tab = 'EMPLOYEE'.
    attributes_wa-attr_field = 'SAPUSERNAME'.
    if p0105-uname NE ' '.
      attributes_wa-value = p0105-uname.
      append attributes_wa to attributes.
    else.
      attributes_wa-value = ' '.
      append attributes_wa to attributes.
    endif.
    What field i have to youse to extract the information about the corresponding user in infotype 0105?
    Please help!

    Hi,
    The SAP User id of the Employee is maintained in the USRID field of Infotype 0105 subty 0001.
    If you are looking for the user who changed the record, the field is UNAME.
    Regards,
    Suresh Datti

  • Integration regarding cost center between OM, Infotype 0105 and the user

    Hello,
    we are just implementing OM, where the cost center for an organizational unit is maintained. Within a OU
    exist positions to which persons are assigned.
    In the HR Master data Infotype 0105 "Communication" the system user name for this person is maintained.
    My request:
    In SU01 on "Logon data" tab is a field "Cost center". What do I need to fill it with the value from the assigned position in OM?
    Thanks in advance,
    Thomas

    The connection from user-id via IT 105 to pers nr and from there to OU and cost centre is clear.
    What I want to know is wether the field cost center in TA SU01 can be automatically populated with the corresponding value from the OU for this user. I don't want to change the value via SU01 so it is sufficient when the field in SU01 is in status ReadOnly. But as the information is in the system I want it to be automatically displayed in the User-id-context.
    Regards,
    Thomas

  • Warning on Infotype 0105

    Hi
    I am trying to switch the warning off that appears on Infotype 0105. The warning comes up if you put the same phone number for two employees. I did change the time constraint to "3" but this does not switch the warning off. What else can i do to switch this warning off?
    Thank you in advance.

    Hi
    This is SAP standard setting. Like if you want to enter the same USER ID in the subtype 0001 then system will show the error message, like wise in e-mail or telephone or in other subtypes of IT0105 system will show the information message i.e message no.: Message no. RP900
    If you want to modify this then you need the ACCESS KEY for this infotype to modify the standard codes.
    Thanks
    Sheetal Gupta

  • Infotype 0105 not updated via HRUSER

    Hi there
    I'm currently implementing ESS for SAP R/3 4.7 and running into issues running the HRUSER transaction. I can see a specific employee who has no user account setup but a personnel record in the system. When I select to setup the User ID the program successfully runs in the background but the User ID isn't created and the Personnel Record isn't updated with the Infotype 0105 record. I've ran an authority check and there aren't any failure messages so I'm struggling to see why the Infotype isn't being updated. If anyone could point me in the right direction it would be very much appreciated.
    Regards
    Nathan

    Check for the hiring dates of the personnel record. i.e. The employee record is valid on the ID creation date.

  • Infotype 0105 creates usr01 when running HRALXSYNC

    After Hiring new employee (pa48) and creating infotype 0105 the system creates user for the employee of type 'C' (communication date).
    We do not want every employee to has user in the system.
    therefor we want to prevent the automatic creating of user.
    Is there any way to prevent that process?
    best regards.
    Yotam.

    Hi Yotam,
    No, a user is needed in E-Recruiting. That's the reason why we create a random user if you don't have IT0105 filled.
    Regards,
    Nicole

  • Updating Infotype 0105 "Communication" with SAPNWRFC and PERL (long !!)

    When I read the SAP-Press Book "mySAP HR: Technical Principles and Programming"
    (actually it was the german edition "Technische Grundlagen und Programmierung")
    I came across Chapter 9.1.3 "Using BAPIs", in which some sample code is provided
    for updating the email-adress in infotype 0105 "communication".
    I just thought: "OK, that could be easily (and better !) done with PERL and SAPNWRFC".
    My PERL-script should do the following:
    1) Read subtypes 0001 and 0010 from IT 0105 via RFC
    2) Compare that data against our LDAP-Server
    3) call the approbiate BAPIs for updating IT 0105 via RFC
    OK, here's the ABAP-code which accomplishes task #1: 
    [code]
    Z_EMAIL_TAB is a customer-defined structure with 3 components:
    component      component-type
    MY_PERNR       PERNR_D
    MY_NICKN       SYSID
    MY_EMAIL       COMM_ID_LONG
    FUNCTION z_read_email.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(MY_DATE) TYPE  ENDDA OPTIONAL
    *"  TABLES
    *"      Z_EMAIL STRUCTURE  Z_EMAIL_TAB
      DATA: sql_date  TYPE begda,
            sql_mandt type mandt.
      DATA: BEGIN OF wa_ldap_out,
                     pernr TYPE pernr_d,
                     nickn TYPE sysid,
                     email TYPE comm_id_long,
            END OF wa_ldap_out.
      DATA: exc_ref    TYPE REF TO cx_sy_native_sql_error,
            error_text TYPE string.
      IF my_date IS INITIAL.
        MOVE sy-datum TO sql_date.
      ELSE.
        MOVE date TO sql_date.
      ENDIF.
    we use native SQL (Oracle), so we have to specify the mandant
    exclude-values for PERSK refer to pensionists etc
    move sy-mandt to sql_mandt.
    EXEC SQL.
      open dbcur for
          SELECT DISTINCT
                pa0001.pernr,
                pa0105_0001.usrid,
                pa0105_0010.USRID_LONG
           FROM pa0000 pa0000,
                pa0001 pa0001,
                pa0105 pa0105_0001,
                pa0105 pa0105_0010
            WHERE
                 pa0000.pernr =  pa0001.pernr and
                 pa0000.begda <= :sql_date AND
                 pa0000.endda >= :sql_date AND
                 pa0001.begda <= :sql_date AND
                 pa0001.endda >= :sql_date AND
                 pa0001.persk NOT IN ('12' ,'13' ,'17' ,'18') AND
                 pa0000.stat2 = '3' and
                 (pa0001.mandt = pa0105_0001.mandt() and pa0001.pernr = pa0105_0001.pernr() and pa0105_0001.usrty() = '0001' and pa0105_0001.begda() <= :sql_date and pa0105_0001.endda(+) >= :sql_date) and
                 (pa0001.mandt = pa0105_0010.mandt() and pa0001.pernr = pa0105_0010.pernr() and pa0105_0010.usrty() = '0010' and pa0105_0010.begda() <= :sql_date and pa0105_0010.endda(+) >= :sql_date) and
                 pa0000.mandt =  pa0001.mandt and
                 pa0000.mandt = :sql_mandt
    ENDEXEC.
    DO.
        EXEC SQL.
            FETCH NEXT dbcur into :wa_ldap_out
        ENDEXEC.
        IF sy-subrc <> 0.
            EXIT.
        ELSE.
            APPEND wa_ldap_out to z_email.
        ENDIF.
    ENDDO.
    EXEC SQL.
      close dbcur
    ENDEXEC.
    ENDFUNCTION.
    [/code]
    Using Native-SQL (we have an Oracle-Backend) saves us from looping through IT0105 twice.
    (I don't like ABAP's Open-SQL, it's too limited)
    Now we have a nice little table with all our employees pernr, userid and email-adress.
    Let's stay on the ABAP-side and have a look at the update-function (task #3):  
    [code]
    FUNCTION z_upd_smtp .
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(MY_PERNR) TYPE  PERNR_D
    *"     VALUE(MY_EMAIL) TYPE  AD_SMTPADR
    *"     VALUE(MY_DATE) TYPE  BEGDA OPTIONAL
    *"  TABLES
    *"      BAPIRETURN STRUCTURE  BAPIRETURN1
      DATA: wa_bapireturn TYPE bapireturn1.
      IF my_date IS INITIAL.
        MOVE sy-datum TO my_date.
      ENDIF.
      CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
        EXPORTING
          number        = my_pernr
          validitybegin = my_date
        IMPORTING
          return        = wa_bapireturn.
      IF wa_bapireturn-type NE 'E'.
        CLEAR wa_bapireturn.
        CALL FUNCTION 'BAPI_EMPLCOMM_CREATE'
          EXPORTING
           employeenumber        = my_pernr
           subtype               = '0010'
           validitybegin         = my_date
           validityend           = '99991231'
           communicationid       = my_email
         NOCOMMIT              =
         IMPORTING
            return                = wa_bapireturn
         EMPLOYEENUMBER        =
         SUBTYPE               =
         OBJECTID              =
         LOCKINDICATOR         =
         VALIDITYBEGIN         =
         VALIDITYEND           =
         RECORDNUMBER          =
        APPEND wa_bapireturn TO bapireturn.
        CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
          EXPORTING
            number        = my_persnr
            validitybegin = my_datum
          IMPORTING
            return        = wa_bapireturn.
        APPEND wa_bapireturn TO bapireturn.
      ELSE.
        APPEND wa_bapireturn TO bapireturn.
      ENDIF.
    ENDFUNCTION.
    [/code]
    And finally the PERL-Script (task #2):
    [code]
    ##### Connect to LDAP-server #################################################
    use Net::LDAP;
    use Net::LDAP::Control;
    use Net::LDAP::Constant qw(LDAP_CONTROL_PAGED);
    $pagec = Net::LDAP::Control->new( LDAP_CONTROL_PAGED,
                                      size => 1000);
    --- replace with your company-specific values ------------------------------ #
    $ldap = Net::LDAP->new( 'your-ldap-server' ) or die "$@";
    $mesg = $ldap->bind( 'CN=your-ldap-user,CN=aaaa,DC=bbbb,DC=dd,DC=eeeeeee,DC=fff',
                          password => 'your-password'
    use SAPNWRFC;
    --- Connection to SAP  ----------------------------------------------------- #
    SAPNW::Rfc->load_config("your-config-file");
    $sap_conn = SAPNW::Rfc->rfc_connect;
    --- SAP RFCs --------------------------------------------------------------- #
    SAP_RFCs();
    --- read all Email-adresses from IT0105 ------------------------------------ #
    $rd_handle_eml = $rd_eml->create_function_call;
    $rd_handle_eml->invoke();
    foreach $row_hashref_eml (@{$rd_handle_eml->Z_EMAIL}) {
         $MY_PERNR = $row_hashref_eml->{MY_PERNR};
         $MY_NICKN = $row_hashref_eml->;
         $MY_EMAIL = $row_hashref_eml->;
         $MY_NICKN =~ s/ //g;
         $MY_EMAIL =~ s/ //g;
         if ($MY_NICKN ne '') {
             $strMail_LDAP = nick2email(lc($MY_NICKN));
             if (lc($MY_EMAIL) ne lc($strMail_LDAP) && $strMail_LDAP ne '') {
                 updIT0105("$MY_PERNR","$strMail_LDAP");
                 print "SUCCESS = $i_uit_success, $MY_PERNR $strMail_LDAP\n";
         else {
    do some error-processing here
    $sap_conn->disconnect();
    exit;
    sub SAP_RFCs {
    --- Read E-Mail-Adress from IT0105 ----------------------------------------- #
    $rd_eml = $sap_conn->function_lookup("Z_READ_EMAIL");
    --- Update E-Mail-Adress in IT0105 ----------------------------------------- #
    $rd_uit = $sap_conn->function_lookup("Z_UPD_SMTP");
    sub nick2email {
        $strNickn = $_[0];
        $strEMail = '';
    --- our userid is stored in LDAP-item "mailnickname", just change filter to your needs #
        $filter = qq {
                      (& (mailnickname=$strNickn)
                         (givenName=*)
                         (| (objectCategory=person)
                            (objectClass=person)
        while (defined ($search = $ldap->search(
                                base   => "OU=your-base-OU,DC=bbbb,DC=dd,DC=eeeeeee,DC=fff",
                                filter => $filter,
                                attrs => ['mailNickname','mail','whenChanged'],
                                control => [ $pagec ]
            foreach $entry ($search->entries) {
                $strEMail = $entry->get_value('mail') ;
            ($resp) = $search->control( LDAP_CONTROL_PAGED );
            last unless ref $resp && $pagec->cookie($resp->cookie);
        return $strEMail;
    sub updIT0105 {
        $rd_handle_uit = $rd_uit->create_function_call;
        $rd_handle_uit->MY_PERNR($_[0]);
        $rd_handle_uit->MY_EMAIL($_[1]);
        $rd_handle_uit->invoke();
        $i_uit_success = 1;
        foreach $row_hashref_uit (@{$rd_handle_uit->BAPIRETURN}) {
            if ($row_hashref_uit->{TYPE} ne 'S' && $row_hashref_uit-> ne ' ') {
                $i_uit_success = 0;
    [/code]
    I run this script every Friday on a virtual Windows XP machine (VMWare) scheduled with the AT-Command
    and it works really fine, enjoy !!!
    P.S.: I hope there aren't any typos in the code, but please check
    P.P.S: Thanks again to Piers for SAPNWRC, fantastic.

    Hi,
    I am very interested in your solution. Can you send me the scripts?
    Greeting Jan

  • Problem in person not mapped to user in infotype

    Hi All,
           We have one scenario MM workflow here HR escalation paths defined .Here  maintained one FM get Approver for requisition.in that Determine document value,after determine WBS element,after determine responsible person/position ,after maintained position holder,after that maintained determining userID.here workflow output giving person not mapped to user in infotype 1010 but HR functinal people is saying infotype maintained.
    any one get the same problem plz help.
    regards
    Raj

    Hi Arghadip,
    Sorry previously i given wrong infotype corrct infotype is 0105.
               Here i asked HR people they are saying PERNR is maintained with User Id in Infotype 0105.
    regards
    Raj

  • User Exit - infotype 105

    Hi,
    I need a user exit that will executed when the user will update infotype 0105.
    I tried to use EXIT_SAPFP50M_002 but this function wasn't executed when updating infotype 0105
    Thanks,
    Ofir

    The User Exit was ZXPADU02..
    I had a mistake in my code.
    I have a problem with this user exit.
    The user exit export current info type record, but this record isn't returning the new e-mail address.
    If I return the e-mail address "manually" (via bapi), I see the old e-mail.
    How can I return the new e-mail address (without using a badi) ?
    Thanks you all again,
    Ofir

  • Deleted of users in automatic in SAP

    Good evening
    We are investigating as delete the users in automatic in SAP, when the user renounce or is get fired, with an automatic process that deleted this user of my system.
    Know how we could do this¿
    Now we are linked to the user and the employee, with  the infotype 105.
    There is some program and variable that check the status of employe in my system and if detected this user in payroll termination, delete the user of my system.
    atte.
    Gerardo Ceballos

    Gerardo,
    What is the logic for deleting these users right away? Typically for audit requirements you would want to keep the ID in the system but locked and date-delimited to expire as to no longer consume a SAP License. Additionally when you remove the user id from the system the table/audit logs are no longer connected to the users actions.
    I think you will also want to keep that 105 record in the system as a log on which PERNR was connected to the User ID during a certian period especially if you "recycle ids" based on naming conventions for ids *not a good practice* you will want to be able to trace which "JSMITH" did what during which period of time.....
    Thanks.
    Matt

  • How To Properly Delete a User Profile on Windows 7 in a Domain environment

    I have not been able to find an answer that matches the issue I'm facing. I had recently setup a laptop for a user and soon after, he was experiencing issues that I thought might be profile related. So, I did what always worked for me on prior versions of
    Windows without any fuss or side affects.
    Logged in under the local Administrator account, I went into: System Properties>User Profiles>Settings and removed the user profile from their. When I do that, I get an error message:
    Profile Error
    Profile not deleted completely. Error - A required privilege is not held by the client
    Ok, no problem I think. I just need to delete the user's profile directory under the users folder right? So I do this and figure when I try to log in again as the user that a new profile will be created. However, this is not what happens exactly. I login
    with the user credentials and it logs in successfully. However, I get a pop saying:
    You have been logged on with a temporary profile
    You cannot access your files and files created in this profile will be deleted when you log off. To fix this, log off and try logging on later.
    Please see the event log for details or contact your system administrator
    So my question is; why did the profile not delete completely after both deleting the user profile under System Properties and after deleting the actual profile directory? What did I miss and what is the proper method of deleting a user profile completely
    without running into these other issues?

    Hi Womprat,
    According to your description, I understand that you want to delete user profile but display an error in Windows 7.
    Please use other user (with administrator privileges) login this computer, then open Properties for Computer--->Advanced system setting--->Settings for User Profiles, then select the profile you want to delete.
    More details about Delete a user account, please refer to:
    http://windows.microsoft.com/en-us/windows7/delete-a-user-account
    Additional, please contact Windows 7 IT Pro Team so that you can get more professional suggestions. For your convenience:
    https://social.technet.microsoft.com/Forums/en-US/home?category=w7itpro&filter=alltypes&sort=lastpostdesc
    Best regards,
    Allen Wang

  • How to delete a user in SAP-CPS Version 7.0

    Hello,
    I created my users via UME ( User Management Engine of Java Application server). Unfortunately I used the wrong name convention, so I had to recreate all the users in UME. Afterwards I delete all wrong users in UME.
    Than I tried to login with my new user in SAP-CPS (users are normally created in SAP-CPS during first login) but I get the error message that I reached the maximum number of 10 users allowed in the basic version. No problem I thougt, I simply delete the wrong ones in SAP-CPS. But I do not know how to delete a user! I could not find any menu item or any describtion in the manualls how to delete an user in SAP-CPS.
    I remove the users from any Isolation group, I disabled all the users but still I could not find any way to delete them.
    Has any body a hint for mor.
    Kind regards
    Frank Morleo

    Hello Anton,
    deactivating the unused users made it possible to login with the new ones. 
    Thanks for your help.
    Now I have to find out how to clear the deactivated users from the list.
    Regards
    Frank

  • HT201240 This process does not appear to work for me.  I'm running 10.8.3.  I created a new user for a guest staying with me.  They have gone now and I am attempting to either change the password or delete the user.  It won't allow me to choose the user I

    This process does not appear to work for me.  I'm running 10.8.3.  I created a new user for a guest staying with me.  They have gone now and I am attempting to either change the password or delete the user.  It won't allow me to choose the user I created.  I am logged in as myself and it states that I am an "Admin".  The user I'm attempting to change is listed as a "standard" user and there is a white checkmark inside an orange circular background on the user pic in the list of users. 
    Can someone help me?  I am having a hard time believing that OSx will allow me to create users and allow them use of my computer and it's drives, yet it will not allow me to change the password so I can monitor what they might have been doing while logged on?  What if this were my child?  This guest left under sketchy circumstances, and I'd really like to be able to ensure they were not using my computer to do illegal things or to have illegal communications.
    Any help would be appreciated.  (It's odd that it was so simple to "create" a user and set a password for them.......but it's complicated or a little known process to reverse.
    Thanks.

    Here are two screen shots to show you what I am seeing.  The first screen shot shows it allowing me to select (highlighted in blue) my admin user (which is what I am locced in as).  The second screen shot shows it allowing me to select the "Guest" user (highlighted in blue).  However when I click on the user "Orion" nothing happens.  It will not change to highlight that user.

  • Trying to delete two user accounts on my mac book air, it has been deleting them for two days and I am un able to turn my computer off, what should i do?

    How do I go about either stopping a delteing user account that is in action, or How do I reboot my computer? I am stuck not sure what to do! I am in the process of deleting two user accounts but I am stuck and can't turn my computer off reboot, or reverse it. Anyone have any ideas for me?

    Press and hold the power button for a few seconds until the power shuts off, then release, wait a few more seconds, and press it again briefly to restart.

  • How do I create a new user, move my old files etc over, and delete old user

    This is why I think I need to.
    My computer got hit by lightening, and I may have created a new user account through netinfo rather than system preferences /accounts/+user. Mail used to open twice, but no longer. Now, Safari askes me for my keychain password twice, Spotlight can't find a folder on the computer when the search is restricted to folder and computer, though the folder is there and easyfind finds it, and when System Preferences/Spotlight/Privacy has the hard drive icon added, then deleted, Spotlight still does not find anything. (Yes, everything is backed up, on CD, DVD, and online.) Microsoft Tec Support says
    "Here is a summary of the key points of the case for your records.
    When you contacted us on August 8, you had requested assistance with Microsoft Office 2004, as your installation of the updates was unable to find the correct version of the software to update. After creating a New MAC User, we identified the issue to be with a corrupt MAC User account, and not a Microsoft issue. "
    I believe Microsoft. So, creating a new user was easy.
    But copying files uses up too much hard drive (movies, music), and may miss keychains, preferences, mail, address book, and documents. Since Spotlight no longer works, who knows what is happening. (Yes, I've repaired persmissions, and disk repair. No change). I'm using up my hard drive trying to move files to the new user. If I share files, or put them into a public folder, then delete the old user, will I still have the old user's files in the new user's account? It is not clear to me what I should be trying to do in order to create a new user, move my old files etc over, and delete old user. Thanks.
    My responses will be slow, because I have to drive to town to use the internet. I've ordered a new airport which may take care of that problem. SO be patient.

    Hey -
    I need to do the EXACT same thing, but have no idea how. Has anyone out there done this?
    My situation is a tad different..this is a new Mac (and I'm a brand new Mac user). Tons of querks occur under my original account (videos won't run, Safari won't support certain plug-ins). I spent 6 hours on the phone w/ 4 different Apple Reps and nobody could fix it. A rep finally looked at my MacBook Pro in person today. He created a new account just to see if that would work and under that new account, everything works perfectly fine (no querks, can view video). He tried switching a million settings in my original account to no avail.
    He said to create a new account (as he did) and move my files over to the new account and then go back to the original and delete it. How do you do this?! I can't figure it out! I've got a new account created, but of course it just has the default folders in it w/ the little red icons next to them! Thanks in advance!

Maybe you are looking for