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.

Similar Messages

  • Problems in updating infotype 0008

    Hello,
    I' am trying to insert a record into infotype 8. But not all wage type amounts should get reflected in the total salary. How is it possible? Is it through OPKXX field, if so how?
    Thanks,
    Aravind

    I think that you need to check the section in the IMG  under
    Personnel Management - Personnel Administration - Payroll Data - Basic Pay - Define annual salary
    Under this you can check the "Relevant wage types for annual salary valuation" to check that all of the wage types you created on infotype 0008 are included in the annual salary.

  • UPDATING INFOTYPE

    Hi Experts
    I have one problem in updating infotype using
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
    INFTY = '2001'
    NUMBER = pernr
    SUBTYPE = subtype
    VALIDITYBEGIN = validitybegin
    VALIDITYEND = validityend
    RECORD = wa_inf_2001
    OPERATION = action "INS,MOD
    IMPORTING
    RETURN = return
    KEY = key
    EXCEPTIONS
    OTHERS = 3.
    This is working fine for first time operation but when i want to overwrite it .
    Is is displaying as page can not be displayed .
    i.e if updating infotype with same veluse for two times
    i.e duplicationg the values then it is showing error .How to solve it
    Thanks
    Prasad

    1) as suggested by Suresh first check the return table to know exaclty the error mesage.
    2) u can update a IT with same values i don think it wil have a problem
    3) to me it looks that it is due to PERNR locked ,as when u r updating it first time the pernr is locked and when u r trying to update it again in the same session it must be failing due to pernr looked..
    so before using FM to update IT ,use Fm -
    CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
      EXPORTING
        NUMBER        = number .
    IMPORTING
      RETURN        =          .
    and after tht call FM to update IT and then call below FM to unlock employee-
    CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
      EXPORTING
        NUMBER        = number.
    IMPORTING
      RETURN        =          .
    this will solve ur probelm .
    amit

  • Updating infotypes

    Hi Experts
    I have one problem in updating infotype using
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY                  = '2001'
              NUMBER                 = pernr
              SUBTYPE                = subtype
              VALIDITYBEGIN          = validitybegin
              VALIDITYEND            = validityend
              RECORD                 = wa_inf_2001
              OPERATION              = action  "INS,MOD
          IMPORTING
             RETURN                  = return
             KEY                     = key
          EXCEPTIONS
             OTHERS           = 3.
    This is working  fine for first time operation but when i want to overwrite it .
    Is is displaying as page can not be displayed .
    i.e if  updating infotype with same veluse for two times
    i.e duplicationg the values then it is showing error .How to solve it
    Thanks
    Prasad

    <i>This is working fine for first time operation but when i want to overwrite it .
    </i>
    To Insert, you need to pass the action 'INS'
    To Modify action needs to be 'MOD'
    <i>ts is displaying as page can not be displayed .</i>
    To get the exact error message, please do the following settings in IE Browser:
    Tools -->Internet option--> Advanced(Tab) uncheck the "Show Friendly HTTP error messages".
    Raja T

  • Facing problem while updating IInfotype 0009-bank details through workflow

    Dear SAP Gurus,
    I am facing a problem while updating Infotype 0009 through workflow which is integrdated with portal.
    Scenario:
    Employee logins to portal and changes his/her bank details like payee name, bank key, account number, postal code and city of bank, bank name etc.
    Once he submits the request, my workflow is triggered through SAP_WAPI_START_WORKFLOW which is called from portal and goes through various approval steps and finally reaches the step where the container elements are finally to be updated in IT0009.
    Field bank account number (BANKN), which is part of table PA0009 are easily updates using the FM HR_INFOTYPE_OPERATION by first enqueuing the employee number and after the update dequeuing it.
    However fields like payee name (EMFTX) bank key (BANKL) , bank name(BANKA -structure BNKA_BF-this is automatically fetched based on bank key) and postal code(BKPLZ) and city of bank (BKORT) are from structure Q0009 (on the infotype 9 screen level) and from table BNKA (at table level). The problem is that these are not getting updated by HR_INFOTYPE_OPERATION as they are not the part of infotype 9.
    Can anyone help me to understand how can these fields be updated ?
    Quick help will be highly appreciated.

    Hi Spantaleoni,
    Thanks for your quick response.
    Well actually the table BNKA is a master table for the bank information and we must not create entries in it or update the table programatically,  rather we should  use the available data in it.
    Now say employee currently has bank as A and he wants to change it as B which is available in BNKA then he will just select the bank B from search help provided in portal which again comes from table BNKA only. Employee then submits the info and it must get updated in the infotype PA0009.
    As far as think, this should be done on screen level of infotype PA0009 as I have already mentioned that certain fields are coming from structure Q0009 and they cannot be updated on PA0009 table level.
    I am just looking for way through which I can update the screen of infotype PA0009 of employee through workflow.
    Regards

  • Leave approved in Portal is not getting updated in Infotype 2001

    Hello,
    I am using the standard WF - WS12300111 for Leave Request in the Portal.
    The workflow is working fine in the portal; Manager could approve / reject the leave request in MSS and it is updating the portal Team calendar and ESS Employee Leave details.
    However the approved leave is not getting updated in the Absence infotype 2001 in the back-end system.
    Could you help ? 
    Kind Regards
    Desy

    Program (SE38) - RPTARQPOST has to be scheduled in order to update the status of leave requests and post to PA2001 after they have been approved.
    Is there any other way ?

  • Updating Infotype 0025 from acustom table....serious problem

    Hi, 
       I'm having a requirement to update Infotype0025 from a custom table.
         Does any REPORT exist already to update Infotype 25 or others from a custom table following time constraint 1 delimiting the older record and creating the new one from the Appraisal date to '12/31/9999'?
       Or any such scenarios faced by experts ?
    Regards,
    Jyoti

    Hi,
    You have to go for a Custom Z-report & use FM
    <b>"HR_INFOTYPE_OPERATION'</b>.
    Hope this helps.
    Thanks,
    Sarika.

  • Absence amount in infotype 2001 without taking wrok schedule into account

    Hello
    We are using CATS. For the purpose of available hours of an employee only the total of a week is needed. So for instance 25 h/week. We set up a week workschedule 25h/week with day schedule of 5 hours per day (hours evenly spread over the 25 hour week). However, I run into the problem that when I want to enter a leave in infotype 2001 for a certain day only 5 hours is allowed. But I need/want to enter 8 hours in infotype 2001 (user works 8, 8, 4, 5, 0).
    If it works in infotype 2001 then it will also work in CAT2 and CAT6. Can anyone explain me how to set this up. I checked the following:
    V_001P_D- Group Personnel Subareas for Attendances and Absences
    V_T554S-Define Absence Types
    V_554S_O - Determine Entry Screens and Time Constraint Classes
    V_T551C - Define Counting Classes for the Period Work Schedule
    V_503_E -Group Employee Subgroups for Time Quotas
    V_001P_I - Group Personnel Subareas for Time Quotas
    V_556R_B- Deduction rules for absence quotas
    T556C- Counting rule
    V_554S_Q - Assign Counting Rules to Absence Types
    V_554Y_B and table V_T554Y
    But I got lost somewhere in the tables above, the entries seem fine. I thought I had it with table V_554S_O where I set the availability on 9, but that did not help.  The field "whole day" (P2001-ALLDF) is grayed out next to the field number of absence hours (P2001-STDAZ). We only us HR for CATS purposes.
    I think I'm overlooking something for a particular setting in one of the above tables? I'm not an HR consultant so .... tabel V_556R_B is a very cryptic one for me. Further in table T556C I checked and unchecked "Work according to daily work schedule", but still no effect, also other combinations..... Also this table T556C I do not understand....
    What I only need is specfic settings so that I can enter more absence hours in 2001 then in the workschedule is permitted. No updates in any other infotypes are necessary. From the help documentation it seems possible, but I don't seem to get it working....
    Thanks in advance.
    Kind regards
    Mirko
    Edited by: Mirko Polisini on Feb 8, 2009 9:50 PM

    Hello,
    We need to implement HR as lean en mean as possible, so time evaluation is no issue. Just want to post 0190 (Leave) in infotype 2001, 8 hours for a workschedule day that for instance only has 5 hours. Else user needs to create 2 lines in CAT2, 5 hours and another on same day with 3 hours. During CAT6 I get the problem that the 3 hours cannot be posted, besides the fact that this workaround is very userunfriendly.
    Hoping that setting up infotype 2003 is not necessary, makes just things more complex (HR is just a means to an end for using CATS). Does it mean that I then need to create and absence type that is attached to infotype 2003? How does it work?
    Thanks in advance for your help.
    Kind regards,
    Mirko

  • ESS MSS leave workflow problem when updating IT2001 & IT2006

    Dear all,
    We have one issue in our production portal leave system. Hospitalization leave was applied for 22.06.2011 to 28.06.2011. Workflow was done properly. I checked workflow log also. It was done properly. But some how Infotypes 2001 and 2006 were not updated at all for the leave applied. I don't understand what could be the problem. I checked the leave table PTREQ_HEADER. I could see the below statuses.
    1. SENT
    2. APPROVED
    3. ERROR
    4. POSTED.
    I want to know how the update to IT2001 & IT2006 missing. Is there any special program to post the data to IT2001 and IT2006 .
    I appreciate your inputs.
    Regards,
    Venkat.O

    Hi,
    Hmmm, clearly there had been some problems due to the ERROR status. Do you know who managed to fix the problem (and how) (for example check the POSTED line in table PTREQ_HEADER and check last changed (or similar) field. Maybe someone tried to manually handle the error and caused the problem.  Could you get some more information about the error in PTARQ?
    Actually from my point of view this is not a wokflow problem at all. Could you just ask the HR guys to fix it? Isn't it possible to make the infotype entries directly with PA30?
    Regards,
    Karri

  • 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

  • How to add details of absences in absences Infotype 2001 for previous dates

    Hi Experts...
    In  my clients company....  one of  Personnel subareas employees leave records are not updating in
    2001 Infotype.
    Now they wish to have to update in 2001 Infotype.
    What is the implication for this new changes in absences records.
    What are the different methods to upload these absence data to the employees.
    How can we upload these data with in a short span time.
    Please advice.
    Thanking you.
    Regards,
    sai

    HI Dilek....
    Thanks for the reply.
    Here it s not possible to change payroll period every time.
    As because the employees leave records are there from year 2007 in different months.
    I will put the status as Release dfor correction.
    What changes to be done with payroll status infotype.
    there is no need of running retro for the above changes we made.
    What could be the optimum solution.
    Regards,
    Sai.

  • PCL4 TABLE LOG FOR INFOTYPE 2001 IS NOT WORKING IN QUA 070 CLIENT

    Heloo,
    Could some one let me know the ways to capture the log of infotype 2001.
    I have used PCL4 table to capture all the changes made to INFTY 2001.
    This is working fine in DEV 070.
    But not working in QUA 070.
    Could someone let me know what is the problem and the solution.
    Thanks a lot for your efforts.

    Hi Lata!
    I created the absences (T554S):
    Ps grouping, Absence type text
    04,0100 VACATION WORKIN DAYS (quota working fine)
    34,0100 VACATION NATURAL DAYS
    When I check your steps I have this information
    1. Absence type screen no. should be 2001.
    I have checked in table T554S.
    Screen number quota working fine: 2001
    Screen number quota working bad: 2001
    2. Quota deduction should be selected in V_554S_Q table
    Check quota deduction quota working fine: is checked
    Check quota deduction quota working bad: is checked
    3. Check that in counting rule you have assigned correct deduction rule.
    Counting rule for quota working fine: is 010
    Counting rule for quota working bad: is 030
    The counting rule 030 is created for me, maybe this is the problem is a similar copy of the rule 010. It has different conditions because in Psgroup "04" the vacations are working days but in group "34" the vacations are natural days.
    4. In deduction rule check whether correct quota no. you have maintained.
    In deduction rule working fine the absence quota type is 10, standar leave, days
    In deduction rule working bad the absence quota type is 30,                        ,days
    I've checked the absence quota type and are similars:
    In 10 absence quota type
    ESG Time quota types: 1
    PS Grpg tm Quota Typ: 01
    Absence quota type: 10
    Time/measurement unit: Days
    Time constraint class: 02
    In 30 absence quota type:
    ESG Time quota types: 3
    PS Grpg tm Quota Typ: 02
    Absence quota type: 30
    Time/measurement unit: Days
    Time constraint class: 02
    What's wrong?
    Kind regards,
    Julian

  • DOubt ABAP HCM infotype 2001.

    Hi Gurus.
    I'm started a process in SAP portal to change pernr in infotype 2001 ,but it don´t worked (but is showed message ok ).
    In my rfc is called the 'HR_INFOTYPE_OPERATION' .
    I need understand ,why don´t worked.
    maybe could have any MP... program with wrong logic?
    what the programs MP to infotype 2001?
    You have any suggest for solution this case? thanks.

    Thanks for Reply Jozef.
    I guess I did not explain properly.
    I'm working with a HCM portal and I have a problem when I go to change the data for the time bank employee.
    If I change the field action (in my language is "acão") then it does not change and back to the value it was before.
    Then in debug it pass by 'HR_INFOTYPE_OPERATION' .
    I need undesrtand why don´t change de action of bank employee.
    I think could be a MP... program with z code like exit , but i need know how find it
    inside standard code of 'HR_INFOTYPE_OPERATION'.
    The parameters of HR_INFOTYPE_OPERATION' :
    infty = 2001
    number = 00029381
    subtype = 0599
    validityend = 20140801
    validitybegin = 20140801
    objectid = space
    lockindicator = space
    recordnumber = space
    record  - with structure with data
    operation = MOD

  • Change infotype 2003 when changing infotype 2001

    Hi,
    When changing some infotype 2001, I need to make a change for the same date in infotype 2003. So, I'm using BADI HRPAD00INFTY, method BEFORE_OUTPUT so I can change infotype 2003.
    I already can change the infotype in that BADI, but after changing infotype 2001, which means on PAI, it seems that the old value of infotype 2003 is saved in memory, so it does not assume the new value there, and it gives me a warning message that I want to avoid with this development.
    When I leave the transaction, infotype 2003 is updated, so that is working.
    Do you have any idea how can I save the change in infotype 2003 in memory, so when changing 2001 it will recognize it?
    Thanks in advance.
    Best regards,
    Sónia Gonçalves

    You can try using the function call 'HR_INITIALIZE_BUFFER'.
    Arya

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

Maybe you are looking for