2010 Oct 01 3:49 PM
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
2010 Oct 01 4:04 PM
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.
2010 Oct 01 4:23 PM
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.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |