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 Itab

Former Member
0 Likes
1,060

Hi Experts,

I have four data's in my internal table.

Now I want to delete the fourth row of Internal Table.

Im new to Abap. help me on this issue.

Thanks in Advance.

Points assured.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,035

Hi,

Use refresh itab. And if the table has header use also clear itab.

Regards.

Use delete itab index 4. Sorry I thought you needed to delete the whole internal table.

9 REPLIES 9
Read only

Former Member
0 Likes
1,036

Hi,

Use refresh itab. And if the table has header use also clear itab.

Regards.

Use delete itab index 4. Sorry I thought you needed to delete the whole internal table.

Read only

Former Member
0 Likes
1,035

hi,

try this

delete itab index 4.

Read only

former_member386202
Active Contributor
0 Likes
1,035

Hi,

Do like this

DELETE itab INDEX 4.

Regards,

Prashant

Message was edited by:

Prashant Patil

Read only

Former Member
0 Likes
1,035

Hello Jasmine,

delete <name of your internal table> index 4.

Regards,

John.

Read only

Former Member
0 Likes
1,035

Hi

try like this..


DATA : idx LIKE sy-tabix.
idx = 4.
DELETE itab INDEX idx.

Read only

Former Member
0 Likes
1,035

Hi,

loop at itab into wa_itab where sy-tabix = '4'.

delete itab from wa_itab.

endloop.

OR you can sort the table descending by some field and the 4th record will be first record, which you can delete it.

Regards,

Vani.

Read only

Former Member
0 Likes
1,035

Hi Jasmine,

Inorder to Delete a row from the internal table you need to specify the condition, which will identity this 4 th row in internal table

Syntax: DELETE itab <condition>

DATA idx TYPE I value 4

Ex: DELETE itab INDEX idx

Thanks

Ravi

Message was edited by:

Ravikanth Alapati

Read only

Former Member
0 Likes
1,035

Hi,

Use Delete itab index 4.

Regards,

Murugan Arumugam

Read only

Former Member
0 Likes
1,035

Hi

Delete <itab> index 4<4th row>.

goto code <b>abapdocu</b>

find Delete statement.

U can learn it..

Regards,

S.Suresh.

reward if useful..