Skip to Content

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

Wild Card Characters in Select Statement

Hi,

I have a program, where user enters a field. S_INGRP, from the Selection Screen.

Users may enter wild card characters in this field.

I have used the below code to handle this.

if s_ingrp-high eq space

Select <fields> into corresponding fields of itab

from table qmih where ingrp like s_matnr-low.

else

Select <fields> into corresponding fields of itab

from table qmih where ingrp in s_matnr.

endif.

This code helps me when

1.A single value with wild-card characters is provided. (eg E%)

2. The low value is with a wild-card character and high value is a exact value. (eg: E% to MM1)

But When I give both the low and the high value with wild- card characters ( eg: E% to M%) , it only returns the values for the low value (E%).

Please Help

Former Member
Not what you were looking for? View more on this topic or Ask a question