cancel
Showing results for 
Search instead for 
Did you mean: 

Delete Rows from a Table

arijitkumardas
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi there

We have a requirement where we need to Delete lines from a Table. I havent come across a Table Operation for Delete. So I thought about an alternative multi-step process.

Loop at Table 1;

Insert contents to Table 2 where record-field A is not initial.

But I am not able to design it 😞

Any help on how to achieve this would be appreciated.

Any other clever way delete lines is most welcome.

Thanks

Arijit

Accepted Solutions (0)

Answers (1)

Answers (1)

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Arjit - is this BRFPlus or NetWeaver BRFM or HRF ?? and what version.

Not enough details provided to answer your question.

arijitkumardas
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Jocelyn

This is BRFPlus; system is ECC 6; ABAP & BASIS 731; SP 9.

So this is my approach.

I have a LOOP on Table A. Then do an Insert (Table Operation = All Lines); where the Table A - Field A is not initial. And it errors 😞

Thanks

Arijit

carsten_ziegler
Active Contributor
0 Kudos

You may use a table operation expression. It allows you to delete entries from a table. In the rule you assign the result of the expression to the data object.

arijitkumardas
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Carsten

Thank you for your response.

However, I am not able find an appropriate Table Operation that allows me to Delete lines based on a specific Condition. I see there are options such as Delete First Line, Delete Last Line etc. Pls can you advise which Table Operation should I use?

Thanks

Arijit

carsten_ziegler
Active Contributor
0 Kudos
arijitkumardas
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you Carsten; appreciate it.

I was not sure of the function of Delete All Lines. I shall implement this on my Table A itself (instead of creating a Table B and appending from Table A to it based on a Condition) and advise of the result.