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 in brackets

Former Member
0 Kudos

Hi,

how i can write this statment in brackets

if p_table_selection EQ '/BIC/0CZPRTHOURM' or p_table_selection EQ '/BIC/0CZQREPUTM'....

i try with:

if p_table_selection EQ ( '/BIC/0CZPRTHOURM' or '/BIC/0CZQREPUTM' )

and i have error .

regards

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos

> if p_table_selection EQ '/BIC/0CZPRTHOURM' or p_table_selection EQ '/BIC/0CZQREPUTM'....

what's wrong with this version?

Anyway, for example

if p_table_selection IN ('/BIC/0CZPRTHOURM' , '/BIC/0CZQREPUTM') ...

Thomas

5 REPLIES 5

ThomasZloch
Active Contributor
0 Kudos

> if p_table_selection EQ '/BIC/0CZPRTHOURM' or p_table_selection EQ '/BIC/0CZQREPUTM'....

what's wrong with this version?

Anyway, for example

if p_table_selection IN ('/BIC/0CZPRTHOURM' , '/BIC/0CZQREPUTM') ...

Thomas

0 Kudos

Hi Thomas,

thanks but nothing wrong i just have to many,

i write in e.g. just 2 but i have 8 like this (or p_table_selection ).

Regards

0 Kudos

see above, I edited my post again, naughty me.

You could also build your own range with the different single values.

Thomas

former_member194797
Active Contributor
0 Kudos

You may also write:

CASE p_table_selection. 
WHEN  '/BIC/0CZPRTHOURM' or '/BIC/0CZQREPUTM' .
...
ENDCASE.

former_member387317
Active Contributor
0 Kudos

Hi Ricardo Arona,

One of the good way here is use CASE... ENDCASE statement....

DATA : V1(25) TYPE C.

V1 = '/BIC/0CZPRTHOURM'.

CASE  V1.
  WHEN  '/BIC/0CZPRTHOURM' OR '/BIC/0CZQREPUTM' OR '/BIC/0CZPRTHOURL'.
    WRITE : 'Match Found'.
  WHEN  OTHERS.
    WRITE : 'Not Found'.
ENDCASE.

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7