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

if condition error

Former Member
0 Likes
1,135

Hi friends,

Can any one correct the if condition as i am getting incorrect logical expression.,

IF (( LW_INVMOV-STATUS = 'CD' ) OR

( LW_INVMOV-STATUS = 'V1' ) OR

( LW_INVMOV-STATUS = 'V2' )).

MESSAGE I000(X) WITH 'Cannot process for CD, V1, & V2'.

EXIT.

ENDIF.

Regards,

SMP

1 ACCEPTED SOLUTION
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
856

Hi,

Try this.

IF ( LW_INVMOV-STATUS = 'CD' OR

LW_INVMOV-STATUS = 'V1' OR

LW_INVMOV-STATUS = 'V2' ).

MESSAGE I000(X) WITH 'Cannot process for CD, V1and V2'.

EXIT.

ENDIF.

Hi friends,

Can any one correct the if condition as i am getting incorrect logical expression.,

IF (( LW_INVMOV-STATUS = 'CD' ) OR

( LW_INVMOV-STATUS = 'V1' ) OR

( LW_INVMOV-STATUS = 'V2' )).

MESSAGE I000(X) WITH 'Cannot process for CD, V1, & V2'.

EXIT.

ENDIF.

Regards,

SMP

4 REPLIES 4
Read only

Former Member
0 Likes
856

what is the data type of status?

кu03B1ятu03B9к

Read only

0 Likes
856

It is CHAR.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
857

Hi,

Try this.

IF ( LW_INVMOV-STATUS = 'CD' OR

LW_INVMOV-STATUS = 'V1' OR

LW_INVMOV-STATUS = 'V2' ).

MESSAGE I000(X) WITH 'Cannot process for CD, V1and V2'.

EXIT.

ENDIF.

Read only

0 Likes
856

Thanks Jayaram it is correct as you said, I removed brackets and its working fine.