Deleting the infotype 14

Hi Gurus,
  Am developing the program in which for the given subtype for the infotype 14 all the records should be deleted for that date selection. For this I write a program given below. It show that the Error 009No data stored for 0014 in the selected period Although the data is there. Please tell me where the error in my program.
*& Report  ZDEL14_SUBTYPE
REPORT  zdel14_subtype.
TABLES : pernr,
         pa0014.
INFOTYPES : 0001,
            0014.
DATA : BEGIN OF it_p0014 OCCURS 0.
        INCLUDE STRUCTURE p0014.
DATA : END OF it_p0014.
DATA : zp0014 TYPE  p0014.
SELECTION-SCREEN BEGIN OF BLOCK days1 WITH FRAME TITLE text-s02.
PARAMETER p_wage TYPE p0014-subty OBLIGATORY.
SELECTION-SCREEN END OF BLOCK days1.
DATA : return LIKE bapireturn1.
AT SELECTION-SCREEN.
  IF pnpbegda IS INITIAL OR pnpendda IS INITIAL.
    MESSAGE 'Enter Date' TYPE 'E'.
  ENDIF.
START-OF-SELECTION                                                   *
START-OF-SELECTION.
GET pernr.
  rp_provide_from_last p0001 space pnpbegda pnpendda.
  PROVIDE * FROM p0014  BETWEEN pnpbegda AND pnpendda
    WHERE p0014-subty EQ p_wage .
    PERFORM delete14.
  ENDPROVIDE.
END-OF-SELECTION.
*&      Form  delete14
      text
FORM delete14.
  CALL FUNCTION 'DEQUEUE_ALL' .
  CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
    EXPORTING
      number = p0014-pernr.
  IF sy-subrc NE 0.
    MESSAGE 'Unable To Insert. Release Lock Keys' TYPE 'E'.
  ENDIF.
p0014-BETRG = 0.
  CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
      infty         = '0014'
      number        = p0014-pernr
      subtype       = p_wage
      objectid      = p0014-objps
      lockindicator = p0014-sprps
      validityend   = p0014-endda
      validitybegin = p0014-begda
      recordnumber  = p0014-seqnr
      record        = p0014
      operation     = 'DEL'
      tclas         = 'B'
      dialog_mode   = '0'
      nocommit      = ''
    IMPORTING
      return        = return
    EXCEPTIONS
      OTHERS        = 0.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
  CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
    EXPORTING
      number = p0014-pernr.
  IF return-number NE 0.
    WRITE :/ p0014-pernr, 'IS NOT DELETED' ,return.
  ENDIF.
ENDFORM.                                                    "delete14
Points will be awarded
Thanks
Ravi

Hi Gurus,
  Problem Solved by my own. i used the
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0014'
number = p0014-pernr
subtype = p_wage
objectid = p0014-objps
lockindicator = p0014-sprps
validityend = p0014-endda
validitybegin = p0014-begda
recordnumber = p0014-seqnr
record = p0014
operation = 'DEL'
tclas = 'B'
dialog_mode = '0'
nocommit = ''
IMPORTING
return = return
EXCEPTIONS
OTHERS = 0.
for the function module. ITs working.
Thanks
Ravi

Similar Messages

  • Deletion of infotype 0008

    Dear Team,
    One of our client wants to delete the infotype 0008.
    Kindly suggest how can we delite.
    Thank you,
    Regards,
    Rakesh 

    Hi Rakesh,
    In case payroll is executed for the particular employee / group please delete the results before you delete the infotype 0008. PU01 is the T-code to delete the payroll results. Once the results are deleted and then delete the infotype 0008 through tool bar -> Utilities-> delete personnel no -> Infotype 0008. For your reference find the screen shot below
    PU01 ->
    Deletion of Infotype 0008
    Regards,
    Basanthi

  • Deleting the personal number

    Hi Experts,
    I am trying to delete the Personal number of having Infotype 9001.When i tried to delete in PU00 tcode it is not able to delete the infotype can any one help for this solution.How to delete the infotype.This is urgent.

    You can delete the infotype from PA30. The only thing is u need to check if the time constraint for infotype is 1, then you need to change is for moment and delete the records. Once you deleted, you set it back to as original.
    BTW i am not sure why you are not able to delete it directly from PU00. May i know what is the error you are getting in that.
    Edited by: Praveen Tiwari on Aug 25, 2011 12:48 PM

  • How to delete the customer include in an infotype

    hi to all experts,
    i have created a ci include in an infotype . i want to delete the fields in that CI Include
    Edited by: mohammed  abdul hai on Apr 13, 2009 11:58 AM

    If you want to delete all fields of the customer include do the following:
    - SE11
    - mark 'Data Type'
    - put in the name of your customer include (e.g. CI_P0491)
    - click on the delete button
    - you'll get a warning, that this include is still used and that all dependent tables will be regenerated
    - confirm
    - customer include is gone
    - In case you already added those fields to your infotype maintenance (PA30) through transaction 'PM01' you will get a dump when using PA30 for that infotype because it still tries to access the additional fields which do not exist in the dictionary any longer. You need to remove your custom fields from the infotype. Go to SM30 for table T582C and you'll find the custom includes that were generated. Just remove the entries for your infotype and you shouldn't get the dump any more.
    Hope that helps,
    Michael

  • History of the Infotypes deleted through PA30.

    Hi FOlks,
    Is it possible to see the history of the Infotypes deleted through PA30.
    Eg: In IT2001 sick leave applied on 20.01.2009 being deleted though PA30. After this deletion, would we be able to see who has deleted and what record has been deleted???
    If u2018yesu2019 wht is the tcode to see that???
    Rgds,
    Sekar.

    Hi,
    As mentioned by Archana,
    SE38 > RPUAUD00 > execute > Give PERNR in personnel number field > give IT2001in infotype field > select long term documents > Excecute > Double click on particualr recors > the you can see old value and new value. There is column named action. From that column you can see whether particular record is created or updated or deleted....

  • Deleting the option of "unknown gender" in Infotype 0002

    Hi,
    I need assistance in deleting the unknown gender option which is input in the gender data feild when maintaining the Personal data Infotype.

    Hi,
    Gender field comes from 'GESCH' Domain and. Unknow is one of the fixed value for the domain.
    As per your requirement, you need to perform modification which is not recommended by SAP. But, if it is the requirement, following options are available:
    1. Assign Custom Domain ZGESCH with Male/Female to Data element GESCH.
    2. Modify Domain GESCH, remove unknow from Fixed value.
    Thanks and regards,
    Dharitree

  • Want to delete the records from Standard Infotype where PERNR is Blank

    HI Experts,
    I have a simple problem.
    There are few blank PERNRs are in infotypes PA0001 and PA0002 in Production.I have to remove them.
    These blank PERNRs records are populated there because of some mistake.
    This can not be done in production.
    I have checked many FMs ,but couldnt find the correct one.
    Now I want to use a simple query to delete the records.Please tell me the query to delete the records.
    First i used to read these empty records but failed to do so by the following query.
    select * from PA0001 into table it_pa0001
         where PERNR = ' ' .
    This query is not reading any record.
    I used PERNR is NULL then also it is not working.I used other key fields but it is fetching other records then blank PERNRs.
    Kindly suggest.
    ~Sachin

    PERNR is key field in all infotypes, while for all FMs which work with infotypes this field is obligatory . Such entry should never come to production. If this happened, this should be removed by some backdoor operation. Direct table record deletion I guess is here the only (though not necessary safely) way of handling that.
    Correct query would be
    select * from PA0001 into table it_pa0001
    where PERNR = '00000000' .
    PERNR is of type NUMC 8, so default value is not space but 8 zeros.
    Regards
    Marcin

  • Can we delete the existing fields in standard Infotypes.?

    can we delete the existing fields in standard Infotypes? if it is possible give me the procedure.

    Hi,
         use transaction code PU00
    Or
    u should use HR_INFOTYPE_OPERATION function module.
    This is the std one for all he infotype related operations.
    Regards

  • How to delete  the record  of saved HRA Details...

    Hi Experts,
    I have put the details of HRA Correctly.But while updating HRA In 0008 Infotype i wrongly updated the wagetype,How should i change the Wagetype.
    When i m trying to delete it is showing  RECORD CAN NOT BE DELETED (TIME CONSTRAINT 1).
    How can delete the record.
    Thanking u .
    Sai

    Hi
         Hope doing well ........ No need to delete any infotype but u can go to PA30 and in change mode their u can delete the wagetype which is wrongly entered
    Rajeshk

  • Error While deleting PF Infotype

    Hi Expert,
    I have a query. For one employee PF is not eligible. But while performing hiring action end user wrongly maintained PF IT. And also payroll run had been for that employee for 1 month. And After running the payroll they identified he is not eligible for PF.
    So when I was trying to delete that IT it is not allowing me to delete the PF IT but giving an error message.
    Record cannot be deleted (Time Constraint 1).
    And I also tried to delimit, but giving the same error message.
    Can any one help me to solve this error.
    Regards,
    R. Arokia Merlin

    Hello Arokia
    One way is change the time constraint (customiztion or go to PM01 & then infotype characteristics) of the Infotype to 3 then delete the record and change back the time constraint to 1
    hope this solves your query

  • Sap hr - deleting custom infotype

    Hi,
    Is it possible to delete custom infotype ?
    If I delete a custom infotype, will I be able to use the same code to create a different custom infotype.
    Rgds,
    Santosh

    Hi Remi,
    Thanks for your reply.
    Sorry, I have taken long time to reply.
    I will provide the details :
    I have created custom infotype having two fields.   The data is selected from the master tables.  We have created few records for the period 01.04.2012 to 31.03.2013.  Now, the functional team wants to add new data to the Master Tables and remove some of the existing fields from the Master.  I can add new fields to the master and it will get added as f4 field help.  However, if I remove the data from the Masters,  there will not be entries in master for the said records. 
    I am referring to PRD System.
    Hope I have clarified the things.
    Rgds,
    Santosh

  • RHINTE00 - Position and org unit deleted in infotype 0001 not transferred

    Hi all,
    we are using report RHINTE00 to transfer the assignations with positions and org units made in infotype 1 to PPOME.
    Everything works fine when we are assigning a position and org unit.
    But when we remove the entry and run the report, the assignation in the PPOME still exists..
    Do I have to do something special to delete the relationships ?
    thanks in advance !!

    Hello,
    If you have terminated some employees, to remove relationship without existing objects, you have to use report. RHCHECKRELATIONS. Then if you just need to delimit them, make sure that org. unit exists in table T527X and rerun report RHINTE00. Hope it helps,
    Regards
    Christine

  • How to delete HR Infotype Change log

    Hi,
    I would like to know if there are any means to delete the HR infotype change log. I've already executed the standard program RPUDELPN to delete all the employee records every time an environment is refreshed from the production image, however both the long term and short term infotype change log can still be access. I need to remove those change logs as well to prevent unauthorized access to these confidential data.
    Thanks a lot.
    Francis

    Thanks. However, I'd like to know if I can delete the change documents that were already logged.
    My scenario is that in production environment, we have turn on the logging and change documents are already created. Now we have refresh the development environment with the production images, so I've to delete all the employee records as well as the change documents in order to prevent unauthorized access to these confidential information.
    The standard program RPUDELPN already delete all the employee records but not the change documents. Where and how can I delete both the long and short term document as well?
    Thanks.

  • Deleting an Infotype with Time Constraint 1 - programatically

    Hi there,
    We have a few records (IT0008), that need to be deleted. Unfortunately, when we use PA30 to delete, it won't delete the record(s). (Displays the error msg. "Record has time constraint 1" ) But, when we use the Utilities option in PA30 and go thru', it appears to successfully delete the same.
    Now, could somebody pl. let us know how to go abt. doing the same programatically in ABAP ? I've tried looking at the FM's HR_MAINTAIN_MASTERDATA and HR_INFOTYPE_OPERATION (without much luck though....Although, SAP claims to have a documentation of these FM's, there is actually no proper docmn. at the Field level of these FMs)
    Moreover, the FM HR_MAINTAIN_MASTERDATA returns exactly the same error "Record has time constraint 1".
    Am a bit baffled as it is...
    Any help would be gratefully acknowledged and appreciated.
    Many thanks in anticipation,
    Kind Regards,
    RVS

    there is no function module to do forbidden actions.
    you only can do it with DELETE statement.
    select single dbtab from t777d into gv_dbtab where infty = p_infty.
    delete from (gv_dbtab) where pernr in p_pernr.
    But you will have to be very carefully. There are "blind" infotypes behind some "normal" infotypes you will have to care about (i.e. 0000 -> 0302).

  • Updating the infotype 9901

    Hi,
    I have a req, i will get a file and need to update the data from file into the infotype 9901 with other fields too.
    can anyone of u provide me with any sample logic.
    I may need to create a new record,modify the existing record or delete the record from 9901.
    please help me in this.
    am new to hr abap.
    thanks,
    Moderator message: sorry, these forums cannot replace proper training, please search for available documentation or attend classes.
    Edited by: Thomas Zloch on Nov 10, 2010 6:21 PM

    But still one question remains.
    Why the HISTO field is set as 'X'? If this is so, as per SAP documentation, we will never be able to change that text.
    SAP Help -
    on HISTO field
    Historical Record Flag
    Allows you to mark infotype records as historical records. Historical records are permanently stored on the database, so that
    you can report on the information at a later point in time.
    NOTE: You cannot change records once they are marked as historical. As a result, you should not mark records as historical
    unless you no longer require them for processing.
    Thanks,
    Bhaskar
    Edited by: Bhaskar Tripathi on Dec 21, 2010 9:22 AM
    Edited by: Bhaskar Tripathi on Dec 21, 2010 9:23 AM

Maybe you are looking for

  • Delete one Skype account on LG TV

    How can I remove/delete one account from LG TV? I have signed-in with 5-6 Skype accounts, some of them I dont use any more, how can I delete it? tx

  • What's wrong with skype

    Hi. After latest system updates, skype started to throw segfaults. skype [1] 5729 segmentation fault (core dumped) skype I thing it has something to do with glib or glib2, because of the huge updates of GNOME libs and packages today. Any fix/workarou

  • HD MPEG-2 won't import into dvd SP

    I'm trying to take a 1920x1080 file to dvd, and am usiing HD MPEG-2 from FCP. DVD SP will accept the Dolby audio, but not the video. It seems like a lot of people are having problems playing back HD. Will it be safer to just burn a 720x480 dvd? This

  • Question please help as soon as possible if you can-- Applet question

    Is there a way to separate a string onto different lines when you draw a string to the applet like there is with escape sequences in a regular application? Thanks

  • Water and macbook air- bluetooth problem

    I spilt a whole glass of water over my macbook air, I dried it off and put it straight in the airing cupboard for 5 days. When I came to turn it on I could hear a high pitched buzzing noise coming from the top of the keyboard. I powered down and perf