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

deleting internal table

Former Member
0 Likes
472

Hi All,

I'm facing the problem in deleting the records from internal table.

IF int_ausp[] IS NOT INITIAL.

SORT int_cciht_ihva BY recn.

CLEAR wa_ausp.

LOOP AT int_ausp INTO wa_ausp.

DELETE int_cciht_ihva WHERE recn <> wa_ausp-objek+0(20).

ENDLOOP.

ENDIF.

i've 2 records in int_ausp and 800 records in int_cciht_ihva .

after delete i should get 2 entries but i'm getting only one entry.

please let me know how to correct this

Hi All,

I'm facing the problem in deleting the records from internal table.

IF int_ausp[] IS NOT INITIAL.

SORT int_cciht_ihva BY recn.

CLEAR wa_ausp.

LOOP AT int_ausp INTO wa_ausp.

DELETE int_cciht_ihva WHERE recn <> wa_ausp-objek+0(20).

ENDLOOP.

ENDIF.

i've 2 records in int_ausp and 800 records in int_cciht_ihva .

after delete i should get 2 entries but i'm getting only one entry.

please let me know how to correct this

2 REPLIES 2
Read only

Former Member
0 Likes
444
  • hic *

How should i know which entries your piece of coding should delete? I don't even have a clue what the contents of the internal tables are. As far as i can tell you: ABAP in itself doesn't make mistakes.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
444

Dont use this approach .

Declare int_cciht_ihva as a sorted table with required keys.

Use a nested loop and append the required entries to another internal table instead of deleting it.