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: 

where condition of select statement doesn't deliver the expected result

Former Member
0 Kudos

Hi all,

i do not know why my where-condition doesn't work.

Could anyone help me?


CONCATENATE
                '%'
                <fs_selopt>-LOW
                '%'
              into search_str.
              str_tbl = '/BI0/TEMPLOYEE'.
              SELECT * from (str_tbl) into wa_employee where TXTMD LIKE search_str .

6 REPLIES 6

Former Member
0 Kudos

Is there anything in the field <fs_selopt>-LOW.

do you need to read your select-option with INDEX 1 to get the value.

0 Kudos

yes there is a value in the in the <fs_selopt>-LOW

0 Kudos

Hi Anton,

Check for case sensitivity of the field in the where clause.

If it is stored as UPPER CASE in database, then you have to translate the <seloption>-low to Upper-case.

translate <seloption>-low to upper-case.

Regards,

Ravi

Former Member
0 Kudos

Hello,

U could try like this

DATA: RA_TXTMD TYPE RANGE OF TXTMD WITH HEADER LINE.

DATA: LV_TXTMD(10).

RA_TXTMD-SIGN = 'I'.

RA_TXTMD-OPTION = 'CP'.

CONCATENATE <fs_selopt>-LOW '*' INTO LV_TXTMD.

RA_TXTMD-LOW = LV_TXTMD.

APPEND RA_TXTMD.

<b>IF NOT RA_TXTMD[] IS INITIAL.

SELECT * from (str_tbl) into wa_employee where <b>TXTMD IN RA_TXTMD</b>

ENDIF.</b>

Vasanth

Former Member
0 Kudos

Hi,

CONCATENATE

'*'

<fs_selopt>-LOW

'*'

into search_str.

Create a range:

ranges: r_sel.

r_sel-sign = 'I'.

r_sel_option = 'CP'.

r_sel-low = search_str.

append r_sel.

Then,

str_tbl = '/BI0/TEMPLOYEE'.

SELECT * from (str_tbl) into wa_employee where TXTMD in r_sel.

Regards

Subramanian

former_member194669
Active Contributor
0 Kudos

Hi,

Try like this

CONCATENATE

'_____%'

<fs_selopt>-LOW

'%'

into search_str.

Thanks

aRs