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 rows from internal table using where condition

Former Member
0 Likes
2,595

Hi,

I'm trying to delete records from an internal table based on a condition.

But i'm getting "field specification missing " error.

DELETE it_excel WHERE ( ( valid_from between wa_tab-valid_from and wa_tab-valid_to )

                                         OR ( valid_to  BETWEEN wa_tab-valid_from AND wa_tab_valid_to ) ) .

         

Pls help with the possible solution..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,163

Hi Mohanraj,

There is an incorrect statement in this query.

DELETE it_excel WHERE ( ( valid_from between wa_tab-valid_from and wa_tab-valid_to )

                                         OR ( valid_to  BETWEEN wa_tab-valid_from AND wa_tab_valid_to ) ) .

Check for the underlined word in the above statement. It should be wa_tab-valid_to. You have used underscore instead of ( - ).

3 REPLIES 3
Read only

Former Member
0 Likes
1,164

Hi Mohanraj,

There is an incorrect statement in this query.

DELETE it_excel WHERE ( ( valid_from between wa_tab-valid_from and wa_tab-valid_to )

                                         OR ( valid_to  BETWEEN wa_tab-valid_from AND wa_tab_valid_to ) ) .

Check for the underlined word in the above statement. It should be wa_tab-valid_to. You have used underscore instead of ( - ).

Read only

Former Member
0 Likes
1,163

Hi,

Field Specification missing error comes when we try to access a field which has not been defined.

As Satish suggested, write wa_tab-valid_to instead of wa_tab_valid_to

Read only

Former Member
0 Likes
1,163

Hi Mohan,

In your second where condition wa_itab(-)valid_to the hyphen is mistyped as underscore.

Regards,

DN.