Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

delete

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

PritiSAC
Advisor
Advisor
0 Kudos

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.