‎2008 Jun 13 10:32 AM
Hi All,
Can i use the LIKE operator in Select query to compare the Same field that starts with different values i.e.
CONCATENATE c_5051 c_% INTO l_val1.
CONCATENATE c_5101 c_% INTO l_val2.
SELECT prctr
INTO l_prctr
FROM bseg UP TO 1 ROWS
WHERE matnr = l_matnr
AND belnr = l_belnr
AND ( hkont LIKE l_val1
OR hkont LIKE l_val2 ).
ENDSELECT.
but it is failing even though ther is an entry in BSEG table satisfying hte given condition.
Regards,
Padmasri.
‎2008 Jun 13 10:36 AM
HI,
u can use like operator in select statement where condition.
may be it is failing because of some other selections. please make sure whether the record with the corresponding selections is available in database or not.
rgds,
bharat.
‎2008 Jun 13 10:36 AM
HI,
u can use like operator in select statement where condition.
may be it is failing because of some other selections. please make sure whether the record with the corresponding selections is available in database or not.
rgds,
bharat.
‎2008 Jun 13 10:41 AM
Insted of concatenating
CONCATENATE c_5051 c_% INTO l_val1.
CONCATENATE c_5101 c_% INTO l_val2
Data: c_vla1 type char5 value '5051%',
c_val2 type char5 value '5101%'.
avoid the select endselect .
‎2008 Jun 13 10:57 AM
Hi,
You can use Like operator with select queries.
You should first check if there are any matching records.
regards
rishika