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: 

I tried deleting a record from standard table but not working

Former Member
0 Kudos

I need to delete a record from standard table scarr using this syntax but the record is not deleted please check it ,is it possible to delete the record from standard table or not help me in doing it .

data: wa_scarr type scarr.

wa_scarr-CARRID = 'SQ'.

wa_scarr-CARRNAME = 'Singapore Airlines'.

delete from scarr where carrid = wa_scarr-carrid and

carrname = wa_scarr-carrname.

if sy-subrc <> 0.

write: 'record not deleted'.

endif.

5 REPLIES 5

Former Member
0 Kudos

Hi,

yes we can directly delete the record from that std table.

Thank You,

santhosh

Former Member
0 Kudos

hi

change this code as below

data: wa_scarr type scarr.

wa_scarr-CARRID = 'SQ'.

wa_scarr-CARRNAME = 'SINAGAPORE AIRLINES'.

delete scarr from wa_scarr where carrid = wa_scarr-carrid and

carrname = wa_scarr-carrname.

if sy-subrc NE 0.

write: 'record not deleted'.

endif.

Edited by: venu gopal on Oct 16, 2008 9:51 AM

Former Member
0 Kudos

Hi anjali,

you can delete from the standard table , check after deleting sy-subrc .

sy-subrc = 0 = deleted

sy-subrc <> 0 = not deleted

regards

naveen

Former Member
0 Kudos

Hi,

You might be having issue with 'SINGAPORE AIRLINES' and 'Singapore Airlines'. Acutally u dont have to use that field. you just have to specify the key for the table.

u can use

delete from scarr where carrid = 'SQ'.

regards,

Anoop Panackal

0 Kudos

thank you all

i got it