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: 

Problem while using LIKE statement in my BAPI

Former Member
0 Kudos

Hi,

Hello every body have a problem in using LIKE statement. I have written a BAPI to get the items according to the search criteria. Please advice, how can i pass my text to the select statement. At present i am passing the description like PIPE% from the front end.

SELECT * FROM TABLE WHERE DESCRIPTION LIKE DESCRIPTION.

I don't want to pass the description like PIPE% and the percentage symbol should be taken care in the back end.

Please help!

Kind Regards,

Rao (rao.busi@yahoo.com)

2 REPLIES 2

Former Member
0 Kudos

Hey this code is workinf fine. Check the same once.

DATA:

T_spfli TYPE TABLE OF spfli,

DESC TYPE SPFLI-CITYFROM VALUE 'NEW%'.

SELECT *

FROM spfli

INTO TABLE T_spfli

WHERE CITYFROM LIKE DESC.

Former Member
0 Kudos

Hi Jyothi,

Thanks. Please note that the search text will be passing from the front end, i.e. from portal. we never know what could the description. so we can't hard code the description like 'New'.

Please can you advice me, how can i pass the description to the select query.

Thanx,

Rao