Records deleted from db

hi all.
am facing a strange problem .., is there any chance that records would be getting deleted from db table automatically ???..
am facing this issue in production ...
if so ,please suggest me the possible solns to fix this ..
a great thanks in advance
thanks
suresh

Thanks for your reply.
am updating the db using bapi method from a custom table which is filled from  the records of different files( file names are unique ) ...and wenever the complete table is updated am deleting all the records of that table corresponding to that file ....
now the problem is
1. wenever the table wrt a file is deleted.. only the first record corresponding to other files in that custom table are getting deleted.. this is not happening everytime only few times ........ certain times it will be ok .. i've checked my program also while deleting/modifying  the records of custom table am clearly giving filename (which is unique)..so there is no chance of impacting the records of other files .. the strange thing is only first record is getting deleted of other files in the custom table
2. there is also another program which is scheduled daily to fill the custom table with unique filename ( in this program am using modify stmnt )
please suggest me  with possible alternatives
thanks
suresh

Similar Messages

  • Dynamic record deletion from database table

    Hi,
    I need to delete selected records from database table(dynamic names). Table names are being passed from main program with some of their field names. The record to be deleted from the database table is being decided based on the fields passed for the table and their contains passed from the main program.
    It is not possible to write dynamic where clause for DELETE statement directly.
    So, I created a dynamic internal table and i am trying to fetch all records using SELECT statement(for which we can write dynamic where condition, something like...SELECT...WHERE (itab).  ) which need to be deleted in the iternal table.
    Piece of code :
              CONCATENATE c_im v_tablefield1 INTO v_imprtfield1.
              CONCATENATE v_tablefield1 c_in v_imprtfield1
                       into s_condition separated by space.
              APPEND s_condition TO t_condition.
              PERFORM GET_DYNAMIC_ITAB USING s_flds_agtab-tabname
                                    changing t_itab.
              ASSIGN t_itab->* TO <itab>.
    *Select the data (to be deleted) from the database table
               SELECT * FROM (s_flds_agtab-tabname) INTO TABLE <itab>
                 WHERE (t_condition).
    *Delete the records from the table
               IF SY-SUBRC = 0.
                 DELETE (s_flds_agtab-tabname) FROM TABLE <itab>.
               ENDIF.
    Here t_condition is of standard table of WHERETXT.
    t_condition at the run time before giving dump was:
    SPART IN IM_SPART
    AND KUNNR IN IM_KUNNR
    Here IM_SPART is renge type of SPART and IM_KUNNR is renge of KUNNR.
    I am getting a DUMP:
    The WHERE condition has an unexpected format.
    Error analysis                                                                               
    The current ABAP/4 program attempted to execute an ABAP/4 Open SQL
    statement containing a WHERE condition of the form WHERE (itab) or
    WHERE ... AND (itab). The part of the WHERE condition specified at
    runtime in the internal table itab contains the operator         
             IN (v1, ..., vn)                                        
    in incomplete form.                                              
    How to correct the error
    If the error occurred in a non-modified SAP program, you may be  
    able to find a solution in the SAP note system.                  
    If you have access to the note system yourself, use the following
    search criteria:                                                 
    "SAPSQL_IN_ILLEGAL_LIST"                               
    "SAPLZSD_TAB_REFRESH " or "LZSD_TAB_REFRESHU01 "       
    "Z_SD_REFRESH_AGTABLES"                                
    If you cannot solve the problem yourself, please send the
    following documents to SAP:                             
    I would like to know whether "IN" operator is allowed in (itab) of WHERE clause. While testing I changed the "IN" to "=" specifying a suitable value there. It worked. So please let me know if i can give "IN" operator using renge table in the dynamic where clause.
    Thanking you,
    Surya

    Hi again,  so if you can not use the IN in a dynamic where clause you might be forced to dynamically build the entire select statement,  Here is a sample program which may give you some ideas, notice that we are writing the select statement code, putting it in another program and generating the subroutine at runtime, then call this routine.  I'm sure that this will help you see what you need to do.
    report zrich_0003 .
    tables: kna1.
    types: t_source(72).
    data: routine(32) value 'DYNAMIC_SELECT',
                 program(8),
                 message(128),
                 line type i.
    data: isource type table of t_source,
                xsource type t_source.
    ranges:
            r_kunnr for kna1-kunnr.
    data: ikna1 type table of kna1.
    data: xkna1 type kna1.
    r_kunnr-sign = 'I'.
    r_kunnr-option = 'EQ'.
    r_kunnr-low    = '0001000500'.
    append r_kunnr.
    xsource = 'REPORT ZTEMP.'.
    insert xsource  into isource index 1.
    xsource = 'FORM dynamic_select'.
    insert xsource  into isource index 2.
    xsource = 'Tables r_kunnr ikna1.'.
    append xsource to isource.
    xsource = 'select * into table ikna1 from kna1'.
    append xsource to isource.
    xsource = 'where kunnr in r_kunnr.'.
    append xsource to isource.
    xsource = 'ENDFORM.'.
    append xsource to isource.
    generate subroutine pool isource name program
                             message message
                             line line.
    if sy-subrc = 0.
      perform (routine) in program (program) tables r_kunnr
                                                    ikna1.
    else.
      write:/ message.
    endif.
    loop at ikna1 into xkna1.
      write:/ xkna1-kunnr.
    endloop.
    Regards,
    Rich Heilman

  • Need help for record deletion from custom table

    Hi friends
    I have to write a custom program which will be generic to delete any table record with date field.
    This program needs to be generic (should be able to delete records from any custom table) in nature with selection screen parameters as:
    Table Name and Number of Days prior to which records are deleted, both mandatory.
    Program Flow:
    1.     From number of days calculate date before which records are deleted, ( current date u2013 no. of days = past date).
    2.     Custom table have date field, delete records prior to that date.
    3.     Program may be scheduled for background job, put default values for both fields. No. of days should not be less than 60.
    4.     Classical Report output with number of records deleted.
    My query is how will I know the name of the Date field so that I can write a DELETE query.
    If I use 'DDIF_FIELDINFO_GET' it gives me all field names but how to filter out?
    with regards
    samikhya

    Hi
    I have added  field on the selection screen as p_fieldname and got the F4 help for it , so that the user will get the field name run time as per the table name.
    Now I am facing problem while writing the DELETE query.
    I wrote like
    DELETE (fp_tab)
    where (fp_fieldname) LE date
    It is not working. I also tried with taking a string to concatenate fp_fieldname, LE and date to l_string
    when I write like this:
    DELETE (fp_tab)
    where (l_string) , sy-subrc is getting 4 and no records are getting deleted.
    I do not understand where the dynamic Delete is failing??
    with reagards
    Samikhya

  • When are records deleted from PRX_Transaction_Queue

    Total WebTools newbie.
    I'm getting conversant with PRX_Transaction_Queue. What I don't know is when these records get cleaned out. Can somebody point me to documentation?
    When is it okay to manually delete records from PRX_Transaction_Queue?

    This might be similar to a problem we ran into.
    Look into turning the cache off in toplink - I think by default its turned on. I don't have my notebook in front me right now so I can't look up the exact setting but I'm sure if you google it you'll find it.

  • How to record the records deleted in a table

    Hi Experts
    I want to run a report as a batch which should deleted the records
    which are sysdate - 60 and The report should log the number of records deleted
    from each table at End Of Run.
    Criteria for selecting records to be deleted are as follows:
    1.     ZINT_DATA
    u2022     ZINT_DATA.CREATED_ON <= (Today u2013 60 Days)
                   and ZINT_DATA.STATUS = u2018OKu2019
    So I want to create a table for log history recorded as
    Delete Date         Log description
    01.01.2008        1500 rows deleted
    30.03.2008        2000 rows deleted.
    30.04.2008        300  rows deleted.
    Eg The table are ZINT_DATA.
    The report starts like this
    REPORT z_eslp_command.
    DATA:
      fs_zint_data TYPE zint_data.
    DATA:
      t_zint_data TYPE
              TABLE OF
                      ZINT_DATA.
    START-OF-SELECTION.
    SELECT *
       FROM ZINT_DATA
       INTO TABLE t_ZINT_DATA PACKAGE SIZE 10000.
    ENDSELECT.
    LOOP AT t_zint_data INTO fs_zint_data.
    INSERT INTO ZINT_DATA_DEL
          VALUES fs_zint_data.
    select count(*) from zint_data_del.
    ENDLOOP.
    IF sy-subrc EQ 0.
      WRITE:
        'DATA INSERTED FROM ZINT_DATA into ZINT_DATA_DEL'.
    ENDIF.
    But Instead of creating another table , I want only log to be recorded as described.
    Thanks
    Regards
    Piroz

    Hi Kiran
    See the final modification of the report but I am getting an error as
    Field " Corresponding_fields" is unknown, it is neithere in one of the specified tables nor defined by a
    DATA statement, but I have already created an internal table itab1 , could you check and revert with the correction.
    REPORT  ZSD1DELETION                .
    TYPE-POOLS:SLIS.
    *Used in ZSDI_INTERFACE1 Program.
    TABLES:ZINT_DATA_DEL  . 
    *DATA: BEGIN OF ITAB1 OCCURS 0.
    *DATA: SL_NO TYPE SY-TABIX.
         INCLUDE STRUCTURE zint_data_del.
    *DATA:END OF ITAB1.
    DATA: BEGIN OF ITAB1 occurs 0 ,
          MANDT type zint_data_del-mandt,
          ZINT_ID type zint_data_del-zint_id,
          ZINT_TY type zint_data_del-zint_ty,
          CREATED_ON type zint_data_del-created_on,
          KEY_VAL type zint_data_del-key_val,
          SEQUENCE type zint_data_del-sequence,
          STATUS type zint_data_del-status,                 
          LENGTH type zint_data_del-length,           
          RAW_DATA type zint_data_del-raw_data,       
          end of itab1.
    *DATA: i_data TYPE TABLE OF ITAB1, " internal table
    *wa_data TYPE ITAB1. " work area
    DATA:LINE1(10) TYPE C,
         LINE2(10) TYPE C,
         date1(10) type c,
         date2(10) type c,
         name1(60),
         string1(100),
         title1(65),
         title2(100) type c,
         FNAME TYPE STRING.
    *Declarations for ALV
    DATA:itfieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA:itrepid TYPE sy-repid.
    itrepid = sy-repid.
    DATA:itevent TYPE slis_t_event.
    DATA:itlistheader TYPE slis_t_listheader.
    DATA:walistheader LIKE LINE OF itlistheader.
    DATA:itlayout TYPE slis_layout_alv.
    DATA:top TYPE slis_formname.
    DATA:itsort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    *PARAMETERS:P_WERKS LIKE BSEG-WERKS.
    SELECT-OPTIONS: S_DATE FOR ZINT_DATA_DEL-CREATED_ON OBLIGATORY.              
    SELECTION-SCREEN END OF BLOCK B1.
    *Validations w.r.t the Date
    AT SELECTION-SCREEN ON S_DATE.
    IF S_DATE IS INITIAL.
    MESSAGE 'Enter the Date' type 'E'.
    *Records from 2007 can't be deleted.
    ELSEIF S_DATE-LOW+0(4) >= '2007' AND
           S_DATE-HIGH+0(4) >= '2007'.
    MESSAGE 'Records from the Year 2007 cannot  be Deleted' type 'E'.
    ENDIF.
    CONCATENATE  s_DATE-low6(2) '.' s_DATE-low4(2) '.' s_DATE-low+0(4)
    INTO date1.
    CONCATENATE  s_DATE-high6(2) '.' s_DATE-high4(2) '.' s_DATE-high+0(4)
    INTO date2.
    PERFORM GETDATA.
    *&      Form  DOWNLOAD
          text
    -->  p1        text
    <--  p2        text
    form GETDATA.
    SELECT * FROM ZINT_DATA_DEL
             INTO CORRESPONDING_FIELDS OF TABLE ITAB1
             WHERE CREATED_ON IN S_DATE.
    IF ITAB1[] IS NOT INITIAL.
    DESCRIBE TABLE ITAB1 LINES LINE1.
    PERFORM DELETION.
    PERFORM ALV.
    ELSE.
    MESSAGE 'No Data' type 'S'.
    ENDIF.
    endform.                    " GETDATA
    *&      Form  DELETION
          text
    -->  p1        text
    <--  p2        text
    form DELETION .
    DELETE FROM ZINT_DATA_DEL WHERE CREATED_ON IN S_DATE.
    endform.                    " DELETION
    *&      Form  alv
          Fieldcatalog for ALV Report
    FORM alv.
    LOOP AT ITAB1.
    ITAB1-SL_NO = SY-TABIX.
    MODIFY ITAB1.
    ENDLOOP.
      DEFINE m_fieldcat.
        itfieldcat-fieldname = &1.
        itfieldcat-col_pos = &2.
        itfieldcat-seltext_l = &3.
        itfieldcat-do_sum = &4.
        itfieldcat-outputlen = &5.
        itfieldcat-edit = &6.
        append itfieldcat to itfieldcat.
        clear itfieldcat.
      END-OF-DEFINITION.
      m_fieldcat 'MANDT'     '' 'Client' '' 03 ''.
      m_fieldcat 'ZINT_ID' ''   'Id' '' 10 ''.
      m_fieldcat 'ZINT_TY'   '' 'Type.'  '' 05 ''.
      m_fieldcat 'CREATED_ON' '' 'Date Created on' '' 25 ''.
      m_fieldcat 'KEY_VAL'       '' 'key value'  '' 04  ''.
      m_fieldcat 'SEQUENCE' '' 'sequence' '' 06 ''  .
      m_fieldcat 'STATUS'   '' 'status.' '' 10 ''.
      m_fieldcat 'LENGTH'    '' 'Length.' '' 18 ''.
      m_fieldcat 'RAW_DATA'    '' 'Raw Data' '' 15 '' .
      itlayout-zebra = 'X'.
      itlayout-colwidth_optimize = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program      = sy-repid
            is_layout               = itlayout
          i_callback_user_command =  ' '
            i_callback_top_of_page  = 'TOP'
            it_fieldcat             = itfieldcat[]
            i_save                  = 'A'
         is_variant              = ITVARIANT
            it_events               = itevent[]
         is_print                = ITPRINTPARAMS
            it_sort                 = itsort[]
          TABLES
            t_outtab                = itAB1
            EXCEPTIONS
            program_error           = 1
            OTHERS                  = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    "alv
    *&      Form  TOP
        Top of page for ALV Report
    FORM top.
       CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
         EXPORTING
            i_list_type           = 0
         IMPORTING
            et_events             = itevent
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
      IF sy-subrc  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    string1 = 'Records from'.
    CONCATENATE string1 date1 'to' date2 INTO title1
    SEPARATED BY space.
    walistheader-typ = 'H'.
    walistheader-info = title1.
    APPEND walistheader TO itlistheader.
    CONCATENATE 'Records Deleted' '-' LINE1 INTO title2.
    walistheader-typ = 'H'.
    walistheader-info = title2.
    APPEND walistheader TO itlistheader.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary      = itlistheader
        I_LOGO                   = ''.
        I_END_OF_LIST_GRID       =
       ENDIF.
      CLEAR itlistheader.
    ENDIF.
    ENDFORM.                    "TOP
    Regrds
    Piroz

  • SAP-OIM Reconciliation of Person Record Deletion

    Hi All
    Has anyone done with reconcilation of preson record deletion from SAP . Below is the indicator as mentioned in SAP ER guide .
    Lookup.SAP.HRMS.ConfigurationDelete Indicator ------ Segment details of the indicator that identifies whether or not the employee is deleted ----E2PLOGI001;OPERA;77;77;D .
    Any inputs will be appreciated .
    In our case we are changing the STAT2 and position attribute of SAP .
    Thanks
    Darshan

    HI All
    I have now successfully implemented SAP HRMS user record termination .
    Please follow SAP ER connector guide for hire and terminate events to enable and disable employee .
    2.3.9 Configuring Reconciliation of Effective-Dated Target System Events
    Thanks
    Darshan
    Edited by: Shelke Darshan on Jan 16, 2013 3:16 AM
    Edited by: Shelke Darshan on Jan 16, 2013 3:18 AM

  • Please will like to get my deleted recording back from quick

    Please I will like to get my deleted recording back from quick voice app

    Was it backed up ?   If it was - restore from backup (of course, everything else will be restored too).
    If it wasn't - you have no way to get it.

  • Need to know how records can be deleted from a talbe when user hits cancel report

    In my report I am inserting some records in to a table in the before report trigger and deleting in after report trigger.
    If the user hits the cancel report when the report is processing the records in the records never gets deleted from the table.
    If anyone knows how this can be done, please help me.
    Thanks in advance.

    If your database is 8.1.6, you can try to use temporary tables. The data inside them is automatically deleted when the session (report) ends.
    Also the data is private for each session, so no other user can see the data you have in the temporary table.
    Did you think about the situation when two users will run the report at the same time? How are you handling this (the fact that their data may be scrambled...) The Oracle temporary table eliminates this possibility.
    null

  • Deletion of condition record (vk11) from Database

    Dear,
    can anybody tell me how to delete condition record completely from database nt delettion flag.
    regards,
    Debesh

    Hi,
    I think archive the condition record is better option for you insted of deleting it !!!!
    For archiving please go through the below link.
    http://help.sap.com/saphelp_45b/helpdata/en/8d/3e5ae4462a11d189000000e8323d3a/content.htm
    Hope this will help you to resolve your query!
    Regards,
    KRishna O

  • Count total number of record of table with deletion from archiving object

    Does anyone know is there any SAP standard program to count the total number of record of the table with deletion from Archiving Object and display in repprt?

    Not sure of the question. Are you looking to get the sql "select count(*) from table" from using the TopLink expression framework or are you getting that SQL already and want something else?
    If you are looking just to get the count from a table/class, you can use a ReportQuery:
    ReportQuery rquery = new ReportQuery(ClassToQueryOn.class);
    rquery.addCount(); //equivalent to count(*);
    session.executeQuery(rquery);
    You can use a report query to return data instead of objects, and use selection criteria just like a normal read query.
    Best Regards,
    Chris

  • Cisco AQM 8.5 not recording : wav files are deleted from client side

    Daer Networkers,
    We do have Cisco AQM 8.5 SR2 ES1 installed with UCCX 8.5
    The issue is that when accessing the Web interface of AQM and try to look for calls, I can't find any one.
    When checking the client side, I can see that the call are being recorded : The FROM and TO files are there. But once the call is terminated, the wav file appear for some seconds and then it dissappears asi fi it's deleted.
    The wav files are not in the server too;
    I don't know what is the issue. Can you please help ?
    Thanks in advance.

    Hi,
    This issue was resolved by doing a repair to the QM Base services, then run postinstall as if it was run for the first once.
    The Proxy Gateway program was missing for some reason. After doing the repair the issue was resovled and calls are uploaded to the server.
    Now I am facing another issue !  : I can hear the client voice only. Agent's voice couln't be heard in the recorded files. As if the agent's voice is not recorded. Can you please advise ?

  • Condition Record PB00 gets deleted from A018 table

    Hi Gurus-
    Could anyone of you explain how the PB00 condition is getting deleted from A018 table (Purch Org Level Condition)? It looks like some batch job is randomly setting the Valid to Date A018-DATBI to yesterday's date and today there is no valid time dependent condition.
    I don't know any process/program that accesses PB00 condition in table A018 other than MEK1 or MEK4.
    Does SD condition type change has any impact in Purchasing Price (PB00). Although all the Rate/Price is stored in the same table KONP but separated by application area and table (A017, A018, A071, A073).
    Can anybody shed some lights on this please?

    Thanks for your reply. We know the user name who is making the change in A018. It is a batch user ID that makes the change but we have about 100 differentg background batch job that is scheduled everyday and I went through every one of them but did not raise any flag.
    And the worst part is since it is done by the batch user id (batch job), there is no change record (if I try to do MEK3-Environment>display changes) not even an entry in CDHDR table or CDPOS table.
    Trying to see if you guys know of any SD or MM program that accesses that table and set the valid to field to yesterdays date and create a new condition record (KNUMH) with valid to date 31.12.9999 and rate (value) to 0.00?
    Please let me know if you have any suggestion.
    Thanks in advance.

  • Records have been deleted from the table.

    Hi all ,
    If records have been deleted from the table that any log file maintains the history as following Way.
    User Name who delete the records.
    Machine name where the command is execute.
    The command syntax e.g delete from abc where ……..
    or any other help related to mentioned problem.
    Regards,
    Mobeen.

    Wrong forum .. your question doesnt make much sense.
    But take a look at Oracle Auditing.

  • Delete a Material Master Record Permanently from R/3 4.7

    We have a requirement to delete certain material master records permanently from our R/3 4.7 system. We have already archived all the relevant material master documents using SARA and are now trying to delete the material permanently using SARA but are unable to do so as the program is finding archive entries in MARI and prevents the material from being permanently deleted.
    Is there a way to remove records from MARI so that we can delete the material master record permanently.
    Thanks in advance.
    Samir

    It looks like transaction MMDE cannot be used for deleting only a certain set of materials. It is setup to delete all the materials.
    Is there a way to delete only a certain set of materials permanently from the client?
    Thanks
    Samir

  • Records got deleted from Repeat Delta

    Hi,
    Friends record got deleted from Repeat Delta also , how can we get back it , is there any  way.??
    Thanks.
    Asim

    Hi,
    Goto RSA7 in ECC and see findout your DataSource and select it an dclick on Display Data Icon then select Repeate Delta and see the records are there or not?., If it won't contains then only you confirm the data is deleted from Repeat Delta.
    If you lost this data then you need to go for Reint or Init without Data and then Full and then set Delta.
    Thanks
    Reddy

Maybe you are looking for