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: 

How to delete internal table entries with out using loop

Former Member
0 Kudos
2,976

Hi all,

My Internal table consists of following fields and entries. I want delete particular set of entries without using loop. For example ITAB is:

BUKRS BELNR BLART

1000 1000001 RE

1000 1000002 KZ

1000 1000003 KR

1000 1000004 RE

Here I want to delete all the RE u2013Document in ITAB. How do to this one.

Thankx advance,,,,,

1 ACCEPTED SOLUTION

GauthamV
Active Contributor
0 Kudos
405

hi,

its always better to use loop if you want to delete multiple records.

check Rich's reply here.

[https://forums.sdn.sap.com/click.jspa?searchID=19735567&messageID=840416]

11 REPLIES 11

Former Member
0 Kudos
405

Hi

Use

Delete ITAB where BLART = 'RE'.

Regards

Aditya

Former Member
0 Kudos
405

HI Durai,

try this

delete itab[] where table-fieldname = " ".

also try this

delete itab from wa with key table-fieldname = " ".

also do a F1 on delete . this can give you very good results.

regards

-Sudipta

former_member222860
Active Contributor
0 Kudos
405

Hi,

DELETE FROM ITAB WHERE BLART = 'RE'.

thanks

Mahesh

0 Kudos
405

if i want to delete multiple blart types. How can I ???

GauthamV
Active Contributor
0 Kudos
406

hi,

its always better to use loop if you want to delete multiple records.

check Rich's reply here.

[https://forums.sdn.sap.com/click.jspa?searchID=19735567&messageID=840416]

former_member222860
Active Contributor
0 Kudos
405

Hey,

sorry for the syntax in the previous one.

DELETE ITAB WHERE BLART = 'RE'.

regards

Mahesh

Former Member
0 Kudos
405

Hi,

DELETE ITAB WHERE BLART = 'RE'

OR

On delete press in F1 u find more about that......

Former Member
0 Kudos
405

DELETE ITAB WHERE VBLEN = '1006758'.

(OR)

DELETE ITAB INDEX 5.

Regards,

Ajay

Former Member
0 Kudos
405

Yes,,I tried those statements, but still it is not deleting any rows in my ITAB. Any other way to delete this particular document types.

Thankx,,,,

Former Member
0 Kudos
405

This message was moderated.

mimanchi
Explorer
0 Kudos
405

hi

Delete ITAB where BLART = 'RE'.