Skip to Content
-2

Issue with Delete Statement in ABAP

Apr 11, 2017 at 09:54 AM

192

avatar image

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

range-tab.jpg (13.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Matthew Billingham
Apr 11, 2017 at 11:22 AM
5

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.

Share
10 |10000 characters needed characters left characters exceeded
Blesso Joshua Arulraj Apr 11, 2017 at 10:25 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0