How to update infotype 0006

Hello,
I want to update infotype 0006.
I tried the things in following way using 'HR_INFOTYPE_OPERATION' function.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
      INFTY                       = '0006'
      NUMBER                   =  PERNR
      SUBTYPE                  =  '1'
      VALIDITYEND           = IT_PA0006-ENDDA
      VALIDITYBEGIN        = IT_PA0006-BEGDA
      RECORD                   = ls_p0006
      OPERATION              = 'CHANGE'
     TCLAS                      = 'A'
      nocommit      = ''
      dialog_mode   = '0'
    IMPORTING
      RETURN                   = RETURN.
Function was executed successfully but there was no updation in the record.
Thanks in advance.

****Data declaration
Return Table for ENQUEUE - DEQUEUE messages
DATA: zreturn TYPE bapireturn1,
      user TYPE sy-uname.
DATA: wa_0001 TYPE p0001.
****Lock the pernr for editing
          CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
            EXPORTING
              number       = pernr
            IMPORTING
              return       = zreturn
              locking_user = user.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
              EXPORTING
                infty                  = '9009'
                number                 = wa_0001-pernr
               validityend            = wa_0001-endda
               validitybegin          = wa_0001-begda
                record                 = wa_0001
                operation              = 'MOD'                  "It can be 'INS' for insert or 'DEL' for delete
             IMPORTING
               return                 = zreturn
*******Unlock the Pernr
            CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
              EXPORTING
                number = pernr
              IMPORTING
                return = zreturn.
Hope this will help you.
Regards,
Aniruddha

Similar Messages

  • How to update infotype 0712 in the background

    I amd working on a web dynpro applicaiton for PA action request and process action in the background. We have manu concurrent employees. When the main assignemnt is terminated, I need to switch the main pernr to another pernr. I sue HR_INFOTYPE_OPERATION to update other infotypes with no problem, but it does not work with info type 0712. I step through in debugger, see HR_INFOTYPE_OPERATION run though without erro, but IT0712 does not show the update.
    What other tool can I used to update infotype 0712 and 0171?
    Anna

    Hi Anna,
                  Have you tested the IT0712 by manually updating?
    if so try with bdc recording and run in foreground mode.
    if the same hits in IT0712 or 0171.
    use the same with no screen mode.
    don't use the HR_infotype_operation FM
    it will help you.
    cheers...,
    By,
    Vijay.

  • How to update infotype 0024 in HR

    Hi all,
    I have a requirement to update the qualifications of an employee. That is, i need to modify the Proficiency value of a qualification (qualification tab) in IT 0024 and create new qualification record IT 0024.
    Can someone help me what is the function module used to modify proficiency and create new qualification record in IT 0024.
    Also, how to query IT 0024 data? Bcoz i have to read the qualification data first in order to modify the existing proficiency value? If we update IT 0024, then will this be reflected in OM (P to Q relation in HRP1001 table)?

    Hi,
    IT 0024 is different from other infotypes. You need to use special FMs to read and write this infotype also delete it. Which are:
    RHPP_Q_PROFILE_DELETE
    RHPP_Q_PROFILE_READ
    RHPP_Q_PROFILE_WRITE
    RHPP_Q_PROFILE_WRITE_N_DIF
    İ'm also adding some infos and code sample for you.
    "declaration
    DATA : profile LIKE hrpe_relaq OCCURS 0 WITH HEADER LINE.
    "fill it
    *&      Form  fill_profile
    FORM fill_profile .
      IF r_tpos = 'X'.
        profile-tbjid = 50000041.
        profile-profcy  = 0003.
        APPEND profile. CLEAR profile.
        profile-tbjid = 50000042.
        profile-profcy  = 0003.
        APPEND profile. CLEAR profile.
        profile-tbjid = 50000043.
        profile-profcy  = 0003.
        APPEND profile. CLEAR profile.
      ELSE.
        profile-tbjid = 50000044.
        profile-profcy  = 0003.
        APPEND profile. CLEAR profile.
        profile-tbjid = 50000045.
        profile-profcy  = 0003.
        APPEND profile. CLEAR profile.
        profile-tbjid = 50000046.
        profile-profcy  = 0003.
        APPEND profile. CLEAR profile.
      ENDIF.
    ENDFORM.                    " fill_profile
    "usafe of fM
    DATA lv_objid LIKE  p1001-sobid.
      lv_objid = gs_24-pernr.
      CALL FUNCTION 'RHPP_Q_PROFILE_WRITE'
        EXPORTING
          plvar                       = '01'
          otype                       = 'P'
          objid                       = lv_objid
    *     VTASK                       = 'D'
        TABLES
          profile                     = profile.
      CLEAR lv_objid.
    Çağatay

  • Updating infotype 0006

    Dear Experts,
    i have requirement, i have to update employee address details...........along with employee address details.....i need to update COM01,COM02,COMo3,COM04.
    in COM01, i need to update COM01,Area code(AREAC),TELN1 and same fields for COM02,COM03,COM04.
    but Area Code(AREAC) and TELNR are in Q0006 only not in P0006.....
    How can i update those details............
    Could you please help me....
    Regards,
    Sudheer

    Hi
    As far as i know the fields AREAx and TELNRx are stored both in the corresponding NUMx, so basically what you need to update is that field NUMx.
    You just have to figure out how those two fields are concatenated to form the final value in NUMx (You can take a look at  this form in the include RHEH01F1 line 130
    FORM FORMAT_TELNR USING Q_AREAC LIKE Q0006-AREA1
                            Q_TELNR LIKE Q0006-TELN1
                            P_COM01 LIKE P0006-COM01
                            P_TELNR LIKE P0006-NUM01.
      IF Q_TELNR NE SPACE.
        IF P_COM01 EQ SPACE.
          MESSAGE E053(5U).
        ENDIF.
      ELSE.
        IF Q_AREAC NE SPACE.
          MESSAGE E052(5U).
        ELSE.
          IF P_COM01 NE SPACE.
            MESSAGE E053(5U).
          ENDIF.
        ENDIF.
      ENDIF.
      PERFORM TELNR_PAI(SAPFP5U0) CHANGING Q_AREAC
                                           Q_TELNR
                                           P_TELNR.
    ENDFORM.                               " FORMAT_TELNUMBER

  • FM to Update infotype-0006 without ZIP Code

    Hi All,
    I am trying to create new entry in info type - 0006 (address) without using state and zip code.. I have tried with FM 'HR_INFOTYPE_OPERATION' . Using this I am able to save address without state but it is still giving zip code error is mandatory.. Even though I can create entry with out using state and zip using PA30..
    Please assist..
    -Rajesh

    Hi Ronaldo,
    Looking to this FM it is calling FM - 'HR_MAINTAIN_MASTERDATA' which in turn calling BDC..
    I was able to create record without state but not able to by pass state code validation.
    I am performing this action from external application so looking for FM or options by which I dont need to go for enhancement..
    -Rajesh

  • Update Infotype 1005 (Planned Compensation)

    Hi,
    Can anyone let me know...how to update infotype 1005 (Planned Compensation.
    Transaction to create 1005 (Planned Compensation).
    Thanks in advance....
    Sandeep.

    Hi,
    You can goto tcode pp01 or pp02(Expert mode) to create the planned compensation for the job or position.
    Rgds,
    Balaji.

  • Updating Infotype 0077 for the New Race and Ethnicity Codes

    Hi,
    I would like to ask for a help or any ideas on below case:
    There are new race and ethnicity codes required by the US EEO Law. I've already maintained them in table T505R. My problem now is on how infotype 0077 records of the employees will be updated showing the new race and ethnicity codes. Program RPURACU0 is use to update the records in infotype 0077. In this program, I first map the old ethnic origin to the new race and ethnicity codes. But after I've run and execute the program, infotype 0077 records of the employees still shows the old ethnic origin codes. It does not show the new race and ethnicity codes which should be based on the mapping I've done.
    Another problem is that in infotype 0077 in the field "Ethnic Origin", upon clicking on the drop down list, it shows all of the entries I've entered in table T505R. I think that ethnicity and race categories should be two different fields and thus, there should be another field for the race categories. May I know on how to add such field?
    To summarized, I need help in the following:
    -how to update infotype 0077 showing the new race and ethnicity codes
    - how to create field "Race" in infotype 0077 to display the new race categories
    Thanks in advance for your help!

    Mary,
    We have applied the relevant note, updated MP007700 (as below) and executed program RPURACU0 with the required mapping.  However, the Race field check boxes are not visible on IT0077 because as you can see the relevant field is not listed below.
    Module Pool          MP007700            Variable key    10
    Standard screen      2000                Feature
    Alternative screen   2010
    Next screen          2010
    001     P0077-RACKY     Ethnic origin
    002     P0077-MILSA     Military status
    003     P0077-ETHEN     Ethnicity
    004     P0077-SURVY     Survey answered
    005     P0077-DISAB     Disability
    006     FRAME_2     Veteran Status
    007     P0077-MEDIC     Benefit Indicator for Medicare
    008     P0077-DISDT     Date of Determination of Disabil
    009     P0077-DISLE     Date Employer Learned of Disabil
    011     P0077-EEOEX     EEO Exempt Indicator
    012     Q0077-VETS2     Veteran status
    013     Q0077-VETS3     Veteran status
    014     Q0077-VETS4     Veteran status
    015     Q0077-VETS5     Veteran status
    016     Q0077-VETS6     Veteran status
    017     Q0077-VETS7     Veteran status
    018     IT_ITAB-MARK                                    
    019     Q0077-VETS1     Veteran status
    021     FRAME_1     Additional Personal Data
    023     FRAME_3     Disability
    Thanks!
    Edited by: Victoria Nate on Sep 23, 2008 6:35 PM

  • BAPI to update enhanced Infotype 0006

    Hi,
       I have enhanced the standard infotype 0006 to add a new field zzrelation. I wanto to update values for this field using a BAPI.
       Is there a standard BAPI which has extension tables, for updating this enhanced 0006 infotype. So that I can pass the value of the custom field through the extension tables.
    Thanks in advance

    Hi Mukul,
    Use HR_INFOTYPE_OPERATION FM. The example is for info type 2006, replace it with 0006, also fill the table p0006 properly else it will give problem. You may use HR_READ_INFOTYPE to fill p0006.
    DATA:          p2006              TYPE p2006,
             gs_return          TYPE bapireturn1.
                             MOVE-CORRESPONDING <ABWKONTI_PTO> TO p2006.
                             CALL FUNCTION 'HR_INFOTYPE_OPERATION'
                                 EXPORTING
                                      INFTY            = '2006'
                                      NUMBER           = pernr-pernr
                                      SUBTYPE          = '94'
                                    OBJECTID         =
                                    LOCKINDICATOR    =
                                      VALIDITYEND      = p2006-endda
                                      VALIDITYBEGIN    = p2006-begda
                                    RECORDNUMBER     =
                                      RECORD           = p2006
                                      OPERATION        = 'MOD'
                                    TCLAS            = 'A'
                                    DIALOG_MODE      = '0'
                                    NOCOMMIT         =
                                    VIEW_IDENTIFIER  =
                                    SECONDARY_RECORD =
                                 IMPORTING
                                      RETURN           = gs_return
                                    KEY              =
    Br/Manas

  • Standard programs to update infotypes

    Please provide updates for this question:
    What are the standard SAP programs to update infotypes ( Ex: 001 / 002 / 003 ) .
    I will be uploading data from legacy system ( Excel / Text file ) and would like to use standard programs
    before going ahead with BDC .
    Thanks
    Rohan

    Hi,
    I checked out the program you stating.......
    In that program itself if you check the documentation its given how to add in fields.......
    You can use report RPUSTD00 to transfer master data from your old HR system.
    The dataset to be transferred must be stored in a sequential file. The file is stored under the name specified in the "logical file name" field (for more information on logical file names, read the IMG section entitled Additional client-dependent file name maintenance).
    The report reads this dataset and creates a batch input session for transaction PA30.
    The data description of your old record is defined according to the structure HRDATASET. If this structure does not meet your requirements, create the structure CI_HRDATAS in the ABAP Dictionary. In this structure, you can store the infotype fields to which data should be transferred. Make the necessary changes in RPUSTD00.
    Example
    If the include CI_HRADATAS contains the field F1 which is to be assigned to the infotype nnnn, add the following ABAP statements to FORM Dnnnn:
      CLEAR BDCDATA.
      BDCDATA-FNAM = 'Pnnnn-F1'.
      BDCDATA-FVAL =   SATZ-F1.
      APPEND BDCDATA.
    If the FORM Dnnnn does not exist for your infotype nnnn, copy FORM D0008 to FORM Dnnnn. Replace the 0008 by your infotype number:
    FORM Dnnnn.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = 'MPnnnn00'.
      BDCDATA-DYNPRO   = '2000'.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
      CLEAR BDCDATA.
      BDCDATA-FNAM = 'Pnnnn-F1'
      BDCDATA-FVAL = SATZ-F1
      APPEND BDCDATA.
      CLEAR BDCDATA.
      BDCDATA-FNAM = 'BDC_OKCODE'.
      BDCDATA-FVAL = '=UPD'.
      APPEND BDCDATA.
    ENDFORM.
    The FORM Dnnnn is called directly after FORM D0008; see the ABAP statement indicated as "<------ INSERT in the following (starting at line 1730 in the standard system):
      LOOP AT INFTAB.
        CASE INFTAB.
    Include all infotypes in your action *
         WHEN '0002'. PERFORM D0002.
         WHEN '0001'. PERFORM D0001.
         WHEN '0006'. PERFORM D0006.
         WHEN '0007'. PERFORM D0007.
         WHEN '0008'. PERFORM D0008.
         WHEN 'nnnn'. PERFORM Dnnnn.         "<------ INSERT
         WHEN OTHERS. WRITE: / 'Infotype not included:' (008), INFTAB.
                       STOP.
       ENDCASE.
    ENDLOOP.
    Parameter DSLOGNAM
    Logical file name
    Parameter MAPNAME
    Session name
    Definition
    Enter any name for the session to be created.

  • Need a help to Update Infotype.....

    Hi Experts,
    *am developing HR-ABAP Report inthat, i have data in 2 internal tables, through these (itabs) i want to*
    *insert the data into 2 Ztables(Respective tables) and then i want to Update one Custom Infotype.*
    how can i procedure for this? is there any FM to update Infotype....
    Thanks in Advance,
    sudeer.

    The best way is to use HR_INFOTYPE_OPERATION function module in your program.
    Sample code:
          call function 'HR_INFOTYPE_OPERATION'
            exporting
              infty         = p0082-infty
              number        = p0082-pernr
              subtype       = p0082-subty
              validityend   = p0082-endda
              validitybegin = p0082-begda
              record        = p0082
              operation     = 'INS'
              tclas         = 'A'
              dialog_mode   = '0'
            importing
              return        = return
              key           = key.
         capture error messages
          if return-type = 'E'.
            concatenate 'Sub Type:' p0082-infty into messtab-tcode.
            move return-message to messtab-param.
            append messtab. clear messtab.
          endif.
    You can use it for modifying the record also.

  • 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

  • Update infotype from user exit

    Hi,
    My requirement is to update a infotype from a user exit. I have a internal table with some records created in the user exit pbas0001. Now i need to update these records in the infotype 2001(absences). I tried using HR
    INFOTYPEOPERATIONS directly from the user exit and it didn't work. If i create a include program and create a subroutine within the include program and call it in the user exit still i am getting a error message. How can update the infotype from the user exit.
    Can someone send the example code for how to export the internal table from the user exit and import it in another program and update the infotype from that prgm.

    Put the entire code in another Report & SUBMIT that report from the User exit.. this will isolate the two work processes & the Z table should get updated..
    ~Suresh

  • Standard report to update infotypes

    Hi, is there any standard report or program that updates the following any of the infotypes below;
    1. 0000
    2. 0001
    3. 0008
    4. 0041
    I like to copy the ways how SAP update these infotypes and error handling.

    You can use HR_MAINTAIN_MASTERDATA to update all the infotypes in one go.. Also, these function modules mimic a BDC ie all the screen field checks are taken care of.. But you should be aware that both the function odules cannot handle large volumes of data..
    ~Suresh

  • 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

  • Update Infotype 1016

    Hi,
    I have to update Infotype 1016 using the BAPI FM "BAPI_HRMASTER_SAVE_REPL_MULT".
    Two tables need to get updated, HRP1016 & HRT1016.
    The Data in the HRT 1016 is a Table Data for Record in HRP1016.
    Say: Orgunit O 10000001 has two standrd Profiles..
    IF I go to PP01 and create the two standard profiles,
    I will have a single record in HRP1016 which has a TABNR field value generated.
    Now for this TABNR, I have two record in HRT1016 each corresponding to one Profile.
    I need to create these three ( 1 + 2 ) entries using the FM. The FM has Input structure BAPIHR1016 which allows only one profile per structure. Also it asks for the TABNR field, which I donot know until the actual creation.
    If I send one profile & TAB_SEQNR as 00001, its working fine, generating a TABNR for me.
    But when I send two records in the FM, one with TAB_SEQNR 00001 & other with TAB_SEQNR 00002, the second one is overwriting the first one, and I have only the second profile assigned.
    Please help solve this issue.
    Thanks in Advance.
    Suryakiran D.

    For updating the IT 1011, we have 6 fields in the BAPI.
    But when I go to PP01, i have only one field in input mode, rest all are disabled for input.
    Even if I fill the values in all the fields, only one is considered for update, and rest all are recalculated using this.
    Can someone please let me know how we can decide this.
    Thanks,
    Surya

Maybe you are looking for

  • Running root.sh during clusterware install fails

    Attempting to set up Clusterware/RAC for the first time. Running into a problem running root.sh after the clusterware installation. I get the following output. sh root.sh WARNING: directory '/u01/app/oracle/product' is not owned by root WARNING: dire

  • Itunes 11 no disk error

    I just loaded itunes 11 and i cant do anything. It says no disk in drive. please insert a disk into drive \device\Harddisk1\DR1/ any help please

  • Macbook Retina cracking sound when muted

    Hey guys, I just found that my Macbook Pro with Retina display makes a litle cracking sound when trying to play an alert, even when muted. Not sure if it's an issue or a normal behaviour. You can check if yours makes this as well when turn off the so

  • How to stop running Backup process by BRTOOLS ?

    Dear All, We r using HP-UX -- OS for SAP system. We run backup process by DB13 TC. once the backup started, we can not log in  till backup process ends. If we want to stop this process in between then how to stop BACKUP process safely ? We have to us

  • Install Errors upgrading to 3.1

    I'm upgrading from 3.0 to 3.1 During the install i get errors: WWV_FLOW_VAL must be declared wwsec_sso_enabler_private.enabler_config_not_found must be dec the final error that stops the install is: package body flows_030100.wwv_flow_security" has er