07-06-2006 8:25 AM
Hi
all
i m comparing these two fields
w_lifnr_aval GT c_9000000000.
where
w_lifnr_aval
LIKE lfa1-lifnr, "account no of vendor
c_9000000000(12)
TYPE c VALUE '9000000000',"high range
i m getting following warning--
Greater than/less than comparisons with character type operands may not be portable
i have also changed type of C_900000000000 to LIKE lfa1-lifnr
07-06-2006 8:30 AM
Greater than/less than comparisons with character type operands may not be portable
answer is in warning message..
how can u comapare char value just think can u say kishan(char) is greter than saurabh(char).and ur lifnr is char type.
this is mathmatical operation u can use it for only number type(I,N,D,T) comparison.
07-06-2006 8:30 AM
Hi,
You are comparing charactar values for greater and less. which is logically a wrong thing.
Try to use numeric field type instead.
If you are comparing for GE or LE.
Regards,
Wasim Ahmed
07-06-2006 8:30 AM
Greater than/less than comparisons with character type operands may not be portable
answer is in warning message..
how can u comapare char value just think can u say kishan(char) is greter than saurabh(char).and ur lifnr is char type.
this is mathmatical operation u can use it for only number type(I,N,D,T) comparison.
07-06-2006 8:55 AM
i have converted both fields into type I
now it is not showing warning but c_9000000000
is too long so
Warning..
VALUE specified too long for field C_9000000000
Length of field : 1
Length of VALUE spec. : 10
VALUE : '9000000000'
07-06-2006 9:03 AM
data: d1(10) type n.
data: d2(10) type n.
d1 = 9000000000 .
d2 = 9000000001.
if d2 > d1.
write : d2.
endif.
<b>and y ur program not work...</b>
Type I values are integers in the range +/- 2 billion, or, exactly, from -2147483648 to 2147483647. Intermediate results in type I expressions are stored in type I auxiliary fields. Otherwise, type I arithmetic is similar to performing calculations with type P fields without decimal places; division (using the operator /) rounds numbers rather than truncating them. Overflow results in a runtime error.
Type I is typically used for counters, quantities, indexes and offsets such as time periods.