DELETE infotype 0000  using HR_MAINTAIN_MASTERDATA or HR_INFOTYPE_OPERATION

Please kindly help ,
how to delete infotype using HR_MAINTAIN_MASTERDATA or HR_INFOTYPE_OPERATION?
i did try to use HR_INFOTYPE_OPERATION but return code shown as :
"No data stored for 0003 in the selected period"
but when i try using HR_MAINTAIN_MASTERDATA.
Return code was zero, and infotype 0000 still exist.
regards,
Rudy.

Here you go Rudy
Loopt at the your internal table. Lock the user, post or delete the record, unlock the user.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
      EXPORTING
        number       = t_file-pernr
      IMPORTING
        return       = t_return
        locking_user = w_uname.
    IF t_return-number IS NOT INITIAL.
      t_return-message_v1 = t_file-pernr.
      APPEND t_return.
      g_fail = g_fail + 1.
      g_flag = 'X'.
    ELSE.
      CLEAR: t_return, personaldatakey.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            infty         = '2006'
            number        = t_file1-pernr
            subtype       = t_file1-subty
            validityend   = t_file1-endda
            validitybegin = t_file1-begda
            record        = p2006
            operation     = 'DEL'
            dialog_mode   = '1'
            nocommit      = ' '
          IMPORTING
            return        = t_return
            key           = personaldatakey.
      IF t_return-number IS NOT INITIAL.
        t_return-message_v1 = t_file-pernr.
        APPEND t_return.
        g_fail = g_fail + 1.
        g_flag = 'X'.
      ELSE.
        MOVE-CORRESPONDING t_file TO t_file1.
        APPEND t_file1.
        g_success = g_success + 1.
      ENDIF.
      "Unlock the employee
      CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
        EXPORTING
          number = t_file-pernr
        IMPORTING
          return = t_return.
Please award points if useful.
Thanks, Raj

Similar Messages

  • Delete InfoType records using Idoc HRMD_A05?

    Hello,
    We have some unwanted 167 and 168 infotype records in our database that we would like to clean up.  Can we use HRMD_A05 to delete them?  I can't seem to find a delete function in the Idoc fields...I would truthfully like to use the LSMW, anyone know a way other than a simple recording?
    Thanks.
    --Jack

    Hi Eswar
    Thanks for the reply. I could not get what PFAL is. Actually, I am using IDocs to migrate data through LSMW. And I want the new HR objects to be numbered internally. However, if I leave the object ID field null and use 'Insert' for operation (OPERA) it gives error and does not post the application document (IDoc). It also gives error for operation 'Update'.
    I was expecting it would generate new numbers but it did not. And what I had in the IDoc documentation does not work.
    So do you or anybody has experienced such an issue before?
    Thanks

  • Infotype 0000 Creation using HCM Processes and forms in MSS

    Hi,
    I need to create an Action for Transfer an employee using HCM Processes and Forms. So, my form should update infotype 0000, 0001, 0008 etc.
    But when I provide create operation for infotype 0000, system is throwing short dump. When I change the operation to change nothing was creating in infotype 0000 for that respective employee. Is there any way to update infotype 0000 using HCM Processes and forms. Please help me here.
    Thanks & Regards,
    Nayani.

    Hi Chris,
    Thanks for your reply mate.
    I understand that for IT0000 update we don't have to configure it explicitly.We just assign values to MASSG and MASSN and IT0000 should update. I am doing exactly that.
    For the "condition" we do have multiple rules for that and I am familiar about the trickthat the rule fields must be part of the SAP_PA service which is actually making the update. That's all in place and that's working fine.
    Now coming to the problem -
    The "action" is "Return from Career Break" where the only PA infotype that has to be updated is IT0000. Besides that we are updating Absences,IT2001.
    I have tested the process thoroughly and it seems that the system does not allow an IT0000 update without any other PA data change. To test this, I added a PA infotype update in my config and at that time IT0000 got updated beautifully. But when I am trying to update only IT0000, it fails.
    To solve the issue, I had a discussion with my team and we have decided to copy IT0001 along with IT0000. So as of now, we have sorted out a workaround but the technical issue is something I would like to look into.
    If you figure out anything then please let me know.
    Appreciate your help.
    Thanks,
    Saikat

  • HR_INFOTYPE_OPERATION insert infotype 0000

    I am using HR_INFOTYPE_OPERATION to insert a new infotype 0000 record. However, if there's any future record exist, my program should not overwrite future record but delimit my current record. How can I achieve this? I tried to pass in HR_INFOTYPE_OPERATION with a new 0000 record with end date not 31.12.9999 but system return an error.

    Hi Ajay,
    When you use BDC or FM to update infotype, you can not call dynamic action as it wont be supported by SAP.
    So if you wnat to meet your requirement you have to create one RFC FM inside which you can call from the user exit or after your code had executed the FM operation and got the success message you can call the same FM for updating other infotypes.
    The best approach can be to create BDC sessions for updating each infotype after you have done with update of IT0000.
    Hope this will help you in resolving your queries.
    Regards,
    guds

  • Deletion HR - Infotype records using BAPI

    Hi experts,
    I sucessfully added infotype crecords in HR-ABAP using function module HR_INFOTYPE_OPERATION.   For deleting the same record using the same function module (operation = 'DEL'), i got error message as <b>009No data stored for 0008 in the selected period</b>.  What is the problem...?
    Can any one pls solve it.
    <b><REMOVED BY MODERATOR></b>
    Thank u.
    Regards,
    Murugan Arumugam
    Message was edited by:
            Alvaro Tejada Galindo

    HI Murugan,
            Following is the sample code for deletion of a record using the FM...'HR_INFOTYPE_OPERATION'
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
           EXPORTING
               INFTY            = '4002'
               NUMBER           = RECORD_4002-PERNR
               SUBTYPE          = RECORD_4002-SUBTY
               OBJECTID         = RECORD_4002-OBJPS
               LOCKINDICATOR    = RECORD_4002-SPRPS
               VALIDITYEND      = WENDDA
               VALIDITYBEGIN    = WBEGDA
               RECORDNUMBER     = RECORD_4002-SEQNR
               RECORD           = RECORD_4002
               OPERATION        = 'DEL'
               TCLAS            = 'B'
               DIALOG_MODE      = '0'
          IMPORTING
               RETURN           = RETLIST.
    Regards,
    Ranganathan.

  • Error while modifying HR infotype PA0105 using HR_INFOTYPE_OPERATION

    Hello All,
    I am not able to modifying the infotype PA0105.
    Currently I am using the FM HR_INFOTYPE_OPERATION.
    But I am not able to modify the record.
    Has anyone faced any such situation...
    Please help..!!
    Useful pointers will be appreciated...
    Thanks & Regards,
    Tarun Gambhir

    Hope this helps you out...
          C_INS   LIKE PSPAR-ACTIO VALUE 'INS',
          W_000-PERNR = T_SAIDA-PERNR.
          W_000-INFTY = C_0000.
          W_000-ENDDA = C_DATA.
          W_000-BEGDA = T_PA0000-BEGDA.
          W_000-AEDTM = SY-DATUM.
          W_000-UNAME = SY-UNAME.
          W_000-MASSN = C_16.
          W_000-MASSG = S_MASSG-LOW.
          W_000-STAT1 = SPACE.
          W_000-STAT2 = C_3.
          W_000-STAT3 = C_1.
          W_PSPAR-PERNR = T_SAIDA-PERNR.
          W_PSPAR-INFTY = C_0000.
          W_PSPAR-PLANS = T_P0001-PLANS.
          W_PSPAR-WERKS = T_P0001-WERKS.
          W_PSPAR-PERSG = T_P0001-PERSG.
          W_PSPAR-PERSK = T_P0001-PERSK.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY            = C_0000
              NUMBER           = T_SAIDA-PERNR
              LOCKINDICATOR    = SPACE
              VALIDITYEND      = C_DATA
              VALIDITYBEGIN    = V_BASE
              RECORD           = W_000
              OPERATION        = C_INS
              SECONDARY_RECORD = W_PSPAR
            IMPORTING
              RETURN           = T_RET_FUNC                     "#EC *
              KEY              = T_KEY.                         "#EC *
    Greetings,
    Blag.

  • Updating infotype 0041 using HR_INFOTYPE_OPERATION?

    Hi All:
    How do we update the dates in infotype 0041 using HR_INFOTYPE_OPERATION? lets say we have 6 dates populated in 41  and we another employee has 9 dates populated. We are reading these records and need to update the dates for all the employee records.
    Thanks
    Venkata

    Hi Venkata,
    What you can do is use the HR_INFOTYPE_OPERATION in Change or MOD(Modify) mode i.e.
    pass 'MOD' in operation parameter.
    Your recordnumber parameter should have the sequence number from infotype record you are updating (field SEQNR). All other parameters should be as it is had been for INS or insert operation.
    Regards.

  • Not modfying ithe infotype while using FM HR_INFOTYPE_OPERATION

    Hi Experts,
    When i am using this FM HR_INFOTYPE_OPERATION its not modifying the infotype 14.Can you please suggest me. Please see my below code. Can please let me know if i am wrong..
    form INSERT_DATA_0014 .
        loop at pa_0014.
    CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
       EXPORTING
         number        = pa_0014-pernr
      IMPORTING
        RETURN        = it_return.
    IF it_return-id EQ 'E'.
      WRITE: / v_pernr, 'Enqueue failed'.
      else.
        write: 'successfully locked'.
        ENDIF.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        infty                  = '0014'
        number                 = pa_0014-pernr
      SUBTYPE                = pa_0014-SUBTY
    OBJECTID               = pa_0014-OBJPS
      LOCKINDICATOR          = pa_0014-SPRPS
       VALIDITYEND            = pa_0014-begda
       VALIDITYBEGIN          = pa_0014-endda
      RECORDNUMBER           = pa_0014-SEQNR
        record                 = pa_0014
        operation              = 'MOD'
    TCLAS                  = 'A'
       DIALOG_MODE            = '0'
       NOCOMMIT               = ''
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
    IMPORTING
       RETURN                 = l_bapireturn
       KEY                    = bapipakey_tab
    IF l_bapireturn-id NE space.
      WRITE: / v_pernr, 'error'.
      ELSE.
        WRITE: /'SUCCESSFULLY INSERTED'.
      ENDIF.
    CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
      EXPORTING
        number        = v_pernr
    IMPORTING
       RETURN        = l_bapireturn
    IF l_bapireturn-id NE space.
       WRITE: / v_pernr, 'Enqueue failed'.
       else.
         write: /'record successfully modified'.
        ENDIF.
    endloop.
    endform.    
    Thanks,
    Munna.

    Hi,
    Check the entire return internal table I_BAPIRETURN of FM HR_INFOTYPE_OPERATION what it has got to say ( a error message will be there which will tell where is the problem ). If it is initial then check the table PA0014 if the record has been modified. If its still not modified then check if at all it can be manually by PA30. If it doesnt get modified even manually then this is some configuration related issue.
    Regards.

  • Duplicate entries in Infotype 0000 :- Delete problem

    Hi,
    There is a scenario where duplicate entries have been entered by mistake in infotype 0000 for a same action XE with same dates.
    If I am trying to delete one of them it's giving me an error "Action XE that changed the status was found . Data
    Inconsistency".
    Please let me know how can I delete one of them manually.
    I can do it through a program by direct table delete but don't want to do that.
    Thanks
    Umang

    don't know if this would work.. but you can give it a try.. ensure nobodyelse is in PA30.. change the time constraint for 0000.. delete the unwanted record & change the Time Constraint back..
    Regards,
    Suresh Datti

  • Resignation / Reliving deletion log data in actions infotype 0000

    Dear all,
    When we delete resignation/relieving entry in Pa30 in actions infotype 0000 no log is maintained.
    where i can see the deletion log please help.
    Regards,
    Gaurav sood

    You have set the indicator in Table:  T529A. for the field U0000 for the leaving action.
    If you set the indicator U0000, the personnel action type is stored in the Actions infotype (0000).

  • Check with HR_MAINTAIN_MASTERDATA and HR_INFOTYPE_OPERATION

    Hello,
    I have two questions about these FMs :
    1) Is it possible to use 'CHK' action with the FM HR_MAINTAIN_MASTERDATA ?
    2) When I use the FM HR_INFOTYPE_OPERATION with action CHK no record is created, but after that, with action INS, the infotype record is created twice even if I use the instruction ROLLBACK WORK.
    How to clear the memory after the CHK action?
    Best regards,
    K.

    Hi Karim,
    <li>I believe that ACTION is the parameter which is being passed to HR_MAINTAIN_MASTERDATA and
    HR_INFOTYPE_OPERATION  function modules. IF you go and see referenced field domain values you will see  the following, But I can't see CHK value in the domain.
    COP     Copy
    DEL     Delete
    DIS     Display
    EDQ     Lock/unlock
    INS     Create
    LIS9     Delimit
    MOD     Change
    INSS     Create for Actions is not converted to Change
    Thanks
    Venkat.O

  • Could i use 'HR_MAINTAIN_MASTERDATA' to create new employee ?

    Dears
    it seems using PA40 to create new employee.
    i just want to create simple person with infotype 0000, but when i using 'HR_MAINTAIN_MASTERDATA' it will automitically jump into new screen of new infotype such as 0001 without push saving button the same as i use PA40.
    How could i control the screen sequence ?

    Hi,
    You cannot create  Employees using this FM HR_MAINTAIN_MASTERDATA. This FM can be used to maintain infotypes AFTER an employee/applicant has been created in SAP(pa40).
    i think there are no FMs to create Employees. There are FM's to create,update,delete,delimit etc other infotypes but IT0000(actions) Need to be performed either using PA40 or thru other mass data entry precedures like LSMW etc. where Recording of a transaction is performed.
    and coming to the jumping of screens u mentioned, it is initiated by Infogroups, where the sequence of infotypes to be maintained while performing an action are defined.
    you can remove the infotypes you dont want to maintain by identifying the infogroup and deleting it from there.
    also for this FM 'HR_MAINTAIN_MASTERDATA' the important import parameter itself is PERNR? how are u using this FM to create an employee?
    any special reason why u wanna use a Function module to create an employee?
    Message was edited by:
            Hruser

  • Not able to un lock the pernr after using HR_MAINTAIN_MASTERDATA

    Hi,
    We using HR_MAINTAIN_MASTERDATA to create new employee.its working fine, we need to create A008 relation then we try to unlock the employee id using HR_EMPLOYEE_DEQUEUE not able to unlock.Ii tried all the other Function modules used for unlock the employee ,but no luck, any one has faced same issue, please let me any thing can done to unlock the employee.
    Thanks
    Gopal

    HI,
    Got to t-code :SM12  give the your user name  and click on list (icon).
    Select all the enteries and click on delete..
    For Master DATa.
    Go to  pa30 -select  Infotype -0003  and click on change  and Remove the Tick mark for the filed PERS.NO.Locked
    All the best.

  • How to use HR_MAINTAIN_MASTERDATA to terminate an employee

    Greetings experts:
    I'm working on an inbound interface that, among other things, can terminate an employee.  I'm new to ABAP and so it was recommended to me early on to record PA40 for this action.  That seemed to be working great until they added a new action and the index position recorded by SHDB no longer was accurate.  I tried reproducing the list in PA40 using some queries but that didn't work either.
    So now I've been asked to use HR_MAINTAIN_MASTERDATA.  I understand the basics of how this FM works but I'm not sure how to relate what the recording was doing to this function module.  The recording touched 3 infotypes:  0000, 0001 and 0378.  Some of the fields were defaulted on the screen so I didn't need to provide them in the BDC code, i.e., "PSPAR-WERKS", etc. Now that I'm having to "manually" setup these infotypes I don't know what values I can omit and which absolutely must provide. 
    Can I use the code from the recording as a guide?  In other words, if I didn't record a field because it was being defaulted will it also be defaulted if I use HR_MAINTAIN_MASTERDATA?
    Many thanks and Merry Christmas to all.

    Yes, Steve, HR_MAINTAIN_MASTERDATA is basically a FM that reproduces PA40. I use this FM for all the interfaces that require measures and besides some bug or two, the FM works perfectly, be it for the hiring or firing measures. Like PA40, when you fill the MASSN field, the FM will go through every infotype that is specified in that infogroup and will fill each infotype with the default values unless you pass them in the PROPOSED_VALUES table. For the values to pass, it's pretty simple as well, all you need is the name of the field (in the PA structure and not the screen name like in Batch Input) and the value you want to pass. Here is a sample code for you ...
    Also, you can even use the parameter DIALOG_MODE to make the input visible so you can see if some strange error occurs, you can see exactly what it is, just use DIALOG_MODE = '2' for visible.
      data: return type bapiret1.
      data: w_pernr type p0001-pernr,
            w_pnalt type p0032-pnalt,
            w_begda type p0001-begda,
            w_massg type p0000-massg,
            w_retcode type sy-subrc,
            w_dial  type c.
      clear : w_massg.
      w_massg = '01'.
      if NOT P_MASSG IS INITIAL.
        w_massg = p_massg.
      endif.
      LOOP AT P_TAB.
        clear : wa_proposed_values, proposed_values, t_output.
        free proposed_values.
    * Caso o motivo não venha do ecran de seleccao entao fica 01
    * Preencher os dados para cada infotipo usando a tabela "proposed_values"
    *** Dados Infotipo 0000
        wa_proposed_values-infty = '0000'.
        wa_proposed_values-fname = 'P0000-MASSG'.
        wa_proposed_values-fval  = w_massg.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0000'.
        wa_proposed_values-fname = 'PSPAR-PERSG'.
        wa_proposed_values-fval = P_TAB-PERSG.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0000'.
        wa_proposed_values-fname = 'PSPAR-PERSK'.
        wa_proposed_values-fval = P_TAB-PERSK.
        append wa_proposed_values to proposed_values.
    *** Dados Infotipo 0016
        wa_proposed_values-infty = '0016'.
        wa_proposed_values-fname = 'P0016-CTTYP'.
        wa_proposed_values-fval = P_TAB-CTTYP.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0016'.
        wa_proposed_values-fname = 'P0016-CTBEG'.
        wa_proposed_values-fval = P_TAB-CTBEG.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0016'.
        wa_proposed_values-fname = 'P0016-CTEDT'.
        wa_proposed_values-fval = P_TAB-CTEDT.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0016'.
        wa_proposed_values-fname = 'P0016-PRBZT'.
        wa_proposed_values-fval = P_TAB-PRBZT.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0016'.
        wa_proposed_values-fname = 'P0016-PRBEH'.
        wa_proposed_values-fval = P_TAB-PRBEH.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0016'.
        wa_proposed_values-fname = 'P0016-EINDT'.
        wa_proposed_values-fval = P_TAB-EINDT.
        append wa_proposed_values to proposed_values.
    *** Dados Infotipo 0001
        wa_proposed_values-infty = '0001'.
        wa_proposed_values-fname = 'P0001-BTRTL'.
        wa_proposed_values-fval = P_TAB-BTRTL.
        append wa_proposed_values to proposed_values.
    *    wa_proposed_values-infty = '0001'.
    *    wa_proposed_values-fname = 'P0001-PERSG'.
    *    wa_proposed_values-fval = P_TAB-PERSG.
    *    append wa_proposed_values to proposed_values.
    *    wa_proposed_values-infty = '0001'.
    *    wa_proposed_values-fname = 'P0001-PERSK'.
    *    wa_proposed_values-fval = P_TAB-PERSK.
    *    append wa_proposed_values to proposed_values.
    *** Dados Infotipo 0002
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0002-ANRED'.
        wa_proposed_values-fval = P_TAB-ANRED.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0002-CNAME'.
        wa_proposed_values-fval = P_TAB-CNAME.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0002-VORNA'.
        wa_proposed_values-fval = P_TAB-VORNA.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0002-NACHN'.
        wa_proposed_values-fval = P_TAB-NACHN.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0002-GBDAT'.
        wa_proposed_values-fval = P_TAB-GBDAT.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0002-GBLND'.
        wa_proposed_values-fval = P_TAB-GBLND.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0002-GBORT'.
        wa_proposed_values-fval = P_TAB-GBORT.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0336-COUBI'.
        wa_proposed_values-fval = P_TAB-COUBI.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0336-PARBI'.
        wa_proposed_values-fval = P_TAB-PARBI.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0002-GESCH'.
        wa_proposed_values-fval = P_TAB-GESCH.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0002-NATIO'.
        wa_proposed_values-fval = P_TAB-NATIO.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0002-FAMST'.
        wa_proposed_values-fval = P_TAB-FAMST.
        append wa_proposed_values to proposed_values.
        wa_proposed_values-infty = '0002'.
        wa_proposed_values-fname = 'P0002-ANZKD'.
        wa_proposed_values-fval = P_TAB-ANZKD.
        append wa_proposed_values to proposed_values.
    *** Função HR_MAINTAIN_MASTERDATA
    * Perform PA40 via Maintain_masterdata
        clear w_dial.
        if p_modo = 'X'.
          w_dial = '2'.
        endif.
        call function 'HR_MAINTAIN_MASTERDATA'
          EXPORTING
            massn           = 'CD'
    *        massg           = w_massg
            actio           = 'INS'
            begda           = P_TAB-EINDA
            werks           = P_TAB-WERKS
            plans           = P_TAB-PLANS
            dialog_mode     = w_dial
          IMPORTING
            return1         = return
          TABLES
            proposed_values = proposed_values.
        if not return is initial.
          CONCATENATE return-message_v1 return-message_v2 into t_output-mensagem.
        else.
          t_output-mensagem = 'Medida E1 criada com sucesso'.
        endif.
      ENDLOOP.
    Edited by: Pedro Guarita on Dec 22, 2008 5:10 PM

  • Updating action type field in infotype 0000.

    Hi experts,
    I have to update the action type(MASSN)field and reason for action(MASSG)field in infotype 0000 for the existing record. I am trying to use function module HR_INFOTYPE_OPERATION to update it,but i am not able to update the action type field.Below is the code.Can anybody please give me a solution for this.
    DATA:ls_p0000 type p0000.
    DATA : RETURN like BAPIRETURN1.
    DATA : KEY like BAPIPAKEY.
    DATA : RETURNE like BAPIRETURN1 .
    DATA :NOCOMMIT like BAPI_STAND-NO_COMMIT.
    PARAMETERS:is_pernr type pernr.
    ls_P0000-SUBTY = 'IG'.
    ls_P0000-PERNR = IS_pernr.
    ls_P0000-BEGDA = '20100101'.
    ls_P0000-ENDDA = '99991231'.
    ls_P0000-MASSN = 'IG'.        "action type
    ls_P0000-MASSG = '01'  .      "reason for action
    CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
    EXPORTING
    NUMBER = IS_PERNR
    IMPORTING
    RETURN = RETURNE.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
    INFTY = '0000'
    NUMBER = ls_P0000-PERNR
    SUBTYPE =   ls_P0000-SUBTY
    OBJECTID = ls_P0000-OBJPS
    LOCKINDICATOR = ls_P0000-SPRPS
    VALIDITYEND = ls_P0000-ENDDA
    VALIDITYBEGIN = ls_P0000-BEGDA
    RECORDNUMBER = ls_P0000-SEQNR
    RECORD = ls_P0000
    OPERATION = 'INS'
    TCLAS = 'A'
    DIALOG_MODE = '0'
    NOCOMMIT = NOCOMMIT
    IMPORTING
    RETURN = RETURN
    KEY = KEY.
    CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
    EXPORTING
    NUMBER = IS_PERNR
    Thanks in advance.

    operation "INS" is for insertion,check the FM documentation for value to be passed to operation parameter for change.
    I think its "MOD"
    Edited by: abapuser on Sep 15, 2010 2:02 PM

Maybe you are looking for

  • NB200-125 General Hardware ( Screen and HD ) issues

    Hi All, My wife's NB200-125 is about 18 months old and has in the last few weeks be exhibiting some strange problems. It started out with a boot failier where windows XP failed to boot, having tried to boot in both normal mode and safe mode a few tim

  • Firefox wont open at all, help ?

    When I try to open Firefox it does not work, I have important bookmarks on Firefox and i can not access any part of it. Why is this happening ?

  • Latest version of firefox is sluggish opening new tab

    This has been an ongoing problem on last several updates and definitely intermittent ,but seems worse in last two updates.Mostly when opening new site locations.

  • Troubled iTunes

    When I burn some cds the numbering gets messed up. I don't know how to fix this problem. Sincerely, Troubled iTunes

  • SOAP service quality sporadic

    (cross-posting to reach a broader audience) http://forums.bea.com/bea/thread.jspa?threadID=400000749 I have a proxy service inside ALSB 2.5 deployed as a web service, and periodically synchronous requests to the web service return blank messages. No