2008 May 14 7:53 AM
hello experts.
I want to write a or condition but my logic is not working .
please correct my logic.My requirement is if a not equal to se2345
or b not equal to me345 it should give the error.
If a is equal to se2345 and b is not equal to me345 then also it should
give the error , if one is satisified it should give the error.
My logic is like this please correct it.
IF a NE 'se2345'
OR
b NE 'me345'.
MESSAGE e001 WITH 'logic ok'.
ENDIF.
Thank you for all the replies
hello experts.
I want to write a or condition but my logic is not working .
please correct my logic.My requirement is if a not equal to se2345
or b not equal to me345 it should give the error.
If a is equal to se2345 and b is not equal to me345 then also it should
give the error , if one is satisified it should give the error.
My logic is like this please correct it.
IF a NE 'se2345'
OR
b NE 'me345'.
MESSAGE e001 WITH 'logic ok'.
ENDIF.
Thank you for all the replies
2008 May 14 8:07 AM
My requirement is if a not equal to se2345
if a <> se2345
or b not equal to me345 it should give the error.
+ or b <> me345+
If a is equal to se2345 and b is not equal to me345 then also it should
give the error
+ or (a = se2345 and b <> me345)+
, if one is satisified it should give the error.
+ or (a <> se2345 and b = me345)+
So it should be :
if a <> se2345
+ or b <> me345+
+ or (a = se2345 and b <> me345)+
+ or (a <> se2345 and b = me345)+
And i think so you can delete line 3 and 4 for having the same result.
but if it doesn't work, check your rules.
Regards,
Christophe
Reward if helpful.
2008 May 14 8:19 AM
hi
try this
IF a EQ 'se2345'
AND
b NE 'me345'.
MESSAGE e001 WITH 'logic ok'.
elseif
IF a NE 'se2345'
OR
b NE 'me345'.
MESSAGE e001 WITH 'logic ok'.
ENDIF.
cheers
snehi chouhan
2008 May 14 8:24 AM
Hi,
In below code when both values of 'A' and 'B' are correct then success otherwise it will give always an Error message.
PARAMETERS : A(10) TYPE C,
B(10) TYPE C.
BREAK-POINT.
IF A NE 'SE2345' AND B NE 'ME345'.
WRITE : 'Erroe Message'.
ELSEIF A EQ 'SE2345' AND B NE 'ME345'.
WRITE : 'Erroe Message'.
ELSEIF A NE 'SE2345' AND B EQ 'ME345'.
WRITE : 'Erroe Message'.
ELSEIF A EQ 'SE2345' AND B EQ 'ME345'.
WRITE : 'Success'.
ENDIF.
Any other req plz revert..............
Thanks & regards.
Alok Vishnoi.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |