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 negative symbol in select query

Former Member
0 Kudos

Hi All,

here BUDAT = -15 

         EINDT =   15 based on this zfield = 100 in ztable  fetching these zfield value and displaying.

  my question is when  ITAB_DET-RSI_DAYS = 1 or 2 .... in positive its fetching correct values  in below select statement when ITAB_DET-RSI_DAYS = -1 or -2 .. for negative its not displaying values in where clause ( BUDAT LE ITAB_DET-RSI_DAYS AND EINDT GE ITAB_DET-RSI_DAYS)

         

HOW TO Compare negative values in where clause and fetch correct data.                                                                                  

SELECT SINGLE * FROM ZVENDOR INTO CORRESPONDING FIELDS OF ZVENDOR

                                       WHERE BUKRS = ITAB-BUKRS

                                                 AND  WERKS = ITAB-WERKS

                                                 AND  ( BUDAT LE ITAB_DET-RSI_DAYS AND EINDT GE ITAB_DET-RSI_DAYS ).

any help is appreciable.

thanks.

2 REPLIES 2

sandroramos
Active Participant
0 Kudos

Hi,

what are the data types of these fields you're comparing?

Sandro Ramos

0 Kudos

Hi ,

iam using data type as DEC and i even tried creating domian with data type DEC and selection sign option still its not working..