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 Internal Table

Former Member
0 Likes
1,787

Hi,

I have Internal Table like

Data : Begin of test occurs 0,

vbeln like vbrp-vbeln,

posnr like vbrp-posnr,

bzirk like vbrp-bzirk,

end of test.

If suppose in my internal table with vbeln = 90800100, 10 line items its having.

I want to delete all the entries in the internal table which is having Vbeln = 90800100.

How can i do this what is the exact statement I can use for this.

Thanks & Regards

Venkat

11 REPLIES 11
Read only

Former Member
0 Likes
1,741

Hi venkata,

1. simple

2. DELETE TEST WHERE VBELN = '908001000'.

regards,

amit m.

Read only

dani_mn
Active Contributor
0 Likes
1,741

HI,

<b>DELETE test WHERE vbeln = '90800100'.</b>

REgards,

Wasim Ahmed

Read only

Former Member
0 Likes
1,741

To delete more than one line using a condition, use the following statement:

DELETE <itab> WHERE <cond>.

Read only

Former Member
0 Likes
1,741

Hi,

You can do like ths.

DELETE test WHERE vbeln = '90800100'

Regards,

Raghav

Read only

Former Member
0 Likes
1,741

sort itab by vbeln

delete itab where vbeln eq '90800100'.

regards

Prabhu

Read only

Former Member
0 Likes
1,741

delete itab where itab-vbeln = '90800100'.

Read only

Former Member
0 Likes
1,741

Hi Venkata,

Use <b>DELETE</b> statement to delete entries in internal table.

Try as follows::

<b>DELETE TEST WHERE VBELN = '90800100'.</b>

To know more about DELETE statment check the following link:

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/delete_i.htm

Thanks,

Vinay

Message was edited by: Vinaykumar G

Read only

Former Member
0 Likes
1,741

Hi Venkata,

Use

V_vbeln = '90800100'.

Delete test where vbeln = v_vbeln.

Hope it would help you.

Cheers,

Prashanth

Read only

Former Member
0 Likes
1,741

Hi

use the DELETE statement

DELETE test WHERE VBELN = 90800100

Regards

Beena

Read only

Former Member
0 Likes
1,741

Hi,

The problem is not very critical. Every one has given you the correct solution .

Just after getting all the records in your "test" internal table just delete the records where the VBELN matches the data. If still the problem is not solved I think you better clarify the problem in detail.

Read only

Former Member
0 Likes
1,741

Hi,

I don't think the problem is very critical.Every one has given you the correct solution that is first get the data in your internal table and then delete the records where VBELN matches with the data.If still the problem is not solved then I think you better clarify it in detail.

Regs

Somnath