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

dynamic variant for select option

raffinkira
Participant
0 Likes
372

for exmaple:

SELECT-OPTIONS: s_company FOR xxxx-xxxxx.

DATA: g_company(30) type C.

when I wrote: IF g_company IS NOT IN s_company, a syntax error happened.

How can I do the right thing for that?

NOTE: s_company has multi single values like 'SAP' 'IBM' 'ORACLE', it is NOT a value range.

for exmaple:

SELECT-OPTIONS: s_company FOR xxxx-xxxxx.

DATA: g_company(30) type C.

when I wrote: IF g_company IS NOT IN s_company, a syntax error happened.

How can I do the right thing for that?

NOTE: s_company has multi single values like 'SAP' 'IBM' 'ORACLE', it is NOT a value range.

1 REPLY 1
Read only

matt
Active Contributor
0 Likes
344

You've not stated what the syntax error is - do you expect us to guess?

You got a syntax error before you started your IF statement, since S_company is more than eight characters long.

You've got the syntax for checking if something is in a select option wrong. Try reading the ABAP Help or looking for a sample program in help.sap.com.. Thread locked.