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

Delete

Former Member
0 Likes
986

hi all

hi suppose i have 2000 records in an internal table.

i used the below statement.

DELETE itab FROM 1500 TO 1700.

write 😕 itab.

how many records wil be fetched?

thank u

sunny.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
876

Hi,

if you only want to delete the last 500 records, try this

DELETE itab FROM 1500 TO 2000.

DELETE itab FROM idx1 TO idx2

regards

Nicole

8 REPLIES 8
Read only

prasanth_kasturi
Active Contributor
0 Likes
876

hi

Did you mean DELETED

then

strating from 1500 to 1700 row all the records are deleted (including 1500 and 1700) from your internal table.

reward if helpful

prasanth

Read only

Former Member
0 Likes
876

hi sunny,

pls make clear your question!!!

Read only

Former Member
0 Likes
877

Hi,

if you only want to delete the last 500 records, try this

DELETE itab FROM 1500 TO 2000.

DELETE itab FROM idx1 TO idx2

regards

Nicole

Read only

0 Likes
876

To answer your question, how much...

From index 1500 to 1700 in your excample.

Read only

0 Likes
876

You need a loop to write all entries from itab.

loop at itab.

write: / itab[].

endloop

regards

NIcole

Read only

Sm1tje
Active Contributor
0 Likes
876

of 2000 records, entries with index 1500 to 1700 will be deleted, rest of 2000 records is left.

But when you just do: WRITE:/1 itab, only ONE will be displayed???!!!!

Read only

Former Member
0 Likes
876

Hi,

it will not display any record.

because u are simply writing write:/ itab.so it will write the current header line contents.

delete itab from n1 to n2. will update the work area.

rgds,

bharat.

Read only

Former Member
0 Likes
876

Hi,

It will delete the records from the internal table which is having 1500 to 1700. If your internal table does not contain 1700 records then it ABAP runtime error will be triggered.

Thanks,

Sriram Ponna.