Application Development 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: 

Issue with Delete Statement in ABAP

0 Kudos
442

Hello All,

I have the table with one of my column as;

OBJECT_NO(Char 30)
01.2013
02.2013
03.2013
01.2014
05.2014
10.2014
02.2015
03.2015
01.2016
12.2016

Now i have one Range table in the following format;

I have written delete Statement as;

Delete Internal_table where object_no not in range_table.

I am expecting output as 'All values greater than range table value should be deleted since there is NOT IN in delete statement'.

so in output 01.2013, 02.2013 should come in output.

But In real I am getting output as 01.2013,02.2013,01.2014,02.2015,01.2016 is coming.

The thing is here only starting two characters are compared instead of all string.

Kindly request you to provide me solution to go ahead with acheiving correct output...

Thanks & Regards,

Akil Syed

1 ACCEPTED SOLUTION

matt
Active Contributor
185

ABAP doesn't know that you think mm.yyyy is a date. It treats it exactly as character data. Convert the mm.yyyy to yyyymm and it will get the ordering correct.

3 REPLIES 3

185

Hi,

Since your column is char type, you cant able to delete with month and year format.

Try like FTI_MONTH_YEAR kind of data element.

0 Kudos
185

Yeah Sure..I will try and let u know....Thanks!!!

matt
Active Contributor
186

ABAP doesn't know that you think mm.yyyy is a date. It treats it exactly as character data. Convert the mm.yyyy to yyyymm and it will get the ordering correct.