Update infotype 4003

I am having a problem deleting records from infotype 4003 using 'HR_MAINTAIN_MASTERDATA' fm

I'm passing the following:
wa_pprop-infty = '4003'.
      wa_pprop-fname = 'P4003-ENDDA'.
      wa_pprop-fval  = itab_4003-endda.
      APPEND wa_pprop TO it_pprop.
      wa_pprop-fname = 'P4003-BEGDA'.
      wa_pprop-fval  = itab_4003-begda.
      APPEND wa_pprop TO it_pprop.
      wa_pprop-fname = 'P4003-APACT'.
      wa_pprop-fval  = itab_4003-apact.
      APPEND wa_pprop TO it_pprop.
      wa_pprop-fname = 'P4003-INDIC'.
      wa_pprop-fval  = itab_4003-indic.
      APPEND wa_pprop TO it_pprop.
      wa_pprop-fname = 'P4003-PLDAT'.
      wa_pprop-fval  = it_4003-pldat.
      APPEND wa_pprop TO it_pprop.
      wa_pprop-fname = 'P4003-IDTXT'.
      wa_pprop-fval  = it_4003-idtxt.
      APPEND wa_pprop TO it_pprop.
      wa_pprop-fname = 'P4003-OBJID'.
      wa_pprop-fval  =  it_4003-objid.
      APPEND wa_pprop TO it_pprop.
      wa_pprop-fname = 'P4003- ZIMNR'.
      wa_pprop-fval  =  it_4003-ZIMNR.
      APPEND wa_pprop TO it_pprop.
      wa_pprop-fname = 'P4003-GEBNR'.
      wa_pprop-fval  = itab_4003-GEBNR.
      APPEND wa_pprop TO it_pprop.
then call the fm:
  CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
        EXPORTING
          pernr           = a_num
          actio           = 'DEL'
          tclas           = 'B'
          begda           = itab_4003-begda
          endda           = itab_4003-endda
          dialog_mode     = '0'
        IMPORTING
          return1         = return1
          hr_return       = hr_return
        TABLES
          proposed_values = it_pprop[].

Similar Messages

  • HR-ABAP Any BAPI or Function module to update infotypes 167 & 170

    Hi,
        Can anyone let me know is there any BAPI or Function module to update infotypes 167(Health Plans) & 170(Flexible Spending Accounts).
    Thanks,
    Sandeep

    Hi,
       U can use HR_BEN_CREATE_PLANS internally it calls HR infotype operation as specified by suresh.
    Suresh  : If there are approximately 3000 records to be updated on regular basis do u think is it better to use BAPI's or BDC
    regards
    Vick

  • 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

  • Problem in updating infotype 2001

    Hi Experts,
                     While i am  updating infotype 2001 , using HR_INFOTYPE_operation FM it giving a error , because it calling a wrong sceen 2000 , instead of 2001 . can anybody can help on this ?
    thanks and regards
    Renjith MP

    Hi Dude,
    Go through the below code for 2002 infotype :
    TYPES BEGIN OF text_version.
    TYPES   nummer TYPE x.
    TYPES END OF text_version.
    DATA: PERSONALDATAKEY    LIKE BAPIPAKEY.
    DATA: RETURN       LIKE BAPIRETURN1.
    DATA: P2002       LIKE P2002.
    DATA: PSKEY       TYPE PSKEY.
    DATA: IT_TEXT       TYPE HRPAD_TEXT_TAB .
    DATA: LINE       TYPE HRPAD_TEXT.
    DATA: version       TYPE text_version.
    DATA: pcl1       TYPE pcl1.Input Parameters:
    PARAMETERS:  PERNR  LIKE PA2002-PERNR  DEFAULT '1004511',
                 AWART  LIKE PA2002-AWART  DEFAULT 'LW',
                 BEGDA  LIKE PA2002-BEGDA  DEFAULT SY-DATUM,
                 ENDDA  LIKE PA2002-ENDDA  DEFAULT SY-DATUM,
                 BEGUZ  LIKE PA2002-BEGUZ,
                 ENDUZ  LIKE PA2002-ENDUZ.
    START-OF-SELECTION.
      CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
            EXPORTING
              number = PERNR
            IMPORTING
              RETURN = RETURN.
      IF RETURN-NUMBER IS NOT INITIAL.
        EXIT.
      ENDIF.
    * ADD DATA
      CLEAR: P2002.
      P2002-PERNR = PERNR.
      P2002-SUBTY = AWART.
      P2002-ENDDA = BEGDA.
      P2002-BEGDA = BEGDA.
      P2002-BEGUZ = BEGUZ.
      P2002-ENDUZ = ENDUZ.
      P2002-AWART = AWART.
      P2002-ITXEX = 'X'.
    * WRITE DATA
      CLEAR: RETURN, PERSONALDATAKEY.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
             EXPORTING
                  INFTY          = '2002'
                  NUMBER         = PERNR
                  SUBTYPE        = AWART
                  VALIDITYEND    = BEGDA
                  VALIDITYBEGIN  = BEGDA
                  RECORD         = P2002
                  OPERATION      = 'INS'
                  NOCOMMIT       = ''
                  TCLAS          = 'A'
             IMPORTING
                  RETURN         = RETURN
                  KEY            = PERSONALDATAKEY
             EXCEPTIONS
                  OTHERS         = 0.
      IF RETURN-NUMBER IS INITIAL.
        COMMIT WORK AND WAIT.
      ELSE.
        ROLLBACK WORK.
        EXIT.
      ENDIF.

  • Update infotype 0032 in user exit ZXPADU02

    Hi All,
    I have the following requirement.
    Telephone extension number is stored in IT0105 and IT0032. When the extension number is updated through ESS, this is stored in IT0105 but it does not update IT0032 which is displayed in MSS.
    I need to update infotype 0032 based on the data in 0105.
    I thought I could update infotype 0032 in userexit ZXPADU02 whenever infotype 0105 was saved using the function module HR_INFOTYPE_OPERATION but it is not working for me.
    Any help would be appreciated.
    Elaine

    You have to make the function call a separate unit of work.One other option is to put the function call in a report & SUBMIT it from the User exit.
    ~Suresh

  • Update Infotype 24 with Qualification

    Hi Friends,
    I have to update infotype 24(qualifications).  I am using function module Rh_insert_infty_1001_ext to update but this function only creates a record in hrp1001(i.e. OM side) but does not create any record in PA side i.e.  infotype 24.
    Is there a different way to update infotype 24?
    Thanks
    Nazish

    Hello Nazish,
    check this  HR_INFOTYPE_OPERATION with operation = 'COP'
    For PD tables,FM - BAPI_HRMASTER-SAVE_REPL_MULT is used and after PD tables are updated , for PA Tables use
    FM - HR_INFOTYPE_OPERATION
    Check FM - RH_INSERT_INFTY_1001_EXT  and also FM - BAPI_HRMASTER-SAVE_REPL_MULT
    regards

  • Update infotype

    I need to update infotype 22, 31 , 68. I am using function module "HR_INFOTYPE_OPERATION". But using this FM i can only upate the fields of infotype which are reflected in the infotype screen. I need to update other fields which are there in the PA table but not reflected in the screen.
    Is there any other function module available?

    Hi,
    You can use the Function Module <b>HR_MAINTAIN_MASTERDATA</b>.
    This function module enables you to maintain master data for employees and applicants. You can enter field names and contents in the 'proposed values' table. This will then be transferred to the corresponding infotypes. The same validation checks take place as would in the individual maintenance screens for the infotypes. You can enter as much data as you like. You can enter several records or infotypes at once. You are responsible for making sure that the data is consistent. If necessary, the module returns an error message. The error messages are the same as the those which appear in the dialog, in other words, the individual maintenance screen error messages are transferred rather than interpreted by this module.
    <u>Exanple</u>
    CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
    EXPORTING
    pernr = p_0735-pernr
    MASSN =
    actio = 'MOD'
    tclas = 'A'
    begda = p_0735-begda
    endda = p_0735-endda
    objps = p_0735-objps
    seqnr = p_0735-seqnr
    sprps = p_0735-sprps
    subty = p_0735-subty
    *Put 0 here when everything is ok. 1 shows dialog on error.
    dialog_mode = dialog_mode
    luw_mode = luw_mode
    NO_EXISTENCE_CHECK = ' '
    NO_ENQUEUE = ' '
    IMPORTING
    return = l_return
    RETURN1 =
    HR_RETURN =
    TABLES
    proposed_values = l_value_tab
    modified_keys = l_pskey.

  • Update Infotype 2051

    Hi all,
    Is there any Function module to update infotype 2051. The FM HR_Maintain_masterdate is not working for this infotype.

    I've done some more research, basically IT2051 data is calculated when you go into the screen and sickness/subsitutions etc feed into this screen. It may be easier to look at loading data into the Time infotypes that get displayed in this Infotype rather than trying to load data directly into it.
    Regards
    J

  • 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

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

  • Standard programs to upload / 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

    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 Rohan ,
         you can update you infotype using 'HR_INFOTYPE_OPERATION' function module .
    1)   transfer all your excel data  into internal table .
    2)   loop at internal table
    3)  fill all the required field of that infotype .
    4) lock table
    5) call that functuion module .
    6) unlock table
    for this fallow the below code...
    DATA: it_p0169 TYPE STANDARD TABLE OF pa0169 WITH HEADER LINE.  (make internal table according to your requirment)
    DATA: wa_p0169  TYPE p0169.
    LOOP AT it_file
          v_eeamt = it_file-pct_gross.
    *Pre-Tax Contribution Percentage
          v_eepct = v_eeamt / 10.
          v_begda = it_file-datchngd .
    *Appending into header (these all are the required filed in my case )
         it_p0169-eeamt =  v_eeamt.
          it_p0169-begda =  v_begda.
          it_p0169-eepct =  v_eepct.
          it_p0169-bplan =  v_bplan .
          CLEAR wa_p0169.
          MOVE-CORRESPONDING it_p0169 TO wa_p0169.
          wa_p0169-INFTY = '0169'.    (not forget to pass infotype no in the header )
    CONSTANTS: c_action_ins  TYPE pspar-actio VALUE 'MOD',   (it can be also COP for Copy , DEL for Delete , DIS for Display , MOD to Change , LIS9 to  Delimit , INS to Create )
               c_infty_0169  TYPE prelp-infty VALUE '0169'.
    DATA: it_return  TYPE bapireturn1. (as it is )
    DATA: it_return  TYPE bapireturn1.
      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = p_pernr
        EXCEPTIONS
          OTHERS = 1.
      IF sy-subrc <> 0.
         RAISE enqueue_FAILED.
      ENDIF.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        infty                  = c_infty_0169
        number                 = p_wa_0169-pernr
        SUBTYPE                = '401K'
        OBJECTID               =
        LOCKINDICATOR          =
        validityend            = p_wa_0169-endda
        validitybegin          = v_begda1
        RECORDNUMBER           =
        record                 = p_wa_0169
        operation              = c_action_ins
        TCLAS                  = 'A'
        DIALOG_MODE            = '0'
        NOCOMMIT               =
        VIEW_IDENTIFIER        =
        SECONDARY_RECORD       =
      IMPORTING
        return                 = it_return.
       if it_return-MESSAGE is not initial .
         delete it_file .
       endif.
    commit work .
      CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
        EXPORTING
          number = p_pernr
        EXCEPTIONS
          OTHERS = 1.
      IF sy-subrc <> 0.
         RAISE DEQUEUE_FAILED.
      ENDIF.
    Enjoy
    Priyank

  • BAPI for updating infotype 0019 - Date Monitoring

    Hi,
    Does anyone know if there a BAPI for creating/updating infotype 0019 - Monitoring of Dates?
    Many thanks,
    Paul

    Hi Paul,
    1. HR_INFOTYPE_OPERATION
       This is the FM (for all infotypes, even 0019)
    2. If u want something like BAPI (RFC Enabled),
       what u can do is that
      create a new Z Fm,
      and call the FM
    HR_INFOTYPE_OPERATION
    in this.
    regards,
    amit m.

  • Function to update Infotype 0003

    Hi,
    I want to update 'Run payroll up to' field of infotype 0003 based on some conditions .
    Is there any function module to update Infotype 0003 fields ?
    Thanks

    I have calle the FM with action 'EDQ'  .
    It did not uloack the pernr .
    I am using this code :
    SELECT SINGLE STAT2
      INTO LV_STAT2
      FROM  PA0000
      WHERE PERNR =  INNNN-PERNR AND
            ENDDA >= INNNN-BEGDA AND
            BEGDA <= INNNN-ENDDA .
      IF SY-SUBRC = 0 AND
        LV_STAT2 <> '3'  .
        CALL FUNCTION 'HR_READ_INFOTYPE'
          EXPORTING
            PERNR           = INNNN-PERNR
            INFTY           = '0003'
          IMPORTING
            SUBRC           = LV_SUBRC_1
          TABLES
            INFTY_TAB       = IT_PA0003
          EXCEPTIONS
            INFTY_NOT_FOUND = 1
            OTHERS          = 2.
        IF LV_SUBRC_1 = 0 .
          READ TABLE IT_PA0003 INDEX 1  .
          CHECK SY-SUBRC = 0 .
          WA_PA0003 = IT_PA0003 .
          IF INNNN-BEGDA >  IT_PA0003-ABWD1  .
         Reset the  "Run payroll for pers.no. up to" date
            WA_PA0003-ABWD1 = INNNN-BEGDA  .
            CALL FUNCTION 'HR_INFOTYPE_OPERATION'
              EXPORTING
                INFTY                  = '0003'
                NUMBER                 = INNNN-PERNR
                RECORD                 =  WA_PA0003
                OPERATION              = 'EDQ'
             IMPORTING
               RETURN                 =  LV_SUBRC_2          .
            CALL FUNCTION 'HR_INFOTYPE_OPERATION'
              EXPORTING
                INFTY                  = '0003'
                NUMBER                 = INNNN-PERNR
                VALIDITYEND            = WA_PA0003-ENDDA
                VALIDITYBEGIN          = WA_PA0003-BEGDA
                RECORD                 =  WA_PA0003
                OPERATION              = 'MOD'
                NOCOMMIT               =  'X'
             IMPORTING
               RETURN                 =  LV_SUBRC_2

  • 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

Maybe you are looking for