Skip to Content
avatar image
Former Member

Delete data from internal table

Hi All,

I require to read the data from internal table: i_data_new and search for if the data in the internal table are meet for certain condition. If yes, i will deleted the record from that table and proceed with another requirement. Could anyone help me with sample code on how i retrieve the data and delete it from internal table. Thanks

Condition like: s_data = "NEW" and v_test = "ABC".

my sample of current code:

Code for Select statement..........

................................................

.................................................

APPEND LINES OF i_data_tmp TO i_data_new.

REFRESH i_data_tmp.

ENDSELECT.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    May 15, 2008 at 01:11 PM

    hi,

    do this way ...

    delete  i_data_new where s_data = 'NEW' and v_test = 'ABC'. 

    Add comment
    10|10000 characters needed characters exceeded

  • May 15, 2008 at 01:20 PM

    hi,

    do like this

    loop at it where s_date = 'NEW' and v_test = 'ABC'.

    delete it.

    endloop.

    ( or )

    delete it where s_date = 'NEW' and v_test = 'ABC'.

    you can use any of the way

    regards

    prasanth

    Add comment
    10|10000 characters needed characters exceeded