Need to delimit infotype pa2006 record 'HR_INFOTYPE_OPERATION'

Hi
I need to delimit infotype record of infotype pa2006  in my own function module.
start date =  01.01.2009
delimit date = 01.01.2010
PA2006
  SELECT * FROM PA2006 INTO IT_PA2006
                WHERE PERNR EQ PERNR
                  AND ENDDA LE '99991231'.
  ENDSELECT.
  IF SY-SUBRC = '0'.
    WA_TAB1-INFTY = '2006'.
    WA_TAB1-FNAME = 'P2006-PERNR'.
    WA_TAB1-FVAL = IT_PA2006-PERNR.
    APPEND WA_TAB1 TO IT_TAB1.
    WA_TAB1-INFTY = '2006'.
    WA_TAB1-FNAME = 'P2006-BEGDA'.
    WA_TAB1-FVAL = IT_PA2006-BEGDA.
    APPEND WA_TAB1 TO IT_TAB1.
    WA_TAB1-INFTY = '2006'.
    WA_TAB1-FNAME = 'P2006-ENDDA'.
    WA_TAB1-FVAL = IT_PA2006-ENDDA.
    APPEND WA_TAB1 TO IT_TAB1.
    WA_TAB1-INFTY = '2006'.
    WA_TAB1-FNAME = 'P2006-KTART'.
    WA_TAB1-FVAL = IT_PA2006-KTART.
    APPEND WA_TAB1 TO IT_TAB1.
    WA_TAB1-INFTY = '2006'.
    WA_TAB1-FNAME = 'P2006-BEGUZ'.
    WA_TAB1-FVAL = IT_PA2006-BEGUZ.
    APPEND WA_TAB1 TO IT_TAB1.
    WA_TAB1-INFTY = '2006'.
    WA_TAB1-FNAME = 'P2006-ENDUZ'.
    WA_TAB1-FVAL = IT_PA2006-ENDUZ.
    APPEND WA_TAB1 TO IT_TAB1.
    WA_TAB1-INFTY = '2006'.
    WA_TAB1-FNAME = 'P2006-ANZHL'.
    WA_TAB1-FVAL = IT_PA2006-ANZHL.
    APPEND WA_TAB1 TO IT_TAB1.
    WA_TAB1-INFTY = '2006'.
    WA_TAB1-FNAME = 'P2006-DESTA'.
    WA_TAB1-FVAL = IT_PA2006-DESTA.
    APPEND WA_TAB1 TO IT_TAB1.
    WA_TAB1-INFTY = '2006'.
    WA_TAB1-FNAME = 'P2006-DEEND'.
    WA_TAB1-FVAL = IT_PA2006-DEEND.
    APPEND WA_TAB1 TO IT_TAB1.
ENDIF.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
  EXPORTING
    INFTY                  = 2006
    NUMBER                 = PERNR
   SUBTYPE                = IT_PA2006-SUBTY
  OBJECTID               =
  LOCKINDICATOR          =
   VALIDITYEND            = DATE
   VALIDITYBEGIN          = IT_PA2006-BEGDA
  RECORDNUMBER           =
    RECORD                 = IT_TAB1
    OPERATION              = 'MOD'
  TCLAS                  = 'A'
  DIALOG_MODE            = '0'
  NOCOMMIT               =
  VIEW_IDENTIFIER        =
  SECONDARY_RECORD       =
IMPORTING
   RETURN                 = RETURN
  KEY                    =
Why it is not delimit the infotype record. Let me know if any other way to do the same.

Hi friend please do this
"Need to lock the employee before delimiting
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
    EXPORTING
      number        = px_infty_key-pernr
IMPORTING
       return       = px_bapireturn.
"in the 'HR_INFOTYPE_OPERATION' we need to specify all the details of the infotype what i have mentioned belo
  CHECK px_bapireturn-type NA 'AEX'.
  CLEAR: px_bapireturn.
  CALL FUNCTION 'HR_INFOTYPE_OPERATION'       " Updation of Employee Record
    EXPORTING
     infty                  = px_infty_key-infty
     number                 = px_infty_key-pernr
     subtype                = px_infty_key-subty
     objectid               = px_infty_key-objps
     lockindicator          = px_infty_key-sprps
     validityend            = px_infty_key-endda     "just give the date which you want to delimit with
     validitybegin          = px_infty_key-begda
     recordnumber           = px_infty_key-seqnr
     record                 = px_infty_data
     operation              = lc_mod
     tclas                  = 'A'
     dialog_mode            = '0'
     nocommit               = space
   IMPORTING
     return                 = px_bapireturn
     key                    = px_bapikey.
"Unlock the employee after the operation
  CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'       " Unlock the Employee Record
    EXPORTING
      number        = px_infty_key-pernr.
I think will will solve your problem.
Just try it and let me know if you have any issues.
Thanks and Regards,
Sri Hari Anand Kumar

Similar Messages

  • Delimit Infotype 0105 Subtype 0001

    Hi All
    I am new to ABAP so need help.
    We need to delimit Infotype 0105 subtype 0001 records.
    I tried vai a number of ways but facing issues in someway or the other.
    When I try to do the same via FM: BAPI_HRMASTER_SAVE_REPL_MULT, it creates a new entry for the same record with end validity day as system date (the old record which has end validity date as 31.12.9999 remains).
    When i try to do the same via FM: BAPI_EMPLCOMM_DELIMIT, it throws an error 'EPG                  009No data stored for 0105 in the selected period' even though the record exists.
    CALL FUNCTION 'BAPI_EMPLCOMM_DELIMIT'
      EXPORTING
        employeenumber       = '00000049'
        subtype              = '0001'
        objectid             = 'P'
        lockindicator        = ''
        validitybegin        = '20100701'
        validityend          = '99991231'
        recordnumber         = '000'
        delimit_date         = '20120219'
    *   NOCOMMIT             =
    IMPORTING
       RETURN               = return.
    *   EMPLCOMMKEY          =
    Not sure how to go about it. I searched the forum which suggested to use Function Modules, but even then the issue isn't getting resolved.
    Please help.
    Martin

    Hi
    Your problem is the parameter OBJECTID It doesn't make sense to pass a 'P'.
    Other than that, you just have to lock and unlock the Personnel Number accordingly.
    Regards
    data: return type BAPIRETURN1.
    CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
      EXPORTING
        number        = '00000224'
    * IMPORTING
    *   RETURN        =
    CALL FUNCTION 'BAPI_EMPLCOMM_DELIMIT'
      EXPORTING
        employeenumber       = '00000224'
        subtype              = '0001'
        objectid             = ''
        lockindicator        = ''
        validitybegin        = '20070101'
        validityend          = '99991231'
        recordnumber         = '000'
        delimit_date         = '20120219'
    *   NOCOMMIT             =
    IMPORTING
       RETURN               = return.
    *   EMPLCOMMKEY          =
    BREAK-POINT.
    CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
      EXPORTING
        number        = '00000224'
    * IMPORTING
    *   RETURN        =

  • Procedure to Delimit Infotype 1613

    HI,
    I need to delimit infotype 16313 for about 350 positions whcih are assigned to single Worker compensation code. Accept PP02 anyone pleasee let me know hos can i do this in bulk. Is there any fast entry or any programe to delimit WC code entries for all the positions at a time?
    Please help me in this.
    Thanks & Regards,
    Naga

    Hi Naga,
    Try transaction RE_RHGRENZ2.
    Good luck,
    Dilek

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

  • BAPI to delimit Infotype 0017.

    Hi All
    Is there any BAPI to delimit the Infotype 0017? Is yes, please provide me with a sample code of what all values to pass.
    I tried searching on the forums but couldn't get it.
    Thanks in advance.
    Harsh

    Hi,
    1.Check the time Constraint of infotype 17.
    2.You can use Function Module -
        call function 'HR_INFOTYPE_OPERATION'
             exporting
                  infty         = '0017'
                  number        = employeenumber
                  validityend   =   validityend ( delimit date
                  validitybegin =  validitybegin
                  record        = p0017 (infotype 17 record)
                  operation     = 'MOD'
                      tclas         = 'A'
             importing
                  return        = ls_return
                    key           = lv_emplcommkey.
             exceptions
                  others        = 0.
    Or operation 'LIS9'
    Regards,
    Manoj.

  • I need the code to delete record in the database not in the form???

    I need the code to delete record in the database not in the form...
    because when i execute a form always insert the datas in the data base but i want insert value on a text file and delete in the data base the record whith this value of text file.
    i'm spanish an my english is bad sorry.
    thank, javier

    Well, I fail to understand why you want to complicate easy things, but anyway you can do that by using TEXT_IO within Forms to create text file (see Forms builder help), and UTL_FILE package to read it within Pl/Sql : you could create a stored procedure, and call it from Forms passing the file name as parameter. See UTL_FILE documentation

  • I need a app which can record incoming and outgoing calls automatically without internet

    i need a app which can record incoming and outgoing calls automatically without internet.
    Can some help me on this ?

    As far as I know there is no app to record phonecalls because US regulations, but I am not using iphone in US so we definately need call recorder. HTC or Samsung has call recorder so why we dont?

  • Need to delimit an insurance plan

    Hello, I currently need to delimit a life insurance plan that is no longer in use.  I am in the "Define Insurance Plan General Data" section of SPRO.  When I choose the plan, and then the delimit button, a screen pops up asking for a date.  But what happens with this date is that it becomes the start date of a new date range (i.e 10/01/2008-12/31/9999) for the plan, as if I made a change to the plan.  This is not what I want.  What am I doing wrong? Is there a more appropriate way to do this? Please advise. Thanks

    It's showing a date range because going forward your plan is closed.
    For example:
    From your Beg date thru 10/13/2008  your plan is open and then
    as of 10/14/2008 thru 12/31/9999 you still have the plan but the status is now closed.
    Chris

  • Need help to fit the records of a table into a particular region

    Hi All,
    Need help in getting the records of table to be fitted into a particular region provided for it. But in my case as the records increases the textbox below are moving down accordingly into next page that i dont want.  
    As shown in the below image i have to fit 22 no. of records in that given area only not disturbing the below textbox alignments.
    Thank in advance...
    Sreekanth Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem.*****

    Hello,
    In SSRS, Report items within a report can be
    kept together on a single page implicitly or explicitly by setting the keep with group or keep together properties.
    In your case, you can try to specify the "KeepTogether" property to True on the Table properties windows.
    If there are other report items  under or above the Table and you want keep all items on the single page, you can try to add a Rectangle and put all items into the Rectangle.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Need help pointing email mx records to correct locations

    Hello,
       My customer stopped recieving emails when I took his site live with BC. I called Godaddy who his email was already set up with. They told me I needed to get two mx records pointed to the correct locations. THey gave me the locations, but I can not find where I can change them in Muse.
    Thank you in advance for any help that masy be offered.

    Hi,
    Are you still experiencing this issue. If yes, please let me know and I will help you further.

  • Do we need to create the mx records if the send/receive the mail in the same organization?

    1,May I know do we need to create the mx records if we send/receive the mail in the same organization?
    2,If we send /receive the mail between two different organization/forest, we need to create the mx records  ,is it right?
    Please click the Mark as Answer button if a post solves your problem!

    1,May I know do we need to create the mx records if we send/receive the mail in the same organization?
    2,If we send /receive the mail between two different organization/forest, we need to create the mx records  ,is it right?
    Please click the Mark as Answer button if a post solves your problem!
    for 1. If you mean the same Exchange org, no.
    For 2, it depends. You need a MX record for your receiving SMTP server ( At least, You *should* have one), but if sending to another org, not necessarily, as you could smarthost messages to it and a MX would not be required.
    Just curious, what problem are you trying to solve?
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • Infotype 0002 record being created with language 'Z1' and not 'EN'

    Approximately 50% of our Infotype 2 records exist with the language field value as 'Z1'.
    This wasn't captured manually, and our config is set up for 'EN'.
    Please advise how this could have occured.

    Look at T-code RZ11 with system  parameter "zcsa/system_language"  OR search for  "system_language".  I think, it got setup with wrong language i.e. Z1
    ^ Saquib

  • PP02: Create Qualification Management (infotype 1055) record for a job

    Hi Experts,
    I would like to create Infotype 1055 records via PP02 for a job (Otype: C). I'm able to create Object type 'Qualification' and Object id 'XXXXXXXX'. There is another field Proficiency which is disabled. But we do want to maintain Proficiency at this point.
    When I checked the code behind the screen, I found that this field is enabled for input only when the OTYPE is 'QB' (Qualification Block).
    How do I enable this in order to maintain it. Any user exit/config setting to enable it would be highly appreciated.
    Regards,
    Ramesh

    Suresh/Om, Thanks for the quick replies. My screen MP105500 (screen 2000) is not available in T588M. So I thought I cannot use this method.
    Gary, I do not want to use PPPM as it is difficult to manage it via BDC or LSMW and the most important thing is that PPPM creates relationships but I want to create entries in HRP1055.
    Any other ideas/thoughts ? My first thoughts are to use an enhancement. But couldn't find one.

  • HR_INFOTYPE_OPERATIONS    deleting infotype 2006 record

    Hi I am trying to use the delete function of HR_INFOTYPE_OPERATIONS and it returns EP2                  375Record already deducted (deletion not possible).
    LOOP AT it_2006 WHERE ktart NE '97'.
        CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
          EXPORTING
            number = it_2006-pernr
          IMPORTING
            return = return.
        CLEAR return.
        CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            INFTY         = '2006'
            number        = it_2006-pernr
            subtype       = it_2006-subty
            objectid      = it_2006-objps
            lockindicator = it_2006-sprps
            validityend   = it_2006-endda
            validitybegin = it_2006-begda
            recordnumber  = it_2006-seqnr
            record        = it_2006
            operation     = 'DEL'
            tclas         = 'A'
            DIALOG_MODE   = '0'
          IMPORTING
            return        = return
            key           = key.
        COMMIT WORK.
        CLEAR return.
        CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
          EXPORTING
            number = it_2006-pernr
          IMPORTING
            return = return.
      ENDLOOP.
    Please assist

    Hi,
    Debug the code and see for that pernr, the values passed to FM.
    For the same values try doing it manually through PA30 if it gives the same error.
    Regards,
    Sumit

  • Error while modifying HR infotype PA0105 using HR_INFOTYPE_OPERATION

    Hello All,
    I am not able to modifying the infotype PA0105.
    Currently I am using the FM HR_INFOTYPE_OPERATION.
    But I am not able to modify the record.
    Has anyone faced any such situation...
    Please help..!!
    Useful pointers will be appreciated...
    Thanks & Regards,
    Tarun Gambhir

    Hope this helps you out...
          C_INS   LIKE PSPAR-ACTIO VALUE 'INS',
          W_000-PERNR = T_SAIDA-PERNR.
          W_000-INFTY = C_0000.
          W_000-ENDDA = C_DATA.
          W_000-BEGDA = T_PA0000-BEGDA.
          W_000-AEDTM = SY-DATUM.
          W_000-UNAME = SY-UNAME.
          W_000-MASSN = C_16.
          W_000-MASSG = S_MASSG-LOW.
          W_000-STAT1 = SPACE.
          W_000-STAT2 = C_3.
          W_000-STAT3 = C_1.
          W_PSPAR-PERNR = T_SAIDA-PERNR.
          W_PSPAR-INFTY = C_0000.
          W_PSPAR-PLANS = T_P0001-PLANS.
          W_PSPAR-WERKS = T_P0001-WERKS.
          W_PSPAR-PERSG = T_P0001-PERSG.
          W_PSPAR-PERSK = T_P0001-PERSK.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY            = C_0000
              NUMBER           = T_SAIDA-PERNR
              LOCKINDICATOR    = SPACE
              VALIDITYEND      = C_DATA
              VALIDITYBEGIN    = V_BASE
              RECORD           = W_000
              OPERATION        = C_INS
              SECONDARY_RECORD = W_PSPAR
            IMPORTING
              RETURN           = T_RET_FUNC                     "#EC *
              KEY              = T_KEY.                         "#EC *
    Greetings,
    Blag.

Maybe you are looking for

  • App-V 5 SP1 Creative Cloud Enterprise Illustrator 213:19 Error

    Hello, I'm currently working on creating an App-V 5 sequence for Adobe Creative Cloud Enterprise. Firstly I'm trying to create a sequence for CC Illustrator, however I'm running into what appear to be licensing errors. From what I understand in Adobe

  • IPod Update to version 1.2.3

    I recently reinstalled Windows on my comapaq presario. I had transferred my music to another hard drive and have moved my music back into itunes. I authorized this new "computer". When I plugged my iPod into my computer it asked to install software u

  • How restore database only with dbf, ctl, and redolog file

    Hi friends, I had a database oracle 11g, but the server was crashed. Then I just rescue only the files DBF, CTL, and REDOLOG. But I couldn't rescue the spfile and pwd file. How can I restore this database in other server? How can I recreate the spfil

  • Crystal error: A summary has been specified on a non-recurring field.

    Hi, Im encountering the following error while trying to aggregate a formula field  in one of my reports: "A summary has been specified on a non-recurring field" The report calls a subreport in the details section which returns a shared currency varia

  • Character spacing when print

    Hi, How can I set the character spacing when I printing? eg. 10 CPI or 12 CPI etc. /CPI=Character Per Inch/ thx.