Application Development and Automation 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: 
Read only

database table

Former Member
0 Likes
368

hii all,

i had got a db table with 50 entries and now i have to delete the first 10 entries using reports, an u lpz help me in that...

2 REPLIES 2
Read only

Former Member
0 Likes
349

hi use this command ..

delete dbname(table name) where matnr = '100-100'(if condition exists).

check this example....

PARAMETERS p_carrid TYPE sflight-carrid.

DELETE FROM sflight

WHERE carrid = p_carrid AND

fldate = sy-datum AND

seatsocc = 0.

regards,

venkat.

Edited by: venkat appikonda on Mar 25, 2008 8:10 PM

Read only

Former Member
0 Likes
349

As far as I know, you can't use index option in delete statement of database table. So, deleteing first 10 rows using delete statement can not be done by specifying position.

However, work around can be, first select from that table using up to 10 rows

select * up to 10 rows from dbtab into table itab .

and then delete from that database table using internal table that holds those 10 rows.

using

DELETE dbtab FROM TABLE itab.

G@urav.