Error in HR_INFOTYPE_OPERATION

Hai All,
I have a requirement in which I have to save some information to infotype 0102 programmatically. I tried using the function module  HR_INFOTYPE_OPERATION, but I got an error: <b>A complex application error has occurred</b> - Error (PG <i><b>428</b></i>). Could anyone please let me know what the problem might be.
I used the samething in the same manner for other Infotypes like 0002, 0006 etc and it is working fine. So, is this some problem with the Infotype???
Thanks,
Jubish

Hai Federico,
I checked that but the user should be locked by the program to Save the Entries right??? I checked the Transaction SM12 and only when I run this particular program, the Pernr will be locked.
I lock the Pernr using the FM: <i><b>BAPI_EMPLOYEE_ENQUEUE</b></i> just before calling FM: <b>HR_INFOTYPE_OPERATION</b>. I take the return from the Enqueue FM and only if it is initial, i am calling HR_Infotype_Operation. After HR_Infotype_Operation, I use FM: <i><b>BAPI_EMPLOYEE_DEQUEUE</b></i> also to unlock the Pernr.
But even then, the same error is thrown.

Similar Messages

  • Error in 'HR_INFOTYPE_OPERATION' function module.

    Hi experts i am using 'HR_INFOTYPE_OPERATION'  this function module in my program . This is the parameters i passed to it.
    call function 'HR_INFOTYPE_OPERATION'
          exporting
               infty         = '0585'
               number        = number
               lockindicator = space
               validityend   = pendda
               validitybegin = pbegda
               record        = p0585
               operation     = p_oper
               tclas         = 'A'
                dialog        = '2'
          importing
               return        = wa_return
               key           = wa_key.
    But when i run this program it gives dump as shown below.
      An exception occurred that is explained in detail below.
      The exception, which is assigned to class 'CX_SY_ASSIGN_CAST_ILLEGAL_CAST'
       not caught in
      procedure "HR_INFOTYPE_OPERATION" "(FUNCTION)", nor was it propagated by a
       RAISING clause.
      Since the caller of the procedure could not have anticipated that the
      exception would occur, the current program is terminated.
      The reason for the exception is:
      The error occurred at a statement of the form
        ASSIGN f TO <fs> CASTING.
        ASSIGN f TO <fs> CASTING TYPE t.
      or
        ASSIGN f TO <fs> CASTING LIKE f1.
      or
        at table statements with the addition
        ASSIGNING <fs> CASTING.
      The following error causes are possible:
      1. The type of field f or the target type determined by <fs>, t or f1
      contains data references, object references, strings or internal tables
      as components.
      These components must match exactly as far as their position (offset)
      and their type are concerned.
      2. The specified type t or the type of f1 are not suited for the type of
       the field symbol <fs>.
      3. The row type of the related table is not suited for the target type  specified by <fs> according to the rules described in 1).
    So please help me its urgent and send me the correct solution of this problem
    Thanks in advance.

    Hi
    check if variable p0585 is a row. The variable can't be a table.
    JS

  • Runtime error in activation BADI (CX_HRPA_INVALID_PARAMETER)

    In activation BADI i get a runtime error using 'HR_INFOTYPE_OPERATION'
    An exception occurred that is explained in detail below.                       
    The exception, which is assigned to class 'CX_HRPA_INVALID_PARAMETER', was not 
      caught in                                                                     
    procedure "RESOLVE_EXCEPTION" "(FORM)", nor was it propagated by a RAISING     
      clause.                                                                       
    Since the caller of the procedure could not have anticipated that the          
    exception would occur, the current program is terminated.                      
    The reason for the exception is:                                               
    Ongeldige parameter EXCEPTION waarde                                                                               
    The occurrence of the exception is closely related to the occurrence of        
    a previous exception "CX_HRPA_VIOLATED_PRECONDITION", which was raised in the  
      program "CL_HRPA_MASTERDATA_FACTORY====CP",                                   
    specifically in line 6 of the (include) program                                
      "CL_HRPA_MASTERDATA_FACTORY====CM004".                                        
    The cause of the exception was:                                                                               
    Niet aan voorwaarde voldaan                                                    
      DATA: personaldatakey   TYPE bapipakey.
      DATA: return            TYPE bapireturn1.
      DATA: l_p0025           TYPE p0025.
      DATA: l_citem           TYPE t71adm09-citem.
      DATA: l_resultaat(2)    TYPE n.
    l_p0025-pernr = p0759-pernr.
    Begindatum is begindatum binnengekomen IT0759 record - 1 jaar
        CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
          EXPORTING
            date      = p0759-begda
            days      = 0
            months    = 0
            signum    = '-'
            years     = 1
          IMPORTING
            calc_date = l_p0025-begda.
    Einddatum is 31 december van het jaar binnegkomen IT0759
        CONCATENATE: p0759-endda(04) '1231'  INTO l_p0025-endda.
        l_p0025-infty = '0025'.
        IF p0759-cpamt >= 100.
    *GENERATE ERROR
        ELSE.
          l_resultaat = p0759-cpamt.
         IF l_resultaat < 10.
           CONCATENATE '0' l_resultaat INTO l_p0025-krt01.
         ELSE.
         l_p0025-krt01 = l_resultaat.
         ENDIF.
    write data
          CLEAR: return, personaldatakey.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              infty         = '0025'
              number        = l_p0025-pernr
              validityend   = l_p0025-endda
              validitybegin = l_p0025-begda
              record        = l_p0025
              operation     = 'INS'
              nocommit      = ''
              tclas         = 'A'
            IMPORTING
              return        = return
              key           = personaldatakey
            EXCEPTIONS
              OTHERS        = 0.
          IF NOT return-number IS INITIAL.
    GENERATE ERROR
          ELSE.
            is_ok = 'X'.
            process_standard = 'X'.
          ENDIF.

    Hello Richard
    The exception is raised in method SET_FRAMEWORK of class CL_HRPA_MASTERDATA_FACTORY. Perhaps the SAP note mentioned in the coding (on ECC 6.0) may be useful:
    METHOD set_framework.
      IF a_is_initialized = true.
    *   This indicates some complex problem which often can be easily
    *   fixed. For details see NOTE 493984 (2003).
        RAISE EXCEPTION TYPE cx_hrpa_violated_precondition.  " line 6
      ELSE.
        CALL METHOD delayed_constructor
          EXPORTING
            read_infotype     = read_infotype
            masterdata_buffer = masterdata_buffer
            additional_buffer = additional_buffer
            legacy_mode       = legacy_mode.
      ENDIF.
    ENDMETHOD.
    Regards
      Uwe

  • ALE Message type HRMD_A Infotype 0001 is incorrect using PROOF flag = X

    Hi
    We have an issue using HRMD_A for Infotype 0001 with the PROOF flag swithed on. Using the PROOF flag triggers a call of HR_MAINTAIN_MASTERDATA instead of a direct write to db tables. However sometimes the update of Infotype 1 is incomplete and records are lost. The data goes through a transformation in the inbound BAdi, here I have checked the sequence is still correct. But when the data is written to Infotype 1 it seems to overwrite the last entries.
    If anyone has any experience with this, I would be very interested for any input.
    Thanks in advance
    Sonny

    Hi Sandip
    Thx for your response. If I understand you correctly you suggest I use the HR_INFOTYPE_OPERATION. This could be an alternative, but I would prefer to understand the reason behind the error.
    HR_INFOTYPE_OPERATION actually calls HR_MAINTAIN_MASTERDATA, so this FM might not solve the issue, but it does give the option for updating one record at a time.
    Sonny

  • Runtime error while updating entries of infotype usin HR_INFOTYPE_OPERATION

    Hi,
    I uploading entries of customized infotype using HR_INFOTYPE_OPERATION function module.
    It is giving me run-time error as,
    ShrtText
        An exception that could not be caught occurred.
    What happened?
        The exception 'CX_HRPA_VIOLATED_PRECONDITION' was raised but was not caught at
         any stage in the
        call hierarchy.
        Since exceptions represent error situations, and since the system could
        not react adequately to this error, the current program,
         'CL_HRPA_INFOTYPE_FACTORY======CP', had to
        be terminated.

    Hi,
    Refer to this link..Re: CX_HRPA_VIOLATED_PRECONDITION using HR_INFOTYPE_OPERATION to insert rec

  • Error coming while modifying data in infotype through HR_INFOTYPE_OPERATION

    I have created a report which reads a excel file fom the system and then upload data in infotype 0077 through HR_INFOTYPE_OPERATION. In this report first I check if the record exists in IT0077 for a particular employee , if not then creates a new record with the input file data and if the records exists then I need to modify that record.
    But the problem is that on updation the function module HR_INFOTYPE_OPERATION always return an error that "Infotype doesnot exist", although its exists in the system.
    Why this error comes when once I excuted the report with a pernr number for creation and then I execute with teh same data to modify it, it gives an error in modification.

    iam not sure
    When we create we have to use INS in the code and when we modify we have to use Operation  MOD
    Since Dilek  our Techinical consultant  is there hope your issue is solved

  • Error message in function module HR_INFOTYPE_OPERATION

    Hi experts,
                I need to update the data in the table pa0762 . I am using the function moudle HR_INFOTYPE_OPERATION to do that. i am passing infty,number,SUBTYPE,OBJECTID,validityend,validitybegin , the data to be inserted in wa_0762 this is of type p0762
              When i execute the function i am getting a error message in return as 'Fill in all required entry fields'.
    Can anyone provide help about this Topic . I would be really greatful to any help .
    Thanks in advance

    It seems that the time constraint defined for the custom infotype requires the existence without gaps.
    change time constraint or create the infotype with ENDDA = 99991231

  • Error in executing 'HR_INFOTYPE_OPERATION' from webdynpro application

    Hi Experts,
    I am using FM 'HR_INFOTYPE_OPERATION' for infotype PA0034 operations. I have written below code in assistant class.
    when i execute the class method and pass the parameters this FM executing fine and creates record into pa0034. But when i execute the webdynpro application it is giving error "Invalid parameter EXCEPTION , value ".  Please Help me in solving this issue
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        INFTY                  = '0034'
        NUMBER                 = lv_pernr
        SUBTYPE                =  ls_p0034-subty
        OBJECTID               = ''
        LOCKINDICATOR          = ''
        VALIDITYEND            = ls_p0034-endda
        VALIDITYBEGIN          = ls_p0034-begda
      RECORDNUMBER           =
        RECORD                 = ls_p0034
        OPERATION              = 'INS'
        TCLAS                  = ' '
       DIALOG_MODE            = '0'
      NOCOMMIT               =
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
    IMPORTING
       RETURN                 = ls_return
      KEY                    =
    Thanks
    Vijay

    Hi Vijay,
    So you are passing the values from the screen. So you must have binded the screen fields with the attributes, just make sure that they are of the same type as the importing parameters of the FM
    Regards
    Arjun

  • Hr_infotype_operation errors when called within a user exit

    Hi there.
    I am doing an enhancement in userexit PBAS0001 for CE using the enhancement framework.Whenever I am trying to change the payroll area in IT0001 by PA30 it has to give a message saying that 'all the assignments will change to new payroll areas do you want to continue?'if i say yes then the payroll areas for all the assignments should be chnaged to the current payroll area which I am trying to change.So after the pop up I am looping at all the assignments and calling the function module hr_infotype_operation.It gives an error Complex Application error.I debugged and saw that when it calls the function module the user exit gets triggered again and goes to the starting within the function call and hits the function module again and keep going like this.I checked the structure and all the parameters.looks fine below is the code where I am using the function module.I am trying to update IT0001 when somebody tries to change the IT0001(is that an issue??) i tried by submitting a program by calling the function module in the program.Didnt work too.Is there any way we can do it by BDC??
    Check if the payroll areas are equal
        IF ls_i0001-abkrs NE new_p0001-abkrs.
    If the payroll areas are not equal then generate a message pop-up with 'YES' and 'NO' buttons
          CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
              titlebar       = 'Warning'
              text_question  = 'Payroll Area specified is different with other assignments.Do you want to move all the other assignments to the same payroll area?'
              text_button_1  = 'Yes'
              icon_button_1  = ' '
              text_button_2  = 'No'
              icon_button_2  = ' '
              default_button = '1'
              start_column   = 25
              start_row      = 6
            IMPORTING
              answer         = lv_case
            EXCEPTIONS
              text_not_found = 1
              OTHERS         = 2.
          CASE lv_case.
            WHEN '2'.                                 "For 'NO' button
              LEAVE TO SCREEN '2010'.
            WHEN 'A'.                                 "For 'CANCEL' button
              LEAVE TO SCREEN '2010'.
            WHEN '1'.                                 "For 'YES' button
    Second Pop-up confirm
              CALL FUNCTION 'POPUP_TO_CONFIRM'
                EXPORTING
                  titlebar              = 'Warning'
                  text_question         = 'System will update all other assignments to the new payroll area'
                  text_button_1         = 'Yes'
                  icon_button_1         = ' '
                  text_button_2         = 'No'
                  icon_button_2         = ' '
                  default_button        = '1'
                  display_cancel_button = 'X'
                  start_column          = 25
                  start_row             = 6
                IMPORTING
                  answer                = lv_case1
                EXCEPTIONS
                  text_not_found        = 1
                  OTHERS                = 2.
              CASE  lv_case1.
                WHEN '2'.                             "For 'NO' button
                  LEAVE TO SCREEN '2010'.
                WHEN 'A'.                             "For 'CANCEL' button
                  LEAVE TO SCREEN '2010'.
                WHEN '1'.                             "For 'YES' button
    For all the assignments read the infotype 0001 and update the payroll area
                  LOOP AT lt_pernr INTO ls_pernr.
                    CLEAR:lt_i0001,ls_i0001.
                    REFRESH lt_i0001.
                    CALL FUNCTION 'HR_READ_INFOTYPE'
                      EXPORTING
                        tclas           = 'A'
                        pernr           = ls_pernr
                        infty           = '0001'
                        begda           = new_p0001-begda
                        endda           = new_p0001-endda
                        bypass_buffer   = 'X'
                      IMPORTING
                        subrc           = lv_subrc
                      TABLES
                        infty_tab       = lt_i0001
                      EXCEPTIONS
                        infty_not_found = 1
                        OTHERS          = 2.
                    SORT lt_i0001 BY endda DESCENDING.
                    READ TABLE lt_i0001 INTO ls_i0001 INDEX 1.
                    ls_i0001-abkrs = new_p0001-abkrs.
                   lv_record = ls_i0001.
    Lock the employee
                      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
                        EXPORTING
                          number = ls_i0001-pernr
                        IMPORTING
                          return = lv_return.
                      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
                        EXPORTING
                          infty         = '0001'
                          number        = ls_i0001-pernr
                          validityend   = '12302006'
                          validitybegin = '12012006'
                          record        = ls_i0001
                          operation     = 'INS'
                         IMPORTING
                          return        = return.
    *unlock the employee
                      CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
                        EXPORTING
                          number = ls_i0001-pernr
                        IMPORTING
                          return = lv_return.
                   SUBMIT zhr_infotype_operation_py_area USING SELECTION-SCREEN '1000'
                   WITH p_infty  = '0001'
                   WITH p_pernr  = ls_i0001-pernr
                   WITH p_endda  = new_p0001-endda
                   WITH p_begda  = new_p0001-begda
                   WITH p_record = lv_record
                   WITH p_opera  = 'INS'
                   WITH p_tclas  = 'A'
                   AND RETURN.
                  ENDLOOP.
              ENDCASE.
          ENDCASE.
    ENDIF.

    maybe a little late, but I had found this message today (searching for different problem) but maybe the date for HR_infotype_operation might do a little problem, cause you are filling it with: DDMMYYYY but it should be YYYYMMDD so it just translate it that this is really far in the past so that might be a problem. Try sy-datum instead and for the end of validity try '99991231' dont worry, when you will update the same infotype again, the FM will end the previous infotype to previous day and the new one will get validity from sy-datum till the end ....

  • HR_INFOTYPE_OPERATION 0008 Error

    hi guys,
    i am using HR_INFOTYPE_OPERATION FM to upload data at infotype 0008 (basic pay).
    i get a short dump error with the following message:
    Error analysis
        You cannot call a COMMIT WORK in a FORM not executed by the variants
        PERFORM ... ON COMMIT or PERFORM ... ON ROLLBACK until the commit of the
         calling program.
    i did the nocommit = 'X' parameter for the FM, then COMMIT WORK later at the program.
    dump still appears.
    if i remove that parameter, and the COMMIT WORK as well, i still get the same dump.
    if i assign nocommit = space or remove it at all, no dump happens, but IT0008 is not updated as well.
    i tried my same code with other infotypes, with nocommit = 'X' and COMMIT WORK later in the program.
    it works fine. no dumps.
    it seems that i only get the dump at infotype 0008.
    any ideas what is happening?
    anyone had the same problem at infotype 0008?

    Hi,
    R u adopting the parameters in the following way.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
             INFTY            = '0008'
             NUMBER           = OLD_P0008-PERNR
             SUBTYPE          = OLD_P0008-SUBTY
             OBJECTID         = OLD_P0008-OBJPS
             LOCKINDICATOR    = OLD_P0008-SPRPS
             VALIDITYEND      = OLD_P0008-ENDDA
             VALIDITYBEGIN    = OLD_P0008-BEGDA
    VALIDITYEND      = I0573-endda*
      VALIDITYBEGIN    = I0573-begda*
             RECORDNUMBER     = OLD_P0008-SEQNR
             RECORD           = I0008
             OPERATION        = OPERN
             TCLAS            = 'A'
             DIALOG_MODE      = DIALOG_MODE
      NOCOMMIT         =*
    VIEW_IDENTIFIER  =*
    SECONDARY_RECORD =                             IMPORTING*
            RETURN           = BAPISUBRC
            KEY              = INFTY_KEY.                                                    
    Thanks
    Pavan

  • HR_INFOTYPE_OPERATION - unknown error

    Hi,
    I’m updating a custom infotype using HR_INFOTYPE_OPERATION. The function module returns with error <b>“A complex application error has occurred”.</b>  (Message class EPG, msg no: 428A). All key fields are specified correctly. This call is made from a custom RFC. I debugged  HR_INFOTYPE_OPERATION and I found that the error actually occurs somewhere within function module HR_MAINTAIN_MASTERDATA, although I'm not sure exactly where and why.
    I couldn’t find errors with the infotype as I’ve modified a record via PA30 successfully. I’ve also created a recording which I ran in the background, also without any errors. This call is made from a custom RFC so I don’t think it has anything to do with LUW’s as mentioned in one of the other forums.
    The customer infotype has a table control and I'm not sure if this might be causing the problem.
    Here's the call to the FM:
    DATA : wa_pa9002     type p9002,
                 lt_9002          like it_9002 occurs 0,
                 ls_9002          like  p9002,
                 ld_returno      type bapireturn1,
                 msybrc          like sy-subrc.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = '9002'
          number        = ls_9002-pernr
          subtype       = ls_9002-subty
          objectid      = ls_9002-objps
          validityend   = ls_9002-endda
          validitybegin = ls_9002-begda
          recordnumber  = ls_9002-seqnr
          record        = ls_9002
          operation     = 'MOD'
          dialog_mode   = '0'
          NOCOMMIT    = 'X'
        IMPORTING
          return        = ld_returno.
    Before the call I first check if the specific record exists (and it does) and then the employee number is locked.
    Any ideas on what might be causing this error? Also, what is the purpose of parameter SECONDARY_RECORD?
    I would really appreciate your help.
    Regards
    LM

    Hi,
    R u adopting the parameters in the following way.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
             INFTY            = '0008'
             NUMBER           = OLD_P0008-PERNR
             SUBTYPE          = OLD_P0008-SUBTY
             OBJECTID         = OLD_P0008-OBJPS
             LOCKINDICATOR    = OLD_P0008-SPRPS
             VALIDITYEND      = OLD_P0008-ENDDA
             VALIDITYBEGIN    = OLD_P0008-BEGDA
    VALIDITYEND      = I0573-endda*
      VALIDITYBEGIN    = I0573-begda*
             RECORDNUMBER     = OLD_P0008-SEQNR
             RECORD           = I0008
             OPERATION        = OPERN
             TCLAS            = 'A'
             DIALOG_MODE      = DIALOG_MODE
      NOCOMMIT         =*
    VIEW_IDENTIFIER  =*
    SECONDARY_RECORD =                             IMPORTING*
            RETURN           = BAPISUBRC
            KEY              = INFTY_KEY.                                                    
    Thanks
    Pavan

  • Hr_infotype_operation error

    i am testing hr_infotype_operation  FM
    for some reason it dumps with the message:
    COMMIT_IN_PERFORM_ON_COMMIT
    Error analysis
        You cannot call a COMMIT WORK in a FORM not executed by the variants
        PERFORM ... ON COMMIT or PERFORM ... ON ROLLBACK until the commit of the
         calling program.
    my code:
    REPORT  z_test_hrinfotyop_el.
    *Data
    DATA : p0008 LIKE p0008.
    DATA : return LIKE bapireturn1.
    DATA : key LIKE bapipakey.
    DATA : returne LIKE bapireturn1 .
    *Values
    p0008-pernr = '00004272'.
    p0008-begda = '20080101'.
    p0008-endda = '99991231'.
    p0008-trfar = '01'.
    p0008-trfgb = '04'.
    p0008-trfgr = 'GG2'.
    p0008-ancur = 'MYR'.
    p0008-lga01 = '1000'.
    p0008-bet01 = '5000'.
    PERFORM save_record.
    *&      Form  save_record
          text
    -->  p1        text
    <--  p2        text
    FORM save_record .
    *Enqueue
      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = p0008-pernr
        IMPORTING
          return = returne.
    *Update
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = '0008'
          number        = p0008-pernr
         subtype       = p0008-subty
         objectid      = p0008-objps
         lockindicator = p0008-sprps
          validityend   = p0008-endda
          validitybegin = p0008-begda
         recordnumber  = p0008-seqnr
          record        = p0008
          operation     = 'INS'
         tclas         = 'A'
         dialog_mode   = '0'
          nocommit      = 'X'
        IMPORTING
          return        = return
          key           = key.
      IF return IS NOT INITIAL.
        WRITE :/ 'Error Occurred'.
      ELSE.
        COMMIT WORK.
      ENDIF.
    *Dequeue
      CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
        EXPORTING
          number = p0008-pernr.
    ENDFORM.                    " save_record

    Hi,
    Remove the else part completely and try to give the commit work statement after the perform statement.
    If return is not initial.
    write:/ Error Occured.
    Endform.
    *perform XXXXXXX .
    commit work.*

  • HR_INFOTYPE_OPERATION-- Complex Application Error

    Hi:
    I am using the FM "HR_INFOTYPE_OPERATION" for uploading data from flat file to IT0008 infotype.It's giving some error "A complex application error has occurred".I have checked SAP note 710779 but it does not help very much because we are already in the release and the correction is already there.Anybody with any idea is highly appriciated.Award points confirmed.
    ~Sinchan

    try putting DIALOG_MODE = '2' and execute the program.. you cn check if the values get passed to the function module ocrrectly..
    ~Suresh

  • How to display errors while using HR_INFOTYPE_OPERATION

    Dear Freinds,
                    Iam using the Function module to upload data for infotype 0008 and custom infotype 9003, using the function module HR_INFOTYPE_OPERATION.
    The data is getting upload , but while uploading i want to trace the following problems the errors  , like while iam  uploading data for a particular personnel ,  if that particular personnel no is already being  opened in PA30 by the user
    then the FM should through me an error ,  like " the personnel no is being already opened" .
    Iam not able to get this error could you please let me know how the functional module will return me those type of errors.
    Regards
    Srinivas.

    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
                  EXPORTING
                    infty         = v_infot
                    number        = wa_innnn-pernr
                    subtype       = wa_innnn-subty
                    objectid      = wa_innnn-objps
                    lockindicator = wa_innnn-sprps
                    validityend   = wa_innnn-endda
                    validitybegin = wa_innnn-begda
                    recordnumber  = wa_innnn-seqnr
                    record        = wa_innnn
                    operation     = 'DEL'
                    nocommit      = ' '
                    tclas         = 'A'
                  IMPORTING
                    return        = v_return
                  EXCEPTIONS
                    OTHERS        = 0.
                IF v_return-type EQ 'E'.
                  wa_err-pernr =   wa_innnn-pernr.
                  wa_err-begda =   wa_innnn-begda.
                  wa_err-endda =   wa_innnn-endda.
                  wa_err-esmg  =  v_return-message.
                  APPEND wa_err TO t_err.
                  CLEAR wa_err.
                ENDIF.

  • Error While using HR_INFOTYPE_OPERATION to delete records

    Hi All
    I was able to find simlar error in SDN but it did not work for me. I am using HR_INFOTYPE_OPERATION  to delete PA2006 records and update with new values. I get the following error message "No data stored for 2006 in the selected period". But The records exist. I debugged and found it fails for authorization checks. I have all the authorizations as I am able to delete it using PA30.
    FYI inserting works fine.
    Please advice.
    Thanks, Raj

    Hi Santosh
    I used the same code which you have send. Below is the one. FYI, throught my debug, I was able to figure out it fails in authorization, even though I have all authorization and I was able to delete using PA30. Please advice.
    Below is teh code that I used.
        CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
          EXPORTING
            number       = t_file1-pernr
          IMPORTING
            return       = t_return
            locking_user = sy-uname.
          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              = 'MOD'
              DIALOG_MODE            = '1'
              NOCOMMIT               = 'X'
             IMPORTING
             RETURN                 = t_return
             KEY                    = personaldatakey.
      "Unlock the employee
          CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
            EXPORTING
              number = t_file-pernr
            IMPORTING
              return = t_return.
    Thanks, Raj

Maybe you are looking for