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

logical operator

Former Member
0 Likes
477

Hi Experts,

Can we use logical operator in where clause of select statement?????

My requirement is i want to CA logical operator in select statement.Is there any possibility????????

If there please tell me???????????\

Nice answers reward with maxi points.................

3 REPLIES 3
Read only

Former Member
0 Likes
443

Try this: -

Declare a range say r_matnr with conditions like

SIGN OPTION LOW HIGH

E CP 1234567890

Use this range in the where condition with "IN" clause like "where matnr in r_matnr"

-Cheers

Edited by: Prakash Bhatia on Jan 8, 2008 2:46 PM

Read only

Former Member
0 Likes
443

Hi Subash,

Prakash is right with his idea to go by range,

but it won't work like this.

Instead build your range like this:

ranges r_matnr for Tnnnn-MATNR.

r_matnr-sign = 'I'.

r_matnr-option = 'BT'.

r_matnr-low = '0'.

r_matnr-high = '9999999999'.

"max length of matnr filled with 9

APPEND r_matnr.

then

SELECT * FROM Tnnnn WHERE MATNR IN r_matnr

AND ......

this will get you only those entries with plain numerical MATNR.

For the opposit selection, just replace 'I' wit 'E' in r_matnr-option.

hope that helps.

Regards

JW

Edited by: Joerg Wulf on Jan 8, 2008 10:43 PM

Read only

Former Member
0 Likes
443

I can't think of any way to do this.

Rob