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

syntax

Former Member
0 Likes
945

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
Read only

Former Member
0 Likes
816

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
Read only

Former Member
0 Likes
817

Hi El,

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

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

Regards,

Ravi.

Read only

0 Likes
816

hi,

thanks.

so what can i do on this?

Read only

Former Member
0 Likes
816

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.

Read only

0 Likes
816

hi,

this is incorrect.

rgds

Read only

Former Member
0 Likes
816

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

Read only

Former Member
0 Likes
816

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