Delete any entry in the table before adding an entry?

Hello ABAP Experts,
I have the data in the work area. I can modify / update / insert to the table.
How to write the ABAP code for this situation.
1) to delete any entries in the table
2) update this entry
so finally always there would be only one entry.
Suggestions appreciated.
Thanks,
BWer

Hi,
Delete the entries of table by this stmt.
DELETE FROM (dbtabname).
Then insert the values from workarea
INSERT INTO dbtab VALUES <work_area>.
And u can upadte the entry with values of workarea by this stmr.
UPDATE (dbtabname) FROM wa.
Dont use MODIFY. It will add a new record if its a new entry.
Rgds,
Prakash

Similar Messages

  • Is there any system table available to check no. of entries in the table?.

    Hi
    Is there any system table available to check the no of entries in the table.
    Note : the table may be whether SAP table or Z-table.(All tables)
    Regards
    Raja.

    Hi Raja,
    I don't think so. Instead, try to perform
    SELECT count(*) FROM dbtab.
    ...to get the number of records of the table dbtab.
    I hope this helps. Kind regards,
    Alvaro

  • CUA:  Wrong entries in the table USZBVSYS

    Hi All,
    While searching a particular user access to the child systems via SUIM - > Users by system, the report given output that the user have access to so and so system. Whereas that user already deleted and there is no user account in CUA and the respective child system.
    When i search in the table USZBVSYS, that user having a entry to that child system with status S.
    May be due to some old IDOC get processed and made an entry in this table but physical the changes were not made either in CUA or in child system.
    Now my concern is how to delete such type of entries in the table USZBVSYS?
    SAP recommended not to use the report RSUSR_CUA_CLEANUP_USZBVSYS and i think it can be resolve only by manually method to create and delete.
    Kindly let me know you opinion pls.

    Hi,
    RSUSR_CUA_CLEANUP_USZBVSYS cannot work in this case, as you have 'S'-entries for the user section  in uszbvsys. The report will clean up only entries with D,A or X entry for the user entry.
    So there seems to be no automated standard report for your query.
    I suggest to collect the user-IDs you need to remove, copy them into SU10, recreate them for the required systems and delete them
    afterwards again.
    Make sure, that nobody processes cua-idocs manually in any of your systems of the cua. Only use scul.
    b.rgds, Bernhard

  • How to find latest entry in the table according to time

    how to find latest entry in the table according to the time
    is there any function module to do so
    \[removed by moderator\]
    Regards
    Shashi
    Edited by: Jan Stallkamp on Aug 25, 2008 4:39 PM

    Hi,
    If you want to read the entry from an internal table,
    sort the internal table in the descending order by the time and
    delete adjacent duplicates by comparing the fields other than time and the internal table will have the latest record.
    Suggestion: instead of only time try to have one more field called date with the time combination
    Regards,
    Ramesh

  • How to delete a column from the table control in module pool?

    Hi,
      can any one please tell How to delete a column from the table control in module pool?
    thanks in advance
    warm regards
    HareeshKumar N

    hi hareesh,
    I think it is better to hide it.
    How to hide: You can check this link
    Dynamic Hide column in table control

  • Problem with the XI-Audit log entries in the table "XI_AF_MSG_AUDIT"

    Hi,
    I have an async-szenarios for PO:
    We send Idoc's from SAP ERP to a WebService via SOAP. And we take Ack's. We use Integrationsprocess with deadline block to catche the errors after the retrying (three times) and to send they via e-mail.
    Our problem is, the number of the audit logs in the table "XI_AF_MSG_AUDIT":
    In the RTW only we see one audit log (with three retries) in an error case. But in the table XI_AF_MSG_AUDIT there are about 76 entries for the same audit log in the error case and about 20 entries in the case of the succuessfull processing.
    This number of the entries in the table causes problem with the size of the redo log file and delete job of cours the large size of the table and therefore problem on the data base. The table can not be controlled. The delete job can not run and cancels every time due this redo log problems
    What can cause that?
    How can it be prevented, that so much entries are not be made in the  table "XI_AF_MSG_AUDIT".
    Best regards
    Gueltekin

    Hi Gueltekin,
    I am only aware of the general property auditLogEnabled of J2EE Engine Service SAP XI AF Core, which controls in general (default = true) that entries in the AF Message Audit log are written at all.
    (see [http://help.sap.com/saphelp_nw70/helpdata/en/5c/22ee41c334c717e10000000a155106/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/5c/22ee41c334c717e10000000a155106/frameset.htm])
    I assume that your scenarios in the error case is sending up to three messages and for each message the number of audit log infos are created. You might want to check the detailed entries in the log and see from where they are comming, you might use customer modules etc. as well.
    Best regards,
    Silvia

  • "No entry in the table T589A for P" in PPOME's custom Tab

    Hello,
    <u>requisites:</u><b> Add one custom Tab to transaction PPOME relative to Position (Object type S)</b>
    <u>problem:</u><b>"No entry in the table T589A for P" </b> when entering the transaction PPOME, and choose my new added Tab.</b>
    I get this error message <b>"No entry in the table T589A for P" </b> when entering the transaction PPOME, and choose my new added Tab.
    The thing is, if I comment the line "MODULE BEFORE_OUTPUT" in subscreen 7000 of the infotype (the tab is infotype specific) this error disappear. But then the data entered in the tab, which should be relative to one position (type S), is now displayed for all positions. When leaving the transaction, and entering again, in the same tab, the data has disappeared.
    I think I should not comment this:  "MODULE BEFORE_OUTPUT"
    Why is this error being raised, and what must I do do stop it?
    Thank you.

    Hi,
    The table T589A is a configuration table pertaining to the pf status of the infotype. I changed the pf status of the infotype i.e. added my own buttons on application tool bar. May be cos of that it is giving error. Not sure.......

  • Removing entries in the table

    Hi,
    I need to delete entries in the table ,those may be anywhere between 1 to several thousand. If  I want to delete for every hundred records how could it be coded.
    Thanks,
    Kranthi.

    Here is a sample program which shows how to delete from a database table 100 records at a time. 
    report zrich_0001.
    data: itest type table of ztest with header line.
    data: itest2 type table of ztest with header line.
    data: index type i.
    * Get all the records that you want to delete
    clear itest. refresh itest.
    select * from ztest
          into corresponding fields of table itest
                        where mtart = 'ZNBW'.
    * Loop untill the first itab is empty, move 100 records * at a time into the second itab, then delete from that
    * second itab.
    while not itest[] is initial.
      clear index.
      loop at itest.
        index  = index + 1.
        check index <= 100.
        move-corresponding itest to itest2.
        append itest2.
        delete itest.
      endloop.
    delete ztest from table itest2.
    endwhile.
    Regards,
    Rich Heilman

  • Error message 'No entry in the table T589A for P 2'

    Hi all,
    I am updating the field of an infotype using the function module 'HR_INFOTYPE_OPERATION'. But the function module is not updating the field. Instead the return key of the function module has the message
    'No entry in the table T589A for P2'. The function module is called as follows:
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        infty                  = '9900'
        number                 = wf_pernr
        SUBTYPE                = P9900-SUBTY
      OBJECTID               =
      LOCKINDICATOR          =
        VALIDITYEND            = P9900-ENDDA
        VALIDITYBEGIN          = P9900-BEGDA
      RECORDNUMBER           =
        record                 = p9900
        operation              = 'MOD'
      TCLAS                  = 'A'
       DIALOG_MODE            = '0'
       NOCOMMIT               =
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
    IMPORTING
       RETURN                 = wf_return
       KEY                    = wf_key
    Please suggest.
    regrds,
    madhu

    Hi,
    The table T589A is a configuration table pertaining to the pf status of the infotype. I changed the pf status of the infotype i.e. added my own buttons on application tool bar. May be cos of that it is giving error. Not sure.......

  • Error: No entry/entries in the table (WCCI)

    Hello friends
    I am trying to implement WCM to my client
    when trying to change WCD i am getting the following error
    No entry/entries in the table (WCCI)
        Message no. I4702    &
    Error when executing function module (WCFC_PRINT_FORMAT_GET)
         Message no. I4804
    Procedure
         Contact SAP.
    i am not able to resolve the issue.  Please help me in this regard
    venkat

    I have attached the screen shot.
    Regards,
    Amar

  • Transporting the entries of the table TSTCT

    Dear All,
    Is there a way to transport the entries of the table TSTCT.
    I've tried the procedure specified in the below link, but it is not working for the T*  tables.
    <link to blocked site removed by moderator>
    Please suggest if there is a way.
    Thanks,
    Naveen
    Edited by: Thomas Zloch on Feb 6, 2012

    HI ,
    Check this [Thread|transport system objects i.e. contents of table t100 from one system to ano; , in that they have tried to transport T001 , And replies have few links check that too , will help you to transporting the entries of the table TSTCT.
    Regards,
    Saravana.S

  • Multiple entries in the table cabn

    Hello,
    Can Anyone tell me how is it possible to have multiple entries of the same "atnam" field in the table CABN.
    It has something to do with changing number.
    Because I used a wrong select-instruction e.g.
    select atnam in charact where .... IN ....
    So, I shoud used
    select DISTINCT atnam in charact where .... IN ....
    So, I'm gone need to try to put multiple entries in the table to check, if it's working well.
    Thanks a lot.
    Best Regards,
    Kais

    If I understand your Q - you mean there are two ATINN for the same ATNAM in your CABN table?
    I dont think that's possible. If you check CT04 and try to create a new characteristic with same name as an existing one - it will give you a warning and prevent creation.
    Since you say it's a standard characteristic - please mention the characteristic name (ATNAM)?

  • PT60 report err 'No entry in the table T555Z'

    Dear All,
    I tried to run PT61, but I'm getting the error 'No entry in the table T555Z'.
    But it's negative time management and in IT0007 I have marked the time status 09.
    Regards
    Thomas

    This error is caused because you do not have the entries in T555z under the PSG for Time recording (What ever has been for for this employee)
    If you do not need this, you can comment out TIMTP function in the schema and then you should not get the error...

  • HT1657 Hi, I rented a movie off iTunes but the there is no sound. I've bought and rented previous movies and I've never had any problems with the sound before. Is this some kind of glitch? How can I get my money back?

    Hi, I rented a movie off iTunes but the there is no sound. I've bought and rented previous movies and I've never had any problems with the sound before. Is this some kind of glitch? How can I get my money back?

    Hey grossa2,
    First, here is a way to report an issue with your purchase:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBooks Store purchase
    http://support.apple.com/kb/HT1933
    Then, I'd go through this article, which helps troubleshoot a lack of audio playback in iTunes:
    iTunes and QuickTime for Windows: Audio does not play or plays incorrectly
    http://support.apple.com/kb/TS1362
    Take care,
    Delgadoh

  • How can we delete a line from the table control .

    hi all
    how can we delete a line from the table control .
    situation is.
    created table control in se51 which will display the data of a table.
    how could i select a line from the table control ?
    how could i delete the selected lines form the table.
    thanks in advance

    Change the Table Control attributes such that user can only select a single record(row).
    <u>Tip to delete a selected record</u>
    1) write a module 'Mark' in the PAI as below
    PROCESS AFTER INPUT.
    MODULE cancel AT EXIT-COMMAND.
    LOOP WITH CONTROL table_view.
    MODULE read_table_control.
    FIELD flag MODULE mark ON INPUT.
    ENDLOOP.
    MODULE user_command_0100.
    2) Module Mark is below.
    MODULE mark INPUT.
    CHECK flag = 'X'.
    x = table_view-top_line + sy-stepl - 1.
    Delete itab INDEX x.
    ENDMODULE. " mark INPUT
    Table_view is the TableControl Name.
    'flag' is of type char(1) available in the Internal table which was assigned to the select option in the table control.
    <u>award if uesful</u>
    Regards,
    Sudheer

Maybe you are looking for

  • My iPod won't charge and is not recognized by my PC...

    it's been two weeks that i saw my ipod blinked. (i have and ipod video, 30 gb.) the battery was draining so fast. i tried charging it. it charged but the following day, same problem. i tried reformatting it, but to no avail. i tried charging it again

  • How can i upgrade my Mac os x v10.6.8 to v10.7

    i need the mac os x v10.7 to install an application that i want however the version i have, 10.6.8, says that it is the most updated version.

  • Special characters from textfield to properties file and back

    Hi, The character "o with two dots above it" is being read from a file into a String then written to a proerties file. It is stored in the proerties file as \uFFFD When I read this character from the proerties file, and place it in a JTextField, it i

  • Oracle server Installation

    I am Installing Oracle server 9i Software on Windows 2003 Sever operatin system. The source Software are actualy allocated in another server with the following Structure file system: e:\oracle\disk1 e:\oracle\disk2 e:\oracle\disk3 I wrote as source s

  • Camera Shutter Sound - Any way to silence?

    Does anyone know of a way to turn off the simulated shutter sound that the phone makes when you take a picture?


HashFlare