Using FM HR_INFOTYPE_OPERATION to update infotype 0001.

We're using FM HR_INFOTYPE_OPERATION to update the infotype 0001 (Organisation). We basically have the Cost center field grayed out on the entry screen so can not update it via BDC, which the cirrent method that we use to create new employees, based on data passed in from a third party system. When then attempt to update the employee record (using Copy) and the FM mentioned.
We first get the details of the infotype using FM HR_INFOTYPE_GETDETAIL, and this work perfectly, returning all the information required. We the update the structure returned by the RECORD parameter and then use the FM HR_INFOTYPE_OPERATION, like so:
    call function 'HR_INFOTYPE_OPERATION'      
      exporting                                
         infty         =  '0001'               
         number        =  gs_p0001-pernr  
         SUBTYPE       =                       
         OBJECTID      =                       
         lockindicator = 'X'                   
         validityend   = '99991231'            
         validitybegin = gs_p0001-einda   
         RECORDNUMBER  = '001'                 
         record        = gs_p0001             
         operation     = 'COP'   
         nocommit      = 'X'             
   importing                           
    return        = gt_bapireturn1   
    key           = gs_bapipakey     
exceptions                          
    others        = 1.            
However, we receiving an error in the gt_bapireturn1 itab basically giving the error PG 184. When I look up the error it basically says that to update this info type we need an exclusive lock, which I would have thought exists when using the LOCKINDICATOR parameter. The previous FM ( HR_INFOTYPE_GETDETAILS) returns blank against the SPRPS fileld (Lock indicator) when reading the infotype data, so it's not previously locked or anything.
We're using version 4.0b, which I know is pretty old, but surely this update should work.
Has anyone encountered this problem before, and, do you think I should be able to update this field even though it's grayed out on the screen ?.
Jason
Edited by: Jason Stratham on Mar 16, 2010 11:41 AM

I read that I should be using the enqueue and dequeue FM's despite the LOCKINDICATOR parameter.
This I have now done, but am now receiving an error PG 428 'A complex application error has occurred', but I'm none the wiser in knowing why this error has occurred. Has anyone encountered this error before?.
I'm beginning to feel that despite being told that I can use the HT_INFOTYPE_OPERATION  function module it may well purely imitate the front screen processing, which does not allow us to change the cost center value. Is there any way that this might be done. We're on version 4.0b, and I'm sure that in later version there might be a BAPI that almost directly updates it. I guess there's no such method for 4.0b?.
Jason
Edited by: Jason Stratham on Mar 16, 2010 12:06 PM

Similar Messages

  • Updating InfoType 0001 in ABAP

    Our parent company is passing different begin and end dates from Infotype 0001 to our HR system. In our system an employee would have a start date of 3/1/2005 but our parent company has the same employee in there system as a start date of 1/1/2008. I was looking at using user exit EXIT_SAPLRHA0_003 to capture these and add the parent companies dates into our Infotype 0001 so that there feed doesnt overwrite our original dates. I have attempted to use HR_INFOTYPE_OPERATION with no luck. Any one have a possible way to update InfoType 0001 without using a BDC?

    What exactly is the issue? In any case HR_INFOTYPE_OPERATION in turn calls HR_MAINTAIN_MASTERDATA so you might end up with the same issue with either function call.
    ~Suresh

  • Updating Infotype 0001 (PA) as per OM structure

    Dear Experts,
    Can any one pls let me know how to update info type 0001 position and Org Unit from OM info type 1001 (Relation ship)
    I have created relation ship between position and holder (A 008) in OM structure and want to get it reflected in PA info type 0001. Is there any standard program exists.
    With regards,
    Chandrasekhar.

    Hi,
    T-Code - SA38
    try reports - RHINTE00 ,RHINTE10,RHINTE20 & RHINTE30
    Regards,
    Param

  • HRMD_A07 Idoc to update InfoType 0014 does not delimit existing PA0014 rec

    In ECC 6.0, we are using HRMD_A07 Idoc to update infotype 0014 using update data received from a third party application. In XI, I am creating the Idoc with Update Code "U" with E1PLOGI, E1PITYP and E1P0014 segments. E1P0014 holds the data for the latest record.
    If I directly pass the Idoc thru ALE layer, It creates records for the new date range on E1P0014 segment, but does not delimit the previous record by changing its end date. This results in two records in PA0014 with end date of 12/31/9999 - which is wrong.
    I also tried using a wrapper FM to create additional segments in the Idoc representing the existing record in PA0014, with the end date being delimited to incoming record's beg. date minus 1.
    This also results in just creating two additional records in PA0014 corresponding to the two segments in Idoc while existing record in PA0014 stays intact resulting in two records with end date 12/31/9999.
    I also experimented with setting the lock indicator (PA0014-SPRPS) but that also does not result in delimiting the existing record.
    Am I missing something? Is there a piece of config that controls this?
    Regards,
    The time constraint on 0014 is "2"

    Hi Jon and Ashish,
    I too am facing the same issue that the new IDOC is not delimiting the previous record.
    Can you explain how did u get over you issue.
    I'm maintaining the same dates in E1PITYP and in E1P0014.
    Thanks,
    Jilly

  • Class to update infotype

    Hi friends,
    Can you please give the details of class(not HR_INFOTYPE_OPERATION) for updating infotypes?
    Thanks in advance,
    Anu

    Hi Anu,
    If "Class " mentioned by you related to time constrins,
    A time constraint indicates whether more than one infotype record may be available at one time. The following time constraint indicators are permissible:
    1: An infotype record must be available at all times. This record may have no time gaps. You may not delete the record last stored on the database because all records of this infotype would otherwise be deleted.
    2: Only one record may be available at one time, but time gaps are permitted.
    3: Any number of records may be valid at one time, and time gaps are permitted.
    Other possible time constraint indicators are as follows:
    A: Only one record may ever exist for this infotype. It is valid from 01/01/1800 to 12/31/9999. Splitting is not permissible.
    View V_T582B Infotypes Which are Created Automically controls whether the system automatically creates the infotype record for an employee hiring or an applicant data entry action.
    Infotypes with time constraint A may not be deleted.
    B: Only one record may ever exist for this infotype. It is valid from 01/01/1800 to 12/31/9999. Splitting is not permissible.
    Infotypes with time constraint B may be deleted.
    T: The time constraint varies depending on the subtype.
    Z: Refers to time management infotypes. The time constraint for these infotypes depends on the time constraint class defined in view V_T554S_I Absence: General Control. Collision checks are defined in view V_T554Y Time Constraint Reaction.

  • PPOME infotype 0001 relation

    When I change the position by PPOM / PPOME for single Person, is not updated infotype 0001, Organizational Assignment, I see it by PA20.
    Although into the table T77S0 is set:
    PLOGI            ORGA                   X     Integration Switch: Organizational Assignment
    PLOGI            PLOGI                  02     Integration Plan Version / Active Plan Version
    The version 02 is active.
    What is missing ?
    Any assistance would be greatly appreciated.
    Thanks.
    Best regards.
    Eric

    Hi Eric,
    >PPOME is Transaction code in OM to maintain structure and IT 0001 is a Infotype in Personnel Administration.
    >There is no direct relationship but, when you maintain Position which is a integration point between OM & PA, it has a direct relationship to both the modules if the integration is active.
    >This issue is because the change what you made in OM is not updated in PA, this is a common issue and as other members already suggested you need to check the integration switches and run reports (RHINTE00, RHINTE10, RHINTE20, RHINTE30) to update the database both in OM & PA.
    Regards
    Chandrashekar

  • 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.

  • 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

  • INFOTYPE 0001 UPDATION

    I HAVE ENHANCED INFOTYPE 0001. NOW I WANT TO UPDATE THOSE FIELDS. IS THERE ANY BAPI which will update the infotype 001.
    please help me.

    Hi umesh,
    1. There is on FM
       HR_INFOTYPE_OPERATION
    2. But its not RFC Enabled (as u want)
    3. U can make another Z FM (RFC Enabled )
       and use this FM inside it.
    regards,
    amit m.

  • Update infotype using class method

    Hi All,
    I need to update an infotype using a Class method. I need to pass a file as input to the Class Structure.
    How can we pas a file as input to the Class structure.
    Any pointers on this would be really helpful.
    Thanks,
    Saher

    Hello,
    You can update/insert records in Info type thru below code using FM: HR_INFOTYPE_OPERATION, but you need to get the data from the file to internal table for the same.
      LOOP AT t_insert INTO w_insert.
        w_pernr = w_insert-ownnum.
        CALL FUNCTION 'HR_READ_INFOTYPE'
          EXPORTING
            pernr           = w_pernr
            infty           = c_infty                           "'0105'
          TABLES
            infty_tab       = t_0105
          EXCEPTIONS
            infty_not_found = 1
            OTHERS          = 2.
        READ TABLE t_0105 INTO w_0105 WITH KEY pernr = w_insert-ownnum"#EC *
                                                       subty = c_subu.
        IF sy-subrc = 0.
          MOVE w_0105 TO w_p0105.
          w_p0105-usrid = w_insert-lanid.
          CLEAR w_0105.
        ELSE.
          w_p0105-pernr = w_pernr.
          w_p0105-usrid = w_insert-lanid.
          w_p0105-begda = sy-datum.
          w_fnr = 'X'.
        ENDIF.
        CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
          EXPORTING
            number = w_pernr.
        w_p0105-pernr = w_pernr.
        IF w_fnr = 'X'.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              infty         = c_infty                           "'0105'
              number        = w_p0105-pernr
              subtype       = c_subu                            "'0001'
              validityend   = w_p0105-endda
              validitybegin = w_p0105-begda
              record        = w_p0105
              operation     = c_oprn  "'INS'
              tclas         = 'A'
              dialog_mode   = '0'
            IMPORTING
              return        = w_return.
        ELSE.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              infty         = c_infty                           "'0105'
              number        = w_p0105-pernr
              subtype       = c_subu                            "'0001'
              validityend   = w_p0105-endda
              validitybegin = w_p0105-begda
              record        = w_p0105
              operation     = 'MOD'  "'MOD'
              tclas         = 'A'
              dialog_mode   = '0'
            IMPORTING
              return        = w_return.
        ENDIF.
        CLEAR w_fnr.
        CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
          EXPORTING
            number = w_pernr.
    endloop.
    Hope it helps.
    Thanks,
    Jayant

  • Cost center (KOSTL) is not updating in HR master table for infotype 0001

    Hi ABAP gurus,
    We have one interface where we are posting the HR master data using the IDOC (IDOC_INPUT_HRMD) into SAP.
    While updating cost center, We have one issue regarding infotype 0001.
    It is working fine for all the fields except: KOSTL, ORGEH, STELL.  Surprisingly the created IDOC contains the value in these fields but it is not getting updated in master table PA0001. I have tryied inserting the value manually and it is working fine and tried with BDC Programming and no issues. Only we have this issue while we want to use the IDOC. This is mandatory in our interface.
    While debugging the IDOC function module I found that one condition is there for these three fields.
    CHECK NOT inte IS INITIAL. where inte value is being fetched from table t77s0 based on
    GRPID = PLOGI
    SEMID = ORGA
    In this condition I see no value for this combination and hence it is not getting further. I am not sure how this condition does exist for only these three fields and not for others.
    Can any please provide the reasona and solution for this.
    Appreciate the help in advance.
    Thanks,
    Jitender

    Dear Mohan,
    Try assigning your cost center to position it will default both your org unit and cost center.
    Cheers!

  • Update Position changes in infotype 0001.

    Hi Experts,
    I am doing salary change with promotion workflow, for that i am writing a function module which upadates 4 infotypes
    IT0000,IT0001,IT0008,IT0014. Using FM HR_INFOTYPE_OPERATION. But I am stuck in updating Positon change of
    the person in infotype IT0001. Please help me in achiving it.
    Thanks in advance,
    Devananda A J

    Hi Volker,
    I updated it using Actions. Now its working fine.
    Thanks for your inputs.
    Regards,
    Devananda A J

  • How to UPDATE MASTER DATA RECORD PA0377 using FM HR_INFOTYPE_OPERATION

    How to UPDATE MASTER DATA RECORD IN INFOTYPE 0377 DIRECTLY using function module HR_INFOTYPE_OPERATION ? When i use operation = 'MOD'  im getting an ERROR as NO DATA STORED FOR 0377 IN SELECTION PERIOD.
           Can anyone please help me how to use HR_INFOTYPE_OPERATION to UPDATE MASTER DATA RECORD.
    Thanks,
    Karthi.

    Hi,
    please check this code
    it is very useful
    infotypes: 0105.
    parameters: p_pernr type p0105-pernr,
                p_subty type p0105-subty,
                p_begda type p0105-begda,
                p_endda type p0105-endda,
                p_opera type pspar-actio,
                p_usrid type p0105-usrid,
                p_commt as checkbox.    "Useful only when NO_COMMIT is 'X'
    data: w_return type bapireturn1,    "Error handling data
          w_key type bapipakey,         "If record has been created or changed the created/ changed
                                        "record's key (PSKEY) will be populated
          v_message type string.        "For printing returned messages
    call function 'BAPI_EMPLOYEE_ENQUEUE'
      exporting
        number = p_pernr
      importing
        return = w_return.
    if w_return is initial. "Employee is not locked
      p0105-pernr = p_pernr.
      p0105-subty =
      p0105-usrty = p_subty.
      p0105-begda = p_begda.
      p0105-endda = p_endda.
      p0105-usrid = p_usrid.
    *Calls Internally HR_MAINTAIN_MASTERDATA
      call function 'HR_INFOTYPE_OPERATION'
        exporting
          infty         = '0105'
          number        = p_pernr
          subtype       = p_subty
          validityend   = p_endda
          validitybegin = p_begda
          record        = p0105
          operation     = p_opera
          dialog_mode   = '0'
          nocommit      = 'X'
        importing
          return        = w_return
          key           = w_key.
    endif.
    if w_return is not initial.
      message id w_return-id type w_return-type number w_return-number
              with w_return-message_v1 w_return-message_v2 w_return-message_v3
              w_return-message_v4 into v_message.
      case w_return-type.
        when 'A' or 'E'.
          format color col_negative. write:/ v_message.
        when others.
          format color col_heading. write:/ v_message.
      endcase.
      call function 'BAPI_EMPLOYEE_DEQUEUE'
        exporting
          number = p_pernr.
    else.
      format color col_positive. write:/ 'Record Updated Successfully.'.
      if w_key is not initial.
        write:/ 'Key contains',
              / 'Personnel Number:', w_key-employeeno,
              / 'Subtype (absence type):', w_key-subtype,
              / 'Start date of Absence:', w_key-validbegin,
              / 'End date of Absence:', w_key-validend.
      endif.
      commit work.
    endif.
    Thanks and regards
    durga.K

  • Error while updating infotype using HINUINFO_UPDATE

    Hi All,
    While executing the program 'HINUINFO_UPDATE'
    i am getting an error 'No object identification permitted for infotype 0582, subtype LTA'.
    After the approval for LTA claim is done in ESS i have executed the program 'HINUINFO_UPDATE' to update he infotypes 15 and 582. Infotype 15 is getting created but while creating the infotype 582 system gives the above error message.
    In the detailed error log system gives the following message.
    "You attempted to access a data record with the object identification 1. However, according to the Customizing settings, object identifications cannot be used for subtype LTA of infotype 0582".
    Helpful answers will be rewarded .

    Solved by SAP

  • Query on reading infotype 0001 using the macro rp-provide from last p0001

    Dear Friends,
            I have a question rgarding relating the infotype 0001 when we are using in the program the logical database PNP.
    iam using rp-provide-from-last p0001 space sydatum sydatum
            if pnp-sw-found eq 1.
            append p0001 into i_p0001.
            endif.
    iam getting a problem in production , in the selection screen iam passing for emloyee subgroup with multiple values option.
    i have passed E,H,S  -> where E means Executive , H means hourly and S means salaried employee...
    one particular scneario is iam having an employee whose
    employee subgroup is C (contactor) and on the selection screen if am passing this personnel no and on the selection screen iam only having in the multiple selection option only E,H,S but not C so this record should  should fail but it is getting success and appending to internal table i_p0001
    which is wrong
    , i mean to say the macro is getting success
    rp-provide-from-last p0001 space sydatum sydatum
    this employee .
    my question is will the macro will not check on the selection screen the employee gropu which we have passed and should i exclusively check
    if p0001-persk in pnppersk ?? or please let me knwo how to check this wrong employee not getting appended to my internal table.
    please let me know
    regards
    madhuri

    Hi Madhuri
      The macro rp-provide-from-last p0001 will not fetch data from the database, it simply extracts the last record from the available internal table P0001[]  for the time frame provided(as 3rd and 4th parameters). You can check the definition of the macro from the database table TRMAC, it simply uses the LOOP....ENDLOOP and IF conditions to arrive at the last record and populates the fields pnp-sw-found, pnp-sw-tabix.
        And coming to your problem, please check all the IT0001 records of the EE concerned, it can happen that the EE is attached to different employee subgroups in different time frames and hence the LDB is fetching all the available records of the EE (even if the employee subgroup is not among the one's selected in  the selection screen). If this is the case, I reckon, u've to perform manual check before appending to the internal table.
    Note:  The macro  rp-provide-from-last p0001 space sydatum sydatum will only fetch the valid IT0001record as on date - sy-datum

Maybe you are looking for