Application Development and Automation 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: 
Read only

correct the logic

Former Member
0 Likes
929

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

6 REPLIES 6
Read only

Former Member
0 Likes
899

Hi Shiva,

Xactly you are correct.it should work.

please close this thread.

Amit.

Read only

Former Member
0 Likes
899

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

Read only

Former Member
0 Likes
899

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.

Read only

GauthamV
Active Contributor
0 Likes
899

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.

Read only

Former Member
0 Likes
899

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

Read only

Former Member
0 Likes
899

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