Skip to Content
author's profile photo Former Member
Former Member

Select by the first character

Hi.

I want to maka a select of table ekko when the field inco1 begin by 'F'.

How i can do it.

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 07:52 AM

    select * from ekko where inco1 like 'F%'.

    endselect.

    reward points if its helpful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 07:52 AM

    Hi Andres ,

    You can use LIKE in the select statement.

    e.g.

    select ....

    from

    where <f1> like 'F%'.

    Regards

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 07:54 AM

    Hi,

    Select * from EKKO into table IT_EKKO where INCO1 = 'F%'.

    Regards

    Sudheer

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 07:54 AM

    Hi,

    select * 
      from ekko 
      into table itab
     where inco1 like 'F%'.

    The use of the wildcard characters "_" and "%" corresponds to the standard of SQL. In the rest of ABAP, the wildcard characters "+" and "*" are used in similar logical expressions, in particular when selection tables are used.

    You should not use patterns that are closed by wildcard characters to search for closing blanks.

    The semantics of searches of this type are dependent on the database system that is used and in general do not lead to the desired result.

    Hope this helps.

    Regards,

    Richa

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 07:53 AM

    Hi,

    You can use in your where condition 'INCO1 LIKE 'F%'.

    Thanks and regards,

    S. Chandra Mouli.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 07:54 AM
    select ..from ekko where inco1 like 'F%'.

    Message was edited by:

    Chandrasekhar Jagarlamudi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 30, 2007 at 07:55 AM

    Hi

    Use like:

    select ....

    from

    where <f1> like 'F%'.

    Regards,

    Sree

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      We can use wild character but it will be having a performance issue. If possible declare a range statement and pass the value in low as F*. It will work like your select option.

      Hope will be helpful.

      regards

      thiru

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 07:58 AM

    Hi,

    Write the select statement as:

    SELECT (db name) INTO TABLE (internal table name) WHERE (fieldname) LIKE 'F%'.

    Regards,

    Balakrishna.N

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.