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 records by comparing select-options

Former Member
0 Likes
2,391

i need to delete the i_final internal table records whre exp = select options range, i have writtenthe code can u help me out in this.

l_exp_i LE s_date-high.

wa_final-ebeln = wa_ekko-ebeln.

wa_final-kdatb = wa_ekko-kdatb.

wa_final-kdate = wa_ekko-kdate.

wa_final-lifnr = wa_ekko-lifnr.

wa_final-exp = l_exp_i.

wa_final-ebelp = wa_ekbe-ebelp.

wa_final-matnr = wa_ekko-matnr.

wa_final-ktmng = wa_ekko-ktmng.

wa_final-consume = v_consume.

APPEND wa_final TO i_final.

CLEAR wa_final.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDLOOP.

DELETE i_final WHERE exp < s_date-low.

DELETE i_final WHERE exp > s_date-high.

7 REPLIES 7
Read only

Former Member
0 Likes
1,367

HI,

delete <itab> where exp not in s_date.

rgds,

bharat.

Read only

Former Member
0 Likes
1,367

try something like this...

DELETE i_final WHERE exp not in s_date.

Read only

Former Member
0 Likes
1,367

hi,

no need to write two statements.

just write

DELETE i_final WHERE exp not in s_date.

Message was edited by:

Sudha Rani Pathuri

Read only

santhosh_patil
Contributor
0 Likes
1,367

Hi,

Just use

<b>DELETE i_final WHERE not exp in s_date</b>

-


Patil

Read only

Former Member
0 Likes
1,367

Hi

you can try like this

delete table itab where not exp in s_date

regards

Shiva

Read only

Former Member
0 Likes
1,367

Hi

You can use

<b>DELETE i_final where NOT exp IN <select_option>.</b>

Regards

Raj

Read only

Former Member
0 Likes
1,367

hi,

DELETE i_final from wa_final where exp not in s_date.

or

DELETE i_final[] where exp not in s_date.

if helpful reward some points.

with regards,

suresh babu aluri.