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: 

OR Condition

Former Member
0 Kudos

hi all,

i need to check whether for particular matnr, matkl equal to 101 or 102 or 103, if so exists need to print

else not exists need to print.

if i put the code as below the the syntax error is displaying as

Relational Operator OR is not supported

if gt_mara-matkl = '101' or '102' or '103'.

move 'exists' to gt_data-matkl.

else.

move 'not exists' to gt_data-matkl.

endif.

could anyone please help.

1 REPLY 1

matt
Active Contributor
0 Kudos

Before posting a question, how about reading F1 help on the IF statement.

If, when you syntax check, you get an error, it means your syntax is wrong. So you need to find out what the syntax is, and you get that by reading the help.