10-10-2007 11:54 AM
HI,
i use And statment and its not working
what i doing wrong ?
Regards
IF l_ffact NE '1' AND l_tfact NE '1' .
l_rate = l_tfact DIV l_ffact.
ENDIF.
10-10-2007 11:59 AM
hi,
do like this.
IF (l_ffact NE '1' AND l_tfact NE '1' ).
l_rate = l_tfact DIV l_ffact.
ENDIF.
rgds,
bharat.
10-10-2007 11:59 AM
Hi,
Check this
data : temp type i value '1',
temp1 type i value '2'.
if temp eq 1 and temp1 eq 2.
write : temp.
endif.
*
Thanks.
10-10-2007 11:59 AM
hi,
do like this.
IF (l_ffact NE '1' AND l_tfact NE '1' ).
l_rate = l_tfact DIV l_ffact.
ENDIF.
rgds,
bharat.
10-10-2007 12:04 PM
hi bharat
i try like u write and its not working way?
<b>l_ffact = 10000
l_tfact = 1</b>
IF ( l_ffact ne '1' and l_tfact ne '1' ).
l_rate = l_tfact DIV l_ffact.
ENDIF.
thankes
10-10-2007 12:09 PM
Hi,
Check this now its working fine.
data : l_ffact type i,
l_tfact type i,
l_rate type i.
break-point.
l_ffact = 10000.
l_tfact = 1.
IF ( l_ffact ne '1' and l_tfact ne '2').
l_rate = l_tfact DIV l_ffact.
ENDIF.
Thanks.
10-10-2007 12:20 PM
hi viji
thankes
now its work (with l_tfact NE '2') but i wont to now if l_tfact NE '1'
what is the problem?
like that
IF ( l_ffact NE <b>'1'</b> AND l_tfact NE <b>'1'</b> ).
regards
10-10-2007 12:24 PM
Hi,
You gave the And condition in loop statement.
So the both cases <b> l_ffact NE '1'</b> and <b> I_tfact NE '1'</b> are satisfied only your condition will be true.
But in your case the first condition only true <b>[ l_ffact NE '1' --> Bcoz its original value is 1000]</b>
Your condition is false like [ l_tfact NE '1' ---> but l_tfact NE '1' value is 1].
Thanks.
10-10-2007 12:28 PM
Hi,
u r assigning the value equal to 1.and in the if condition ur checking for condition NE(Not Equal).so that condition is always false so the statements in IF...ENDIF are not working.
rgds,
bharat.
10-10-2007 12:31 PM
10-10-2007 12:01 PM
Hi,
As per your given syntax, when the <b>IF</b> condition is satisfied, the stmt. within <b>IF..ENDIF</b> is executed.
Hope this resolves your query.
Regards
Nagaraj
10-10-2007 12:04 PM
10-10-2007 12:14 PM
Hi Tal,
As per my understanding if you use AND it will check for both conditions. If your requirement is either one of them has to be satisfied use OR condition.
If my understanding is not wrong try with OR condition.
Regards,
Ramakrishna kotha.