RegEx like in SQL WHERE

Hello!
I want to search in internal tables lines like I do this in where expression of sql, but thought the instrumentality of RegEx.
For example, internal table have 2 lines:
Implementations and running times
implementation language
I want to find like in SQL such string 'implrun*'
How can I do that in RegEx?

Try this way
data: p_regex(80)  TYPE c VALUE 'impl(.+)run(.+)'.
data: regex         type ref to cl_abap_regex,
      matcher       type ref to cl_abap_matcher,
      ls_result     type match_result,
      lt_result     type match_result_tab.
condense p_regex.
    create object regex
      exporting
        pattern     = p_regex
        ignore_case = ''.
* For REGEX match
    matcher = cl_abap_matcher=>create(
                   pattern     = p_regex
                   ignore_case = ' '
                   table       = i_temp ). " i_temp is your internal table contains records
lt_result = matcher->find_all( ).

Similar Messages

  • Bdoc task M - Function like in SQL?

    Hi,
    can anyone tell me, what the bdoc task M = modify does? Does it act like the SQL task on a database?
    If for example a bupa_rel has task M and should change a relationship that does not exist, would it create a new one?
    Best Regards
    Chris
    Edited by: Wiliam C. Haltenhoff on Feb 20, 2008 4:18 PM

    This appears to be a duplicate of the question in this thread
    Re: VPD issue Need Assistance ASAP
    where I wrote
    "Your function returns a single string that happens to have a bunch of commas and quotes in it. An IN list generally requires a list of strings, which your function doesn't return.
    You could rewrite the function to be a pipelined table function and then do
    select count(*)
    from baseclient.address_detail
    where cidn in (SELECT cidn
    FROM TABLE(<<your pipelined table function>>))
    However, I would expect it to be easier not to wrap all this into a function and just have your IN clause be the logic in your predicate_cidn cursor.
    Justin
    "

  • RegEx with PL/SQL?

    Hi,
    i need a function that checks input for a valid MAC address ...
    like '00-02-A6-0B-09-1B' only HEX values should be included ...
    'AJ-00-02-T9-0B-09' schould be invalid, 'cause AJ is not a HEX value ...
    is that possible in PL/SQL? or may i use regex in PL/SQL?
    thanks

    def TEST=A1-B2-C3-D4-E5-F6
    select regexp_replace( regexp_replace(substr('&TEST' , 1 , 15)
                                                           , '([[:xdigit:]][[:xdigit:]]-)'
                                                           , null
                                    , '([[:xdigit:]][[:xdigit:]])'
                                    , null
      from dual
    will be NULL when TEST is well shaped                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • I would like to know where my iPhone come from which country. how can I check it? please kindly advise me. Thanks

    i would like to know where my iPhone come from which country. how can I check it? please kindly advise me. Thanks

    It read it already, but it did not mention about the country. I can saw "Designed by Apple in California. Assembled in China". but it does not mean that the iPhone comes from US or China. I mean that what model come from which country. thanks for your help anyway.

  • Hi like to check where to replace the free iPod nano for the 1st generation ipod

    Hi
    Like to check where can I replace the free iPod for my 1st generation iPod which can be found in your website. My email address [email protected]
    Thank
    Steven

    Your local Apple Store, MacMall and do a Google search.

  • I authorized and dled ITUNES to the new pc.  Well i would like to know where is all my songs i purchased? I want to hear them on this pc, i bought them so where are they and how do i get them on here so i can buy new songs and make new playlists?

    I authorized and dled ITUNES to the new pc.  Well i would like to know where is all my songs i purchased? I want to hear them on this pc, i bought them so where are they and how do i get them on here so i can buy new songs and make new playlists?

    They will only be where you put them.  They do not magically appear in new places.
    Have you copied them from your old computer to your new one?

  • Modify Template to show columns like a SQL report

    Hi All,
    Really urgent. We have a procedure and we are using a pl/sql block to get the query. The layout is not nice so they want me to look at the template and change it so the result look like a sql query.
    Thanks.

    Hi,
    OK - if you are using the htp package to output the entire report, then firstly you should have a look at: [http://download.oracle.com/docs/cd/B14099_19/web.1012/b15896/pshtp.htm]. You will see that you have many more options than htp.p or htp.prn - there are htp.tableOpen, htp.tableRowOpen, htp.tableHeader and htp.tableData options for example. Using these, you can add in table/row/cell attributes that will include the styling that you need to get your report to display as you need.
    The best thing to do would be to look at the defintion of a report template that matches the style you need and then make a note of the attributes that are used for the TABLE, TR, TH and TD tags.
    For example, on my Theme 18, "Standard" report template, the Column Template 1 setting (which is for the data within the table) is:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data"&gt;#COLUMN_VALUE#&lt;/td&gt;so, in your code, when you want to output the data, you can use:
    htp.tableData(columnname, 'LEFT', null, null, null, null, 'headers="' || columnname || '" class="t18data"');Anything on the report template that does not have a corresponding parameter in the htp function, needs to be added into the final parameter - in the above example, the headers and class attributes do not match parameters in the htp.tableData() function, so become a single string in the final parameter.
    You just need to identify the attributes you need for each TABLE, TR, TH and TD tag and construct them in a similar way in your output.
    Andy

  • I would like to know where my videos are stored on my iPad mini

    I just got my iPad mini..I would like to know where to go to access the videos I have recorded.

    Photos

  • Hi! I would like to ask where can download ios 7.1.2??

    HI! Apple, can i ask for help?? I would like to ask where can i download ios 7.1.2?? Im using 7.1.1.. Hoping for your immediate respond to this.. Thanks

    It is no longer available. You will need to update to iOS8.0.2
    Cheers
    Pete

  • HT201441 I would like to help where I can not open my iPad I bought it from the shop and iPad

    Hi
    I would like to help where I can not open my iPad I bought it from the shop and iPad user when I want to open the device to access the mechanism. Ask me to calculate the previous owner. I went to the store where you purchased told me Contact Apple. Please, I've lost a sum of money. Device number imei 013116000935329

    Only the previous owner can help you.  Take it back to the store and demand your money back.  You will not be able to activate and use it without help from the previous owner.  The shop should not have sold you an iPad that was still associated with the previous owner's account.

  • I would like to ask where can I find an apple store in the Philippines that would change my Iphone5 battery. It is included in the defective batch that Apple produced.  Thank you

    I would like to ask where can I find a battery replacement here in the Philippines. My battery is included in the defective battery of Iphone5 that they sold. I am currently locked in with Globe service. I tried to call them but they insisted that I should call apple store. Kindly help me. Thank you

    You could try sites such as this to find what is available; maybe
    someone at a contact can suggest other directions to try...
    https://locate.apple.com/country
    •Apple - Philippines: sales, service, training certification
    https://locate.apple.com/ph/en/
    Perhaps there are independent Apple authorized service providers
    who may be able to handle any Apple vetted replacement + service.
    Good luck & happy computing!

  • I have an iPad 3 and would like to know where the digital compass is?

    I have an iPad 3 and would like to know where the digital compass is? I had to download a compass app. I've seen the iPhone 4S with a digital compass but not on my iPad 3. Thx.

    Screenshots from my iPhone.  Notice the lack of a circled X for the compass.  My phone is not JB.

  • How to use import parameter to be instead of SQL where sub-sentence ?

    I wrote a RFC to read data from SAP table. To fetch data flexibility, I want to use import parameter xx instead of where sub-sentence in SQL sentence.
       For example, "SELECT * FROM T WHERE XXX",  and "XXX" is a importing parameter.
       How can I use it.
       Thanks a lot.
       Frank.

    FUNCTION ZRFC_04.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(TARGETTABLE) LIKE  MAKT-MAKTX
    *"     VALUE(TWHERE) LIKE  MAKT-MAKTX
    *"  EXPORTING
    *"     VALUE(ZRETURN) LIKE  MAKT-MAKTX
    *"  TABLES
    *"      TMP_TEST1 STRUCTURE  ZTEST1
      DATA:
      TRANSACTION_ID LIKE ARFCTID,
      V_VAILD(1) TYPE C,
      scond(80) TYPE c.
      V_VAILD = 'X'.
    GET PARAMETER twhere fields scond.
    The error " 'LATE FIELDS' expected, not 'TWHERE FIELDS' " generated.

  • How to create a Formula Field that does a SQL "WHERE" statement

    Hi all,
    I have a field (let's call it "altuser") in a report I'm creating that pulls in a key value from the users table, which is the same table that I'm reporting on. So when I'm reporting on the users in the users table, I'm pulling in the value of altuser for each user.
    What I'd like to do is have a formula field that would pull in the name stored in the table instead of the key value for altuser. So what I envision the formula I need would be like:
    SELECT fullname FROM userlist
    WHERE userkey = altuser;
    Which would make it pull in the name of the user instead of the key value for the "altuser" field.
    I cannot figure out how to do this in the context of either a Formula Field, or a SQL Expression field. Can anyone show me how this would be done?
    Thanks,
    Will

    So right now, the SQL generated by Crystal Reports is like:
    SELECT "userlist"."username", "userlist"."lname", "userlist"."fname", "userlist"."altuser"
    FROM   "db"."dbo"."userlist" "userlist"
    My report now looks like this:
    FULLNAME          LOGIN          ALT. USER
    Jones, Sam        SJONES         2002
    Smith, Barney     BSMITH         2068
    (etc.)
    I have a Formula Field that concat's the <lname>", "<fname> for the first col, then uses the username value for that user for the second col, then the altuser value for that user for the third col. The thing I'm trying to do is resolve the ALT. USER data (which is a key value for the userlist file) into the LOGIN value for that user, so the report would end up looking like:
    FULLNAME          LOGIN          ALT. USER
    Jones, Sam        SJONES        KBROWN
    Smith, Barney     BSMITH        FROGERS
    (etc.)
    where the record with key "2002" has the username value "KBROWN", etc. (they are other user records in the same userlist file.)
    Hopefully this makes it clearer...
    Thanks,
    Will

  • Not Like in SQL not working

    Trying to use not like in the following sql:
    select *
    from respondents
    where sample_id = 00000001
    and email not like '%cccp.org%';
    Right now, I'm getting back 51 rows, but 1/2 of the rows have the wrong domain in the email fields, and I need to filter all of the wrong ones, except cccp.org.
    There was a thread,
    NOT LIKE
    And I tried that, but not getting the correct results.
    thanks

    Given a simple table like:
    SQL> SELECT * FROM t;
    EMAIL
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    [email protected] WHERE email NOT LIKE '%cccp.org%' will return:
    SQL> SELECT email FROM t
      2  WHERE email NOT LIKE '%cccp.org%';
    EMAIL
    [email protected]
    [email protected]
    [email protected] is exactly what you asked for. However, this statement "1/2 of them have the wrong email domain, like .edu and .com email domains" seems to contradict the predicate. Do you really want something more like:
    SQL> SELECT email FROM t
      2  WHERE email LIKE '%cccp.org%';
    EMAIL
    [email protected]
    [email protected]
    [email protected]
    John

Maybe you are looking for

  • How to link to my bluetooth headset

    The Mcbook pro will not recognize my bluetooth headset.  What is the matter?

  • How to Pan/Crop a Video?

    Alright, I'm a complete newbie when it comes to AE and I can't figure out how to pan/crop videos like in Sony Vegas. I need both my video and text to  be in a different position, but amazingly I couldn't find any results online. I am running CS6 , th

  • Flash player 11.7  causes loss of sound on Smilebox program

    When Adobe updated Flash Player 11.6 to 11.7 caused me to lose sound on my Smilebox program   contacted Smilebox and they advised this is an Adobe problem and they need to fix    When is this going to be corrected 

  • Visio Stencil Secure ACS / Cisco Appliance

    Hello, Im trying to find Visio Stencil for: CSACSE‐1113‐K9 Cisco Secure ACS 4.X Solution Engine 1113 Appliance But in http://www.cisco.com/en/US/products/prod_visio_icon_list.html I didn't find any... I also search in xml file "http://www.cisco.com/e

  • BPML for FI/CO

    Hey Guys, Please send the Business Process Master List (BPML) which lists out all the sap standard menu transactions in FI & CO in hierarcy form . You could sent it to me at [email protected] Regards Bijoy