Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to display records accordingly while using asterisk in input

Say,

In a database table I have a field named "site" which contains the following records.

972

345

240

950


so there are four entries.

Now my parameter is

SELECT-OPTIONS: s_site FOR string NO INTERVALS.


If I give the input as only asterisk


i.e. s_site = *


then all the records must display.


on the other hand if I give the input like this,


i.e. s_site = 9*


then it must display all the records starting with 9


In this case the answer must be: 972 and 950.

Can someone help me with the logic or syntax please.



Tags:
Former Member
replied

Hi, will be handled automatically by the WHERE condition of the SELECT statement.

Try this: SELECT * FROM dbtable WHERE site IN s_site.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question