Application Development 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: 

syntax

Former Member
0 Kudos

hi,

the syntax not right.

may i know how to code it correctly?

thanks

IF wa-acc IS INITIAL OR

wa-acc+0(1) NOT IN ( '5','6','7' ) OR

wa-acc+0(2) NOT IN ( 'LA' , 'IA' ).

CONTINUE.

ELSE.

do something.

ENDIF.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi El,

You cannot use the not in() in the if condition.

The Not In() statement is used in where statements.

Regards,

Ravi.

6 REPLIES 6

Former Member
0 Kudos

Hi El,

You cannot use the not in() in the if condition.

The Not In() statement is used in where statements.

Regards,

Ravi.

0 Kudos

hi,

thanks.

so what can i do on this?

Former Member
0 Kudos

Try this..

IF wa-acc IS INITIAL OR
   NOT wa-acc+0(1)  IN ( '5','6','7' ) OR
   NOT wa-acc+0(2)  IN ( 'LA' , 'IA' ).
CONTINUE.
ELSE.
do something.
ENDIF.

0 Kudos

hi,

this is incorrect.

rgds

Former Member
0 Kudos

You can use this

<b>NA Contains Not Any:</b> True if a logical expression with CA is false, that is if operand1 does not contain any characters from operand2. If the result of the comparison is negative, sy-fdpos contains the offset of the first character in operand1 that is also contained in operand2. If the result of the comparison is true, sy-fdpos contains the le of operand1.

Assign points if it helps.

-Gaurang

Former Member
0 Kudos

hi

case wa-acc+0(2)

when LA'

x= p

when AA'

x= Q

if IF wa-acc IS INITIAL OR

wa-acc+0(1) nc '567' or x ne p or X ne q.

CONTINUE.

ELSE.

do something.

ENDIF.

Message was edited by:

sunil kumar