Skip to Content
avatar image
Former Member

Entry from DB table

Hi,

I want delete an entry from DB table, can u help how can I delete, without effecting other data.

thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 15, 2009 at 09:36 AM

    go to se11

    Give table name

    Press F7( ie: display table entries)

    F8

    Select the entry

    Give /H in command bar

    Press enter(debugger switch on)

    Press enter again

    Give CODE in debugge

    F8

    Select the entry

    Press display (F2)

    /H

    Press ENTER twice

    Now edit the CODE from SHOW to DELE

    Press ENTER

    F8

    Press delete in Menu bar

    Now check in the DB

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 15, 2009 at 09:38 AM

    Hi,

    If you want to delete all the record form table then you can use T-code SE14.

    Go To --> Se14 ---> Enter table name & press Edit Button --- > Select Delete Data Radio Button ---> Click on Activate and Adjust Database.

    You Can also Generate Table maintains of the table. So that u can delete record of the table in tcode SM30.

    If you want to delete record by code then use stmt DELETE.

    Thanks & Regards

    ShreeMohan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 15, 2009 at 09:50 AM

    Hi ,

    goto ABAP editor and using delete statement try to delete the data in the table

    DELETE { {FROM target [WHERE sql_cond]}

    | {target FROM source} }.

    Effect

    The statement DELETE deletes one or more rows from the database table specified in target. The rows that are to be deleted are specified either in a WHERE condition sql_cond or with data objects in source.

    Please let me know if you still need any more help.

    Thanks and regards,

    Rajeshwar.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi all,

      Thanks for all to ur consideration. Through SM30 we can not delete bcs that entry does not exist there. reagrding through SE16 by debugging I already done, but as per my ABAP team here they are saying that is not recommendable, bcs it may be effect to other data in future..

      but regarding code fro DELETE which u r saying I will try. before that pls confirm me if we will do this thing through Coding then it will not be effect to other data?

      pls reply me soon.

      thanks

  • avatar image
    Former Member
    Jul 15, 2009 at 11:19 AM

    Hi ,

    by deleting it does'nt effect other data, check whether it is a key field , if not then you can delete it.

    PLease let me know if you still need any more help.

    Thanks and regards,

    Rajeshwar.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Rajeshwar,

      Its really thankful for ur reply. but can u just tell there is any SAP note for that.

      thanks

  • avatar image
    Former Member
    Jul 15, 2009 at 12:19 PM

    You can specify the delete statement with where condition and only the entries which satisfy the condition will be deleted. it will not delete any other data.

    delete from ddtable where field1 = 'Test'.

    In above statement the enties whose field1 = test will be deleted from dd table.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 20, 2009 at 01:54 PM

    I think we need to know from wich table you are trying to delete the record. Is it a standard or Z ?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 22, 2009 at 11:55 AM

    Hai,

    Fetch your entry into work area say wa. Then use the delete statement: Delete Dbtab from wa.

    Best Regards,

    rama

    Add comment
    10|10000 characters needed characters exceeded