2008 May 14 7:41 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 7:45 AM
Hi Shiva,
Xactly you are correct.it should work.
please close this thread.
Amit.
2008 May 14 7:49 AM
Hi Shiva,
try like this
IF a EQ 'se2345'
AND
b EQ 'me345'.
"do wht u ever u want
ELSE.
MESSAGE e001 WITH 'logic ok'.
ENDIF.
Regards
Adil
2008 May 14 7:51 AM
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
if ( A NE 'SE35' ) or
( B NE 'SE25' ).
message error
endif.
if ( a EQ 'S35' ) and
( B NE 'SE25' )
message error
endif.
2008 May 14 7:52 AM
hi,
try this.
IF a NE 'se2345'
and
b NE 'me345' .
MESSAGE e001 WITH 'logic ok'.
ELSEIF a EQ 'se2345'
and
b NE 'me345' .
MESSAGE e001 WITH 'logic ok'.
ELSE.
MESSAGE s001 WITH 'logic ok'.
ENDIF.
reward points if hlpful.
2008 May 14 7:54 AM
Hi Shiva,
Try this logic.
***************************************************************
if b NE 'ME345'.
if a NE 'SE2345'.
MESSAGE 'Error ' type 'E'.
elseif
a = 'SE2345' .
MESSAGE 'Error ' type 'E'.
ENDIF.
endif.
***************************************************************
Hope this is helpful to you. If you need further information, revert back.
Reward all the helpful answers.
Regards
Nagaraj T
2008 May 14 7:56 AM
Hi Shiva,
it should be like this
IF ( a NE 'SE2345' ) OR ( b NE 'ME345' ).
MESSAGE e001 WITH 'logic ok'.
ENDIF.
your using 'se2345' it should be 'SE2345'
Regards,
Sriram
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |