Infotype Pa0014 Updation

Hi,
I have designed a table control with 4 columns (wage type,wage text, wage amount and currency). The values from the table should be updated/inserted in infotype pa0014.
If the table control record matches with any of the records in infotype 14 then the corresponding record amount field should be updated.
If the record in table control doesnt match with any records in infotype 14 then the record should be newly inserted.
I am using the FM- HR_INFOTYPE_OPERATION for this.
*        FM to fetch all data from infotype pa0014 for the particular pernr
         CALL FUNCTION 'HR_READ_INFOTYPE'
           EXPORTING
             pernr                 = pernr
             infty                 = '0014'
           TABLES
             infty_tab             = it_p14
          EXCEPTIONS
            INFTY_NOT_FOUND       = 1
            OTHERS                = 2
*         looping the records  it_p0014 internal table to update or insert in infotype pa0014
          loop at it_0014 into wa_0014.
*             reading the record in pa0014 infotype to check if it already exists or not
              read table it_p14 into wa_p14 WITH KEY pernr = wa_0014-pernr
                                                     subty = wa_0014-subty
                                                     endda = wa_0014-endda
                                                     begda = wa_0014-begda.
*             if records exists in pa0014 infotype then modify the record using Opeation 'MOD' in FM
              if sy-subrc eq 0.
*                   FM to update infotype PA0014
                    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
                      EXPORTING
                        infty            = '0014'
                        number           = pernr
                        subtype          = wa_0014-subty
                        VALIDITYEND      = wa_0014-begda
                        VALIDITYBEGIN    = wa_0014-endda
                        record           = wa_0014
                        operation        = 'MOD'        "change
*                        nocommit         = 'X'          "commit = 'X', No = ''
                      IMPORTING
                        return           = return_struct
                        key              = key.
                    IF return_struct-type = 'E'.
                      MESSAGE e000(zhr_allow_upd_msg) WITH return_struct-message.
                    ELSE.
                      commit work. "without this commit records wont get updated.
                    endif.
               else. "if record doesn't exist pa0014 infotype then insert the record
**                   FM to insert new records in infotype PA0014
                    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
                      EXPORTING
                        infty            = '0014'
                        number           = pernr
                        subtype          = wa_0014-subty
                        VALIDITYEND      = wa_0014-begda
                        VALIDITYBEGIN    = wa_0014-endda
                        record           = wa_0014
                        operation        = 'INS'        "create
*                        nocommit         = 'X'          "commit = 'X', No = ''
                      IMPORTING
                        return           = return_struct
                        key              = key.
                    IF return_struct-type = 'E'.
                      MESSAGE e000(zhr_allow_upd_msg) WITH return_struct-message.
                    ELSE.
                      commit work.
                    ENDIF.
               endif.
               clear:wa_0014,wa_p14.
        ENDLOOP.
Inserting a new records in infotype pa0014 is working fine.
I am facing a problem with the updation of records. Even If record in the table control and infotype  pa0014 matches the FM is returning an error message "no records exists in infotype pa0014"
Can you suggest me what might be the problem when i try to update amount field in the infotype pa0014.
Regards,
Bala Baskaran.S

Insert is not modifying the exisiting records.
Indeed... it will overwrite the existing record... But what is the difference in your case?
Anyway... Maybe the record is not found due to missing key field passed to the FM... e.g. why not passing the value of Object Identification (OBJPS) and the SEQNR field as well?
Kr,
Manu.
Edited by: Manu D'Haeyer on Feb 23, 2012 2:11 PM

Similar Messages

  • Infotype 9008, Update Error

    Hi all,
      Can any one let me know why ia m getting this error ..
      'Infotype 9008, Update Error'
    Thanks in advance.

    Hi April King,
       I am using the statement 
    CALL TRANSACTION 'PA30' USING tb_bdcdata UPDATE 'S'
      MODE 'N' . "MESSAGES INTO tb_itab.
    Can you please let me know what is the problem ... ??
    thank you

  • Event for infotype 1001 updates doesn't trigger

    Hi everyone,
    I'm facing the following problem at HR Workflow
    I've created the object ZEHSBUS900, subtype of PDOTYPE_SH. And so, created two events: NOTIFYCREATE and NOTIFYUPDATE.
    At SWEHR3 transaction, I have this two entries:
    S     Position     1001     Relationships     A003     Belongs to     INS          0     ZEHSBUS900     NOTIFYCREATION
    S     Position     1001     Relationships     A003     Belongs to     UPD          0     ZEHSBUS900     NOTIFYUPDATE
    But when I create or update an infotype 1001, only the NOTIFYCREATION is triggered. I mean, the UPD operation doesn't work.
    What is stange is that I've made this kind of implementation at another system and it's working fine ( a creation at 1001 triggers NOTIFYCREATION and modifications trigger NOTIFYUPDATE ).
    Do you know what could be missing?
    Thanks in advance,
    Raphael Xavier

    Hi Abdullah!
    Thank you for the tip, but it still doesn't work this way. As what I've said before, what is strange is that problem occurs in one system and didn't occur in another one, and the same procedure was used in both.
    What I did to "solve" this was using a function instead calling the event at SWEHR3. In this function there is a verification if it is an insert ou update operation and then a call to the function SWE_EVENT_CREATE.
    It wasn't the best solution, but still was a solution.
    If anyone has any idea what it can be, I'm still interested about it.
    Raphael

  • HR ABAP: Infotype 25 updation

    In my server table PA0025 is empty.....even i entered data (annual aprrisal ) for infotype 25 and save then also the table PA0025 is not updated.....!!
    Can anybody explain me why its behave like this??? and also
    <b>How to update the table PA0025 table?????</b>
    Waiting for ur rply...
    Thanks,
    Biswajit

    Hi Biswajit..
    Go to HRP1001 and enter the following:
    OTYPE = P
    OBJID = < The Personnel Number u have created the appraisal for>
    PLVAR = current plan (01)
    SOBID =  Thsi field will have a unique number that determines the appraisal u have created.
    The same SOBID can be seen in PA30 appraisal screen under the following menu options:
    View --> Key On
    Cheers
    Shakir

  • HR infotype-287 -- updation

    hai all
    I have a table control option in screen.
    Here i have to enter the claims details,
    that soul update the infotype 287.
    Here i want know, How will u update the infotype...
    Please send me coding regarding updating infotype -- 267  or   15
    Regards
    Deekshitha

    Hi again,
    1. this is the full coding.
    2. just copy paste in new program.
    3. U can change the pernr and amount values as per requirement.
    4.
    Report abc.
    Data
    DATA : P0015 LIKE P0015.
    DATA : RETURN     LIKE     BAPIRETURN1.
    DATA : KEY     LIKE     BAPIPAKEY.
    DATA : RETURNE     LIKE     BAPIRETURN1 .
    Values (Change as per Requirement)
    P0015-PERNR = '1'.
    P0015-BEGDA = '2061101'.
    P0015-ENDDA = '2061101'.
    P0015-LGART = '3075'.
    P0015-PREAS = '01'.
    P0015-WAERS = 'INR'.
    P0015-BETRG = '2500'.
    *----- First Enqu
    CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
      EXPORTING
        NUMBER = p0015-pernr
      IMPORTING
        RETURN = RETURNE.
    Update
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        INFTY         = '0015'
        NUMBER        = P0015-PERNR
        SUBTYPE       = P0015-SUBTY
        OBJECTID      = P0015-OBJPS
        LOCKINDICATOR = P0015-SPRPS
        VALIDITYEND   = P0015-ENDDA
        VALIDITYBEGIN = P0015-BEGDA
        RECORDNUMBER  = P0015-SEQNR
        RECORD        = P0015
        OPERATION     = 'INS'
        TCLAS         = 'A'
        DIALOG_MODE   = '0'
      IMPORTING
        RETURN        = RETURN
        KEY           = KEY.
    IF RETURN IS NOT INITIAL.
      WRITE :/ 'Error Occurred'.
    ENDIF.
    Dequeue
    CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
      EXPORTING
        NUMBER        = P0015-PERNR
    regards,
    amit m.

  • Issue with Dynamic Actions - Infotype 0041 Updation

    Hi All,
    Requirement :
    I have to update the Date type-13 ( Resignation Date - DAR11 ) without Date ( DAT11 as Blank value - User will fill through Infogroup ) while performing the Termination action through PA40.
    Added below code in V_T588z (0000):
    I have added 186,188 Lines.Other lines are standard thing.
                  04     180     P     PSPAR-MASSN='10'/X  **Termination
                  04     181     P     PSPAR-MASSN='ZB'/X **Termination
                  04     182     P     PSPAR-MASSN='14'/X  **Termination
                  04     185     I     COP,41,,,(PSPAR-BEGDA),(PSPAR-ENDDA)/D
                  04     186     W     P0041-DAR11='13' **BEGIN & END OF CRA01670 CODE ***
                  04     188     W     P0041-DAR11='' **BEGIN & END OF CRA01670 CODE ***
    Issue :
    1. The above logic is not working for Finland ,other countries. For only India it is working.
    2. Some times Date type-13 is coming twice while through the Infogroup-0041 screen twice,which is incorrect. The infotype-0041 should call only once.I have checked the User parameters,MOLGA,USR. But it is not working.
    2. The standard configuration Date type -09-Last day of work - is working fine . But i could not be able to find ,from where it is coming.I have checked the Dynamic actions,but no use.
    Need your inputs to solve the issue.
    Thanks,
    N.L.Narayana

    P     P0000-MASSN='01'    Action type
    P                   P0000-MASSG="01"   Action Reaosn
    P     T001P-MOLGA='40'
    F                   here u will keep the Call Routine
    I     INS,2001,,,(P0000-BEGDA),(P0000-ENDDA)/D  (here u have pass the date of Call routine )
    W     P2001-IAWRT='01'
    But here Infotype 2001 we will give Absence type this IT is used for Booking Absence Types i did not get the Wage type 8001
    thru which IT are u processing it
    for more info Checjk Tabvke V_T588Z  here iam pasteing the sample call routine which i got from earlier thread
    Create a Program (Subroutine) using SE38. Save and activate it.
    ZZSY_DYA_TEST2
    REPORT ZZSY_DYA_TEST2.
    tables : p0000,p0001,rp50d.
    FORM getdate.
    rp50d-date1 = p0000-begda + 90.
    ENDFORM.
    FORM get_date.
    rp50d-date2 = p0000-begda + 180.
    ENDFORM.

  • Decoupling of customer infotypes; additional update mechanism

    Hi
    I am currently working in a project, were we are trying to decouple a number of own / customer infotypes (9xxx-infotypes), according to SAP's New Infotype Framework.
    In this connection we want to use the recommendations by SAP, stated in the paper: "Business Logic Guidelines for Creating & Migrating Infotypes".
    One of the challenges we have is that in the validation methods of the check class for the indiv. infotypes, we need to update other tables (Z-tables).
    The guideline says: "additional updates for tables that lie outside the PAnnnn name range must be processed via the so-called additional update mechanism".
    Does anyone know what this "additional update mechanism" is? can anyone point me to some documentation regarding this subject??

    If you would like to contact one of the UK based BT Care Team who moderate this forum, they should be able to help you.
    They can be contacted using this link BT Care Team
    They normally respond by phone or e-mail, within three working days, however you should get an immediate confirmation, with a tracking number.
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • OM infotypes not updated with relatioship.

    Hi Experts,
    I made one LSMW to upload info types 0000 (Actions) and 0001 (Org Assignment) using batch input recording method and successfully updated PA infotypes and verified OM info types 1001 (Relationships) for those positions (S) which I assigned new holders (P).
    But OM not got updated and is not showing the holder in those positions which I executed action.
    Can any tell me why it has not updated OM.
    With regards,
    Chandrasekhar
    Edited by: chandra sekhar on Mar 7, 2009 12:22 PM

    means
    run the RHINTE Reports once
    before check all the records exists or not
    u2022     RHINTE00 - Transfer PA Records To PD Positions. In another world, it creates the HRP1001 between P to S in the OM side of the world. When you view a record via IT0001, you see this person holds the position, however via HRP1001, that relationship isnu2019t so.
    u2022     RHINTE10 - Generates the required relevant tables. (T513 - Jobs, T513S - Jobs, T528B - Positions, T528T - Work Center, T527X - Org Unit
    u2022     RHINTE20 - checks for all objects for integration between PA and OM. This is a big one and will take awhile to run. What it does is look at table T513/T513T - Jobs, T528/T528T - Position, and T528X - Org Unit. It will then compare it against the HRPxxxx table to find missing objects. If there are any missing objects, it will create the record.
    u2022     RHINTE30 - Transfer OM to PA. This will create infotype 0001. If the conversion strategy is to have SAP auto inherit factor to kick in for IT0001, often time jobs and org unit are missing via IT0001 during the inital conversion load. RHINTE30 will find the relationship and push it through IT0001.
    Edited by: Sikindar on Mar 7, 2009 12:34 PM

  • OM Infotypes DATA update, create

    Hi,
    My requriement is i need to update the OM infotypes 1001,1005, 1008, 1013,1028.
    I need to build an interface for this.
    The input file is an excel spread sheet.
    I am able to read the excel data to the internal tables.
    Now from internal table I need to update the above mentioned infotypes.
    I am trying with RH_PNNNN_MAINTAIN FM, But this FM is for dialog mode as per my understanding.
    I didnot use this before and not sure how to use this for multiple infotype update and creation of records.
    Can any one help me with sample code.
    Thanks

    Hi
    TRy out the  BDC method. to update the  OM infotypes . Create a single screen in  module pool  and put radios buttons for thses infotype  and perform a call for BDC ,for indivusal  infptype
    Regards
    lakhan

  • Infotype 583 update

    hi all,
    ihve used hr_infoyte_operation for updating 583 but im not abl e to pass Q0583-CNVCD (convayence type ) to FM bcoz its structure is different from infotype 583 sturcture.how to pass that value.i tried to use hr_maintiain_masterdata.but its not working in N mode its working fine with all screens mode.how to solve this issue.need ur inputs in N mode dynamic actions are not geting triggered for infotye8 and ity-008 is not getting updated.

    Hi,
    perhaps you could solve your requirement easier by using function module RH_INSERT_INFTY.
    Dummy Example:
      DATA:
        lt_relation TYPE TABLE OF p1001,
        ls_relation TYPE          p1001.
      ... data determination from file ...
      ls_relation-mandt = sy-mandt.
      ls_relation-plvar = *your plvar from file*.
      ls_relation-otype = *your otype  from file*.
      ls_relation-objid = *your from file*.
      ls_relation-infty = '1001'.
      ls_relation-istat = '1'.
      ls_relation-rsign = *constant if always same objects*.
      ls_relation-relat = *constant if always same objects*.
      ls_relation-begda = sy-datum.
      ls_relation-endda = '99991231'.
      ls_relation-sclas = *your sclas from file*.
      ls_relation-sobid =  *your sobid from file*.
      APPEND ls_relation TO lt_relation.
      CALL FUNCTION 'RH_INSERT_INFTY'
        EXPORTING
          vtask               = 'D'
        TABLES
          innnn               = lt_relation
        EXCEPTIONS
          no_authorization    = 1
          error_during_insert = 2
          repid_form_initial  = 3
          corr_exit           = 4
          begda_greater_endda = 5
          OTHERS              = 6.
        CASE sy-subrc .
      ... error handling ...
    The relation will be created into both directions automatically if it is no external relation of course.
    Kind Regards
    Roman

  • Segment E1PITYP occurs for each subtype of infotypes in update mode

    Hi experts,
    In update mode the resulting IDoc contains segment E1PITYP for each subtype (for example 7) of Infotype 6 (for example) even if it contains no segments of type E1P1001.
    I can see all infotypes and subtypes of the distribution model in the idocs. Even if the employee does not have an infotype or one specific subtype. In this case, node E1PITYP appears without child node.
    Thanks a lot for your help
    Cheers,
    AS

    Hi,
    thanks for your answer.
    Still I am little bit confused and want give an more detailed description of my problem.
    If I export an organizational unit in initial mode I have for example 5 segments of type E1PITYP and each of them has a subsegment (for example E1P1001).
    Export of the same organizational unit in update mode results in more than 200 segments of type E1PITYP and all of them without subsegment.
    This seems to happen for all infotypes (not only 1001 like I thought before).
    Now I want to understand why this happens and if it's possible to update an organizational unit without segments of type E1PITYP that don't have a subsegment.
    Regards
    Patrick

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

  • Infotype: Japan infotype 0002 update

    Hi Experts,
    Can any one help me in creating/Updating infotype 0002 - Personal Data.
    System is not accepting anything in the field "Katakana:P0002-LNAMK"
    In the screen i am not able to trace what is Kanji, Katakana, Romaji.
    Thanks in advance
    TK

    Thanks for the quick responce Sikindar,
    My requirement is what exactly the fields requirement, i am looking for the process, i want to know the link between 0002 and 0148.
    Thanks your reply it is partly answerd my query.

  • Infotype 17getting updated automatically

    I dont understand what is causing infotype 17 (travel privilege) to get updated automatically. Users are claiming that after entering trip request using "trip" when they go to enter traval claims (pr05) the system is throwing this error message "error while reading master account assignment" which is caused because of multiple entries in infotype 17 but I dont understand what is causing this problem.
    I would be grateful if anyone can explain why this is happening and how i can prvent this from happening.

    Thanks Sigi and Sally....
    Sigi you are correct the "Trips Assigned" flag is indeed getting updated but i am certain that the entries are not created from HR-PA. And also i need not go to se11/16 to view the username who created the entries as i can see them when i display the infotype 17.
    The Infotype 17 problem is not happening for all employees but only for cerrtain employees (which i am not able to know beforehand)....I have noticed that the new entries in infotype 17 has the same dates as that of the trip...say if the trip is from 01.06.2011 to 20.06.2011 the new entry in infotype 17 is also created with start date as 01.06.2011 and end date as 20.06.2011..
    I am still confused...I am now thinking may be the problem is occuring because of authorization issues

  • Nomination  591 infotype cant update more than theree entries

    Hi
    In Nominatioin Infotype (0591) Thru BDC or thru Bapi , i cant update more than three relations.
    But thru normal transactions i can update upto five.
    We have chked the bdc and its perfect.
    While tracing it says that that the screen element is missing.
    any suggestion or solution ?
    Regards
    Prem

    Hi,
    1. Check sum of total percentage  to be entered. If required perform data validation.
    2. Check for compulsary fields required for entry ( Tick mark). If required modify screen .
    Hope this helps.
    Param

Maybe you are looking for

  • Automatic generation of report to email

    Hi, Im pretty new to the OBIEE environment and i would like to set up a scheduled job to run a report at a specific time which will email the result in an excel document to my email address. I set up an iBot and saved it to My Folders Condition condi

  • Can I get Premiere Pro CS6 with CC membership?

    I need to download Adobe Premiere Pro CS6 because I recently got hired by a company that works exclusively in CS6 and I need to be able to share projects with them. I was hoping I could download a version of CS6 with my CC membership. I pay 40$ month

  • IChat 5.0.3 to AIM 7.5 video chat problems.

    I could use some help, please?    I have a cousin that live in another state and she wants to video chat with me and my mom. My mom and I have Macs with Snow Leopard and iChat 5.0.3 and my cousin has a PC with Windows 7 and AIM 7.5. Both computers ar

  • Sandisk Compact Flash problem

    I have an older Canon Digital Elph S250 digital camera that uses compact flash media. The CF card can be read fine through a card reader on my desktop Windows XP computer. But when I try to read the card on my Mac using a CF USB reader, it tells me t

  • Can I update my OS X 10.4.11 on my old MacBook?

    can I update my OS X 10.4.11 on my old MacBook?