"Find all occurences of" issue

Hi experts,
I have an issue and I need some help.
I have one internal table for equipments and it's one column contains status values as:
COL1
AVLB
ESTO PIAC
PIAC
Now, on the selection screen, I have a select option for equipment status.
So, suppose, if user enters values AVLB and ESTO is select option, then out of these 3 entries only entry 1 and 2 should come.
Third entry should not come as it is neither AVLB nor PIAC.
For this, I thought of using
    FIND ALL OCCURRENCES OF <what to give in here> IN TABLE i_main
    RESULTS results.
    I can not hard code any status as it will be determined by select option and select option could have multiple entries.
How do I filter out the table entries based upon the select option values.
I can not use
delete i_main where status not in s_stat. (as this status column is a concatenation of various equipment status values)
Please help me on the same.

Hi,
Try this way. It works.
REPORT ztest_program.
DATA: BEGIN OF it_data OCCURS 0,
        text TYPE char15,
      END OF it_data.
SELECT-OPTIONS:s_text FOR it_data-text.
*"START-OF-SELECTION.
START-OF-SELECTION.
  "Populating data
  it_data-text = 'AVLB'.
  APPEND it_data.
  CLEAR  it_data.
  it_data-text = 'ESTO PIAC'.
  APPEND it_data.
  CLEAR  it_data.
  it_data-text = 'PIAC'.
  APPEND it_data.
  CLEAR  it_data.
  "If you give select options AVLB and ESTO*, It works as you expected.
  LOOP AT it_data WHERE text IN s_text.
    WRITE:/ it_data-text.
  ENDLOOP.
  "If you give select options AVLB and ESTO, It works as you expected.
  LOOP AT it_data.
    LOOP AT s_text.
      IF it_data-text CS s_text-low.
        WRITE:/ it_data-text.
      ENDIF.
    ENDLOOP.
  ENDLOOP.
Thanks
Venkat.O

Similar Messages

  • Find All Occurrences always fails within loop

    Dear forumers,
    There's this strange problem that requires a fix.
    Finding all occurences of '#' works fine here:-
    REPORT  zz_test.
    DATA: lv_text TYPE string,
          ls_result TYPE match_result,
          et_release type table of yytc_release,
          lt_result  TYPE match_result_tab.
    lv_text = '"RFC-1234#Create ""Payroll"" under NL directory"'.
      FIND ALL OCCURRENCES OF REGEX '#'
                IN lv_text
                RESULTS lt_result IGNORING CASE IN CHARACTER MODE.
      IF sy-subrc = 0.   " SY-SUBRC is always 0
        READ TABLE lt_result INTO ls_result INDEX 1.
        WRITE :'Offset: ' .
        WRITE: ls_result-offset .
        WRITE: lv_text+00(ls_result-offset).
      ENDIF.
    But it always fails here, within a loop at an internal table:-
    SELECT * .... INTO TABLE it_jira ...
    LOOP AT it_jira ASSIGNING <jira>.
      <release>-summary = <jira>-summary.
      IF <release>-type CS 'Subtask'.
        " <release>-summary is of data type CHAR255
        PERFORM get_subtask USING <release>-summary.  
      ENDIF.
    ENDLOOP.
    FORM get_subtask  USING    pv_summary TYPE yytc_release-summary.
      DATA:
        lv_string  TYPE char255,
        lv_final   TYPE char255,
        lv_summary TYPE string,
        lv_strlen  TYPE i,
        lt_result  TYPE match_result_tab.
      lv_string = pv_summary.     " LV_STRING = '"RFC-1234#Create ""Payroll"" under NL directory"''
      CONDENSE lv_string.
      lv_strlen = STRLEN( lv_string ).
      lv_strlen = lv_strlen - 1.
      IF lv_string+0(1) = '"' AND lv_string+lv_strlen(1) = '"'.
        lv_strlen = lv_strlen - 1.
        WRITE lv_string+1(lv_strlen) TO lv_final+1(254).
      ENDIF.
      lv_summary = lv_final.
    "  FIND ALL OCCURRENCES OF '#'
    "      IN lv_summary
    "    RESULTS lt_result IGNORING CASE.   * SY-SUBRC is always 4 here too
      FIND ALL OCCURRENCES OF REGEX '#'
          IN lv_summary
        RESULTS lt_result IGNORING CASE IN CHARACTER MODE.
      IF sy-subrc = 0.    " SY-SUBRC is always 4 here - why?!  :(
      ENDIF.
      CLEAR: lv_string,
             lt_result.
    ENDFORM.                    " GET_SUBTASK
    Only when the string LV_SUMMARY is edited from within the debugger (add space to the string prefix, etc), the SY-SUBRC will be 0 and there'll be data found in LT_RESULT.
    How can I resolve this issue? Please do help. Thanks.

    I think the subtle difference is that in your first example the character is actually '#' whereas in the second example it is actually another (unprintable)value such-as line-feed and only APPEARS to be '#'.
    You must find out what the value in question is(will it always be the same value?) and then replace that instead of '#'.

  • Find all music files and move to one folder for all of family to access, find all music files and move to one folder for all of family to access

    I seem to have music files in various places on my laptop, on my husbands computer and our main imac.  What we want to do is put all music on imac so when each of us logs on we have the same files availabe in itunes, but we logon seperately so we can have different playlists and checked music. So here is what I want to do:
    Find all music files on each computer seperately and put everything in one folder one each computer, so three folders total to start...
    Move my husbands itunes library and my itunes library from each of our laptops to our main imac, making one huge itunes folder
    I want to store our music on an external hard drive, which I have, so I have a full library for backup purposes.
    I want all future music downloaded on any of our laptops to transfer to the main imac computer, again to keep one main library
    I want all video, apps, books, etc on each laptop to be available in one file on my main imac also so we can all use them
    So mainly I want to organize, organize, organize and put everything in one spot so things don't get all messed up and some items are only accessible to me some times and not my husband or vice versa.  We want to share everything we can so we don't have to pay twice. I have read many instuctions, but nothing seems to be helping me and was hoping someone could...
    Thanks, l

    I am totally running into the same issue as well. On top of that, when syncing to my iPhone, it took some of the tracks from my iphone and recopied them to the iTunes library, as new files, so now I have a ton of duplicates, and tons of tracks that can't find the iTunes folder, so they have the little "!" next to them.
    It would be really nice to have someone answer this question. I didn't think, moving my iTunes library to a bigger external hard drive would have caused all this madness

  • I have recently sent my iPhone 3G away for repair and have received a new one in return. I managed to backup my phone before it was sent away, however now I am trying to sync the information again but I'm unable to find all of my purchased music on iTunes

    I need help trying to locate where I can find all of my purchased music from my account with the iTunes, to enable me to sync it back on to my new iPhone 3G... Any suggestions please??

    I am having this problem.  At first with the new iPhone 5, and then with the iPad 2.  I am not sure why this is happening. 
    My gut feeling is this is an iO6 issue and here's why -
    The problem mainly occurs with apps.  I have about 150 apps, and when I plugged in the phone, iTunes went to sync all of them.  The process would hang up after about 20 - 30 apps were loaded onto the phone. I could tell where about the process hung up because the apps on the phone showed up as "waiting".
    Then on the iPad 2 I plugged in to sync and saw there was a huge "Other" component in my storage.  It required me to restore the iPad 2 from backup.  With this restore the same issues occurred - putting the apps back on the iPad would hang up.  The videos on the iPad also got stuck - maybe after about 10 hours of videos transfered iTunes crashed.
    My solution has been to soft reset the device, restart Windows, and continue the process until it's complete.  This is remarkably inefficient and time-intensive but everything works with patience.
    I have been wondering if others have had these same problems. 

  • How do I find all pictures with no (empty) keyword ?

    I have decided to import all my pictures into LightRoom.
    A lot of my older pictures are not registered with any keywords :(
    - only with IPTC location information.
    My plan is to systematic go through all my pictures and add relevant keywords to all pictures - so my old pictures become as searchable as my newest pictures.
    Some of my old pictures has keywords some has not.
    How do I in Lightroom - find all pictures with no keywords?
    I have tried to use the Find tool - but don't see any options to search for "Empty/missing" keywords.
    Also I would like to find all pictures with few keywords and in step II add additional keywords to these pictures.
    Any ideas on how to make a find all pictures where number of keywords is less than X inside or outside LightRoom.
    Henrik Bach
    Denmark

    > I also did think of the SQL idea.
    > If I find a way of doing this I will repost my findings.
    Well, being a tech geek, I found this challenge kind of irresistible,
    and I'm happy to report I have a solution for you.
    STEP 1
    First, make a copy of your "Lightroom Database.lrdb" file (we'll work
    off the copy to be safe)
    STEP 2
    Next, you need to be able to browse the database. The database is in
    SQLite3 format. I tried installiing an SQLite3 ODBC driver and accessing
    it through MS Access 2003. While Access was able to see all of the
    tables in the database, every time I tried to link to one I got:
    "Reserved error (-7748); there is no message for this error"
    I found a few tips for this but wasn't able to work around it and get it
    to work. Which is a shame, since Access would be the easiest way for
    browsing and querying tables.
    Instead I found an open source tool called SQLite Database Browser.
    http://sourceforge.net/project/showfiles.php?group_id=87946&package_id=91778&release_id=41 4746
    I used the Windows version. There appears to be a version for MacOSX on
    PowerPC. It doesn't look like there is a version for Intel based Macs
    (though if you know how, you could always try downloading the source and
    compiling it yourself).
    STEP 3
    After you install the browser, open it up, choose "Open Database" and
    select the COPY of the lightroom database we made in step 1
    STEP 4
    go to the Execute SQL tab and issue the following command
    SELECT A.idx_filename, count(C.name)
    FROM Adobe_imageFiles A, AGLibraryTagImage B, AGLibraryTag C
    WHERE A.image=B.image AND B.tag=C.id_local AND C.kindName='AgKeywordTagKind'
    GROUP BY A.idx_filename
    HAVING count(C.name) <= 3
    That will give you all images with 3 or fewer keywords applied.
    Of course, theres no guarantee that this wont break in future versions.
    Now an explanation of the data.
    Adobe_imageFiles - contains data about image files:
    1) idx_filename is the filename
    2) absolutePath is the full file path
    3) image is a unique ID for the image which you can cross reference in
    other image related tables
    AGLibraryTag - contains info about "tags" applied to images:
    1) id_local is a unique ID for this "tag", which you can use to cross
    reference in other tag tables
    2) kindName is the kind of tag you are looking at. Available values
    appear to be:
    AgCaptionTagKind
    AgCollectionTagKind
    AgCopyrightTagKind
    AgEnumeratedMetadataTagKind
    AgFolderTagKind
    AgImportTagKind
    AgKeywordTagKind
    AgMissingFileTagKind
    AgQuickCollectionTagKind
    AgSpecialContentOwningTagKind
    AgTempImagesTagKind
    3) name is the value for that tag (the collection name, the keyword, etc)
    AGLibraryTagImage - Use this to connect the images and tags tables

  • Oracle query to get all occurences of a text in a string

    Hi
    Does anybody know how to write a query to get all occurences of a text in a string in different rows of the table
    For eg:
    I have a string <aa>bb</aa><aa>cc</aa><aa>ddd</aa>
    I have to find every occurence of <aa> and get the data between <aa> and </aa>
    So the output should be
    bb
    cc
    ddd
    I think this can be done by using a regular expression but I dont know how.
    Can anyone help me?
    Thanks in advance.

    user2360027 wrote:
    BluShadow,
    The query gives correct results if i only have <aa></aa>
    What if i have <ff></ff>?
    Example:
    <aa>bb</aa><aa>cc</aa><aa>ddd</aa><ff>dsd</ff>
    I want to have the following (dsd should not be there in the result)
    bb
    cc
    dddThis is a new requirement and not what you asked for in your original post. Perhaps you should tell us exactly what you are trying to achieve and what database version you are using to save us guessing.
    To crokitta,
    This version will deal with multiple rows..
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select '<aa>bb</aa><aa>cc</aa><aa>ddd</aa>' as x from dual union all
      2             select '<aa>xx</aa><aa>yy</aa>' from dual)
      3  -- end of test data
      4  select x, vals
      5  from (
      6    select x, regexp_replace(REGEXP_SUBSTR (x, '>[^<]+', 1, lvl),'[<>]') as vals
      7    from t
      8        ,(select level lvl from dual connect by level <= (select max(length(regexp_replace(x,'[^>]*'))/2) from t))
      9    )
    10  where vals is not null
    11* order by 1,2
    SQL> /
    X                                  VALS
    <aa>bb</aa><aa>cc</aa><aa>ddd</aa> bb
    <aa>bb</aa><aa>cc</aa><aa>ddd</aa> cc
    <aa>bb</aa><aa>cc</aa><aa>ddd</aa> ddd
    <aa>xx</aa><aa>yy</aa>             xx
    <aa>xx</aa><aa>yy</aa>             yy
    SQL>

  • Error: Unable to find all subVIs from saved VIs.

    TestStand 2010 SP1, LabVIEW 2011, WinXP
    Trying to build a deployment in TestStand.
    During the build, I get the now-infamous popup:
    Title: "Save Modified VIs?"
    Text: "An error occured while trying to read the dependencies of your VIs; a possible cause for this problem is VIs not saved in the current version of LabVIEW. Would you like to save any modified VIs now?"
    I select "yes", and the build then fails with errors in the log pane of the "Build Status" window.  The error is:
    Error: Unable to find all subVIs from saved VIs, either a subVI is missing or the VI is not saved under the current LabVIEW version.
    The missing file path is:  etc, etc.
    I go to said missing path.  The VI is in fact present.  I open the VI and do "Save All", try again.  Same thing.  Then, I try a Mass Compile on the test VI directory.  Attempt to build again, same error.
    Note that I do call some VIs dynamically, but those are all present in my workspace, and are not found in this error.
    Is there a debugging option or log file or some kind of trace I can do to dig into this and find out the state of things causing the error?  Please help me out here.
    -Andy

    One quick way to narrow down the issue is to change your LabVIEW adapter to Run-Time engine and then try and run the sequence in the Sequence Editor.
    Also, triple check your search directories and make sure you're not pulling in VIs from an unexpected location.
    When you see that dialog it's already too late to save so trying to Save at that point never works.
    Another tip is to ignore which VIs it says are not saved in the current version and instead look at the subVIs that those VIs are calling. You can run into this if you have two subVIs loaded with the same name.
    CTA, CLA, MTFBWY

  • ResolveNodes doesn't find all nodes

    Hi there,
    I would like to find all text fields with a specific name in my form (and do things with them...).
    Funny thing is: I sometimes get only one hit or no hits at all. I never managed to get the correct whole list of fields. Am I doing something wrong?
    My code is (here in the form-ready event):
    var arrayFields = xfa.resolveNodes("myField[*]");
    if (arrayFields == null) {
        xfa.host.messageBox("nothing found");
    else {
        xfa.host.messageBox(String("Number of Fields found: " + arrayFields.length));
        for (var iFieldCounter = 0; iFieldCounter < arrayFields.length; iFieldCounter++) {
            xfa.host.messageBox( arrayFields.item(iFieldCounter).somExpression);
        } // for iFieldCounter
    } // else some result
    PS. I have a little sample form ready. Yet I don't find a way to upload it to the forum.
    Uli

    [email protected] wrote:
    As resolveNodes has an issue with returning objects located in subforms below $template.#subform.#subform[*], you're left with traversing the dom tree yourself.
    Thanks for that information. Saved me from trying things for ever.
    I wrote this function "resolveNodesFixed()" instead. Whoever has the same problem in the future may try it this way:
    var arrayFields = resolveNodesFixed("myField");
    if (arrayFields == null) {
        xfa.host.messageBox("nothing found");
    else {
        xfa.host.messageBox(String("Number of Fields found: " + arrayFields.length));
        for (var iFieldCounter = 0; iFieldCounter < arrayFields.length; iFieldCounter++) {
            xfa.host.messageBox( arrayFields[iFieldCounter].somExpression);
        } // for iFieldCounter
    } // else some result
    function resolveNodesFixed(sObjectName) {
        // Finds all objects by the name of sObjectName starting from the top.
        // Parameters:
        //        sObjectName: Name of the searched for object
        // Result:
        //         returns an array of found objects. It may be empty.
        arrayHits = new Array();
        traverseForm(xfa.form, arrayHits, sObjectName);
        return arrayHits;
    } // function resolveNodesFixed()
    function traverseForm(oFormNode, arrayHits, sObjectName) {
        // runs thru all nodes of the form and adds every node with the name "sObjectName" to arrayHits
        // Parameters:
        //        oFormNode:   starting node. From this node downwards this function searches for nodes.
        //        arrayHits:   array to add the found nodes to
        //        sObjectName: Name of the searched for object
        // Result:
        //         returns true if everything is all right
        try {
            //xfa.host.messageBox(oFormNode.somExpression + " - " + oFormNode.nodes.length);
            for (var iIndexChildObject = 0; iIndexChildObject < oFormNode.nodes.length; ++iIndexChildObject) {
                var oChild = oFormNode.nodes.item(iIndexChildObject);
                if (oChild.name == sObjectName) {
                    arrayHits.push(oChild);
                }  // if oChild.className == sObjectName
                if (oChild.isContainer) {
                    // this node appears to be a subform. Recursivly we check this subform's sub nodes.
                    traverseForm(oChild, arrayHits, sObjectName); // if the node contains subnodes make a recursive call to the function
                } // if oChild.isContainer
            } // for iIndexChildObject
        } // try
        catch (e) {
          console.println("Error: " + e);
          return false;
        } // catch
        return true;
    } // function traverseForm()

  • Disable find all function

    I had an instructor of a class come up to me with an issue with his students(they found a easy way to cheat). Students should have the ability to search within a document for their answer, however with as many PDFs we have, they need to know which document to search for the right answer. Now they are just using ctrl+shift+F and searching every document, also getting wildly crazy answers from the wrong PDF. Is there a way to disable to find all function while still keeping the find function for each individual document?

    Ah, the military, that explains it...
    What you can do is convert the pages to image files, then create new PDFs from those image files and not run Text Recognition on them.
    The Find function will be useless on these new files.

  • Using iPad air, iPod, iCLoud and WinPro 7 - I am not finding all my tunes and movies among all these devices.

    When I orignally installed iTunes current update, and tried to move about the devices iTunes would crash. I uninstalled it, then reinstalled it. It seems to be stable, however as  before I am not finding all of my TUnes and Movies on all my devices.
    Any one?
    Thanks-

    Hey thomnj,
    From what I understand, it sounds like after uninstalling and reinstalling your iTunes as a troubleshooting step, you're now missing some of your media? I would troubleshoot the issue with the steps in here:
    iTunes: Finding lost media and downloads
    http://support.apple.com/kb/TS1408
    Welcome to Apple Support Communities!
    Best,
    Delgadoh

  • Find all Office 365 users where calendar permissions on default user is not "NonEditingAuthor"

    Hi
    How do I make a Powershell script to find all users where calendar permissions on "default" user is not "NonEditingAuthor" in Office 365?
    Best Regards
    MSISOM

    Hi MSISOM,
    To export calendar permission on default user, please refer to this script:
    $rptCollection = @()
    $mailboxes = get-mailbox -ResultSize Unlimited
    $mailboxes | foreach-object{
    $alias = $_.alias + ":\Calendar"
    $displayName = $_.DisplayName
    write-host $alias
    $permissions = Get-MailboxFolderPermission $alias | Where-Object {$_.user.UserType.value -eq "Default"}
    if($permissions -ne $null){
    foreach($perms in $permissions){
    foreach($right in $perms.AccessRights){
    $rptCollection += New-Object psobject -Property @{
    "User" = $perms.User
    "Identity" = $perms.Identity
    "StringAccessRights" = $right}
    }$rptCollection
    The result is for your reference:
    Then you can filter the result with the cmdlet "where-object {}"
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • Query to find all the view name and their size in GB

    Hi,
    What is the query to find all the view name and their size in GB.I am aware of joining all_views and user_segments but this is not serving the purpose.is there any table i need to join to get the desired result
    Thanks

    You could of course be thinking of views as they are stored in other RDBMS' as some of them actually create the view as a table on the database with a copy of the data in it and maintain that data as the base tables are updated.
    As already mentioned, Oracle just stores the SQL of the View and executes that SQL when the view is queried.
    Alternatively, Oracle also has "materialized views" which are created as snapshots of the data and will have a size. This data is updated (refreshed) based on the parameters used when creating the materialized view which means that it will either be, commonly, when a commit is issued or when a refresh is explicitly requested (refresh on demand).

  • How to find all workitems in sap

    Hi All,
    I need to find all the workitems present in user's inbox in sap.Pls let me know how to find it.
    In my case, i am getting issue lock table overflow due to which user not able to login to sap system. I checked in SM12 & it show that it happened during execution of half-hourly report RSWWCOND by WF-BATCH.
    Is it bcos i have no of workitems pending & locked by this report & when the next lock requested by this report , we get the above overflow issue.
    pls do help.
    Thanks.

    Hi Harrysingh,
           A Standard workflow design will never get into Lock Table overflow. and unprocessed Workitem will not create any entry in the lock table. This should because of some Bespoke and can be found out from SM12. Once you get the table which is creating maximum no if locks, you would be able to guess where the problem is. Processing all the unprocessed workitem will not solve the lock issue, provided the method coding do not have junk codes.
    Regards,
    Simin Raveendran.

  • I have saved a large number of cd on an extermal drive via my laptop. I have now moved my external drive to my desk to but I tunes does not find all the CD i have saved on the external drive

    I have saved a large number of cd on an external drive via my laptop. I have now moved my external drive to my desk to but I tunes does not find all the CD i have saved on the external drive

    Depending on which email client software you use
    the files should be in 'your home folder' library, esp.
    if you use Mail application.... ~/Library/Mail
    Since you don't specify what mail application,
    that would most be associated with the file.
    I notice there are some items to the right of your post
    where it says "more like this' so that may be worth a
    look to see if similar issues were answered. Also, the
    Help viewer in your system is a searchable database.
    Seems that google also brings up fair information, too.
    Do you have a complete bootable clone of your entire
    Mac system on an externally enclosed hard disk drive?
    Good luck & happy computing!

  • Is there a fix for iTunes Artwork screensaver finding ALL artwork

    The iTunes screensaver is not finding all the artwork that iTunes has associated with albums. It's only finding cover art that I've manually inserted or paid for from the iTunes music store. I've ready a number of posts from the past month with people experiencing the same issue. Has anyone figured out a way to force the screensaver to look in the right place for all album artwork saved on the cpu? Or is this a lost cause?
    Thanks

    The issue here is that the iTunes Artwork screen saver only looks for artwork embedded in tracks and not in the new artwork database provided by iTunes 7. The only solution for this problem currently available is to embed the tracks with the downloaded iTunes 7 artwork.
    There is an apple script that will do it for you here
    http://www.dougscripts.com/itunes/scripts/scripts13.php?page=1#embedart
    Simply select all tracks and run the script. It will figure out which files need embedded artwork and leave the rest alone.
    After doing that the screen saver will load all of your artwork.

Maybe you are looking for

  • DHCP fails to get IP address

    I'm using dhcpcd to try to get a lease for an IP address, but each attempt is met with a "timed out" message. The DHCP server works for other Arch Linux installs on this network, and it works for the same laptop when using Windows. This install also

  • Multiple S650s in single domain

    I just recently purchased two S650s for my organization assuming that it could be configured like our C150s (clustered). Now that I actually hooked up the second device I found my assumption to be wrong. What is the best way to configure them for loa

  • Can't install iWork on 1st Gen MBP running 10.6.8

    I have a 1st generation MacBook Pro running OS 10.6.8. I tried downloading iWork from the App Store and I'm given this message: Keynote can't be installed on New HD because Mac OS X version 10.7.4 or later is required. This seems odd given I had a pr

  • I'm unable to open my Office Word for Mac. The message say's check with developer to make sure Microsoft Word works with this version of Mac OS X.

    I'm unable to open my Office Word for Mac. The message say's check with developer to make sure Microsoft Word works with this version of Mac OS X. Orginally I downloaded OFFICE from the Apple Store App, so unable to reinstall as it suggest.

  • [solved] on save, or database access program crashes

    when ever i try to access any part of the hdd the program that i am useing will instantly crash (i.e. say i was going to save an image in FF, when i click "save inage as..." FF will instanly close) and it is happening with every GUI, cli still works