Skip to Content
author's profile photo Former Member
Former Member

delete

hi i am trying to delete records from Z table using the statement.

delete ZES_RFQ_SVC from table it_rfqsvc.

but it returns sy-subrc 4.

Please correct me

Pratyusha

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2006 at 03:53 AM

    Hi, Check the syntax to delete from database table.

    Deleting from a Database Table

    - DELETE FROM dbtab. or

    DELETE FROM (dbtabname).

    - DELETE dbtab FROM wa. or

    DELETE (dbtabname) FROM wa.

    - DELETE dbtab FROM TABLE itab. or

    <b>DELETE (dbtabname) FROM TABLE itab.</b>

    - DELETE dbtab. or

    DELETE *dbtab.

    - DELETE dbtab VERSION vers. or

    DELETE *dbtab VERSION vers.

    Regards,

    Senthil

    Message was edited by: senthil kumar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2006 at 03:58 AM

    Check this

    DELETE FROM Z08V3_UZ_PRINTED WHERE FKNUM = '2020000120'.

    I have use in one of the case.

    Check similaraly it may help u.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2006 at 03:59 AM

    Hi,

    If you are using the from table IT_RFQSVC..Then the internal table should contain values for all the primary key fields including the MANDT.

    Check in the internal table if all the key fields are populated..

    THanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 27, 2006 at 03:59 AM

    Hi,

    sy-subrc is set to 4, when you don't have any matching record in db table for values in internal table. Please first check if primary key fields of db table have the same contents as that of your internal table row.

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.