SELECT with pattern CP '50*' is not working on material numbers MATNR

Hello,
I have a specific matchcode for searching on material numbers with a function module as selection method.
In this function module, the SELECT clause is built dynamically as bellow.
      SELECT (temp3)
        INTO CORRESPONDING FIELDS OF TABLE result_tab  UP TO CALLCONTROL-MAXRECORDS ROWS
         FROM (temp)
         WHERE (temp2) .
In the "temp2" variable, I use RANGES for the selection simply built with values of SELECT-OPTIONS coming from the search help selection screen.
I am facing the following problem :
When a search is executed on material number with the following pattern '50*' --> nothing is found !
When I run a search on '50575' --> the material number is found !
I expect it is a problem of convertion routines (external to internal format) but I am not able to fix a solution...
We are in SAP_BASIS 700.

I think it can be done.
I have -    
CONCATENATE  'Z+_'   '00+' INTO  r_ranges-low .
    r_ranges-sign = 'I'.
    r_ranges-option = 'CP'.
    APPEND r_ranges.
    SELECT  ar_object FROM toasp
      INTO CORRESPONDING FIELDS OF table lt_toasp
       WHERE ar_object IN r_ranges.
And it returns all values with pattern 'Z_00'.
(Z1_001, Z1_002 etc.)
If the pattern '50*' is not working, you could try using '50+++'.
Regards,
MaryM

Similar Messages

  • The select with for all entries is not working correctly

    IF NOT i_ekko_ekpo[] IS INITIAL.
        SELECT ebeln
               ebelp
               zekkn
               vgabe
               bewtp
               menge
               bpmng
               shkzg
               INTO TABLE i_ekbe
               FROM ekbe
               FOR ALL ENTRIES IN i_ekko_ekpo
               WHERE ebeln EQ i_ekko_ekpo-ebeln.
                AND ebelp EQ i_ekko_ekpo-ebelp.
        IF sy-subrc EQ 0.
          SORT i_ekbe.
        ENDIF.
      ENDIF.
    I have a PO with 2 line items in i_ekko_ekpo. In EKBE, I have 49 recs for this PO and this select is returning only 13 recs.
    I tried by commenting EBELP and still the same result.
    Thanks
    Kiran
    Edited by: kiran dasari on May 22, 2009 9:56 PM

    Hi Sudhi, I added these now but still no charm
        SELECT ebeln
               ebelp
               zekkn
               vgabe
               bewtp
               menge
               bpmng
               shkzg
               INTO TABLE i_ekbe
               FROM ekbe
               FOR ALL ENTRIES IN i_ekko_ekpo
               WHERE ebeln EQ i_ekko_ekpo-ebeln
                 AND ebelp EQ i_ekko_ekpo-ebelp
                 AND zekkn GE '00'
                 AND vgabe IN ('1','2').
    And as per your note: in the 13 entries, am having duplicate also. This is something weird for me now.
    Any more clues.
    Thanks
    Kiran

  • Select with too many where conditions not working fine....equal to and not

    Hi Everyone,
      I am getting rows into internal table lt_mseg even if this where condition like this werks NE gs_t001w-werks in below code
    is true. It looks like it's not excluding if not equal to gs_t001w-werks. Is anything wrong in below code? please help me...
    SELECT * INTO TABLE gt_t005 FROM t005 WHERE xegld = 'X'.
    SELECT * FROM t001w INTO TABLE gt_t001w FOR ALL ENTRIES IN gt_t005
    WHERE ( land1 = gt_t005-land1 OR land1 = 'NO' ) AND vkorg NE 'LDE'.
    SELECT * FROM mkpf INTO TABLE gt_mkpf
    WHERE budat IN p_oextdt AND vgart = 'WL'.
    LOOP AT gt_mkpf INTO gs_mkpf.
    CHECK gt_t001w[] IS NOT INITIAL.
    SELECT * FROM mseg APPENDING TABLE lt_mseg
    FOR ALL ENTRIES IN gt_t001w
    WHERE mblnr = gs_mkpf-mblnr
    AND mjahr = gs_mkpf-mjahr
    AND bwart NE '641'
    AND xauto = ' '
    AND werks NE gs_t001w-werks
    AND kunnr = gt_t001w-kunnr.
    ENDLOOP.

    Hi Sany,
      Thanks for your reply. I f I remove  this LOOP AT gt_mkpf INTO gs_mkpf and use for all entries how can I exlude plants that I got from t001w?
       I used range here in below code now I am getting run time error in this loop, it says value table for IN itab operator has unexpected format....
    DATA:
          gt_t005 TYPE TABLE OF t005,
          gs_t005 LIKE LINE OF gt_t005,
          gt_t001w TYPE TABLE OF t001w,
          gt_rng_plant  type range of t001w,
          gs_rng  like line of gt_rng_plant,
          gs_t001w LIKE LINE OF gt_t001w,
          gt_mkpf  TYPE TABLE OF mkpf,
          gs_mkpf  LIKE LINE OF gt_mkpf .
    SELECT * INTO TABLE gt_t005 FROM t005  WHERE xegld = 'X'.
      SELECT * FROM t001w INTO  TABLE gt_t001w FOR ALL ENTRIES IN gt_t005
       WHERE ( land1 = gt_t005-land1 OR land1 = 'NO' ) AND vkorg NE 'LDE'.
      SELECT *  FROM mkpf INTO TABLE gt_mkpf
                  WHERE budat IN p_oextdt AND vgart = 'WL'.
      gs_rng-sign = 'I'.
      gs_rng-option = 'EQ'.
      LOOP AT gt_t001w INTO gs_t001w.
        gs_rng-low = gs_t001w-werks.
        gs_rng-high = gs_t001w-werks.
        APPEND gs_rng TO gt_rng_plant.
      ENDLOOP.
        LOOP AT gt_mkpf INTO gs_mkpf.
          SELECT * FROM mseg APPENDING TABLE lt_mseg
              FOR ALL ENTRIES IN gt_t001w
              WHERE mblnr = gt_mkpf-mblnr
                AND mjahr = gt_mkpf-mjahr
              AND bwart NE '641'
                AND xauto = ' '
                AND werks not in gt_rng_plant
                 AND kunnr = gt_t001w-kunnr.
        ENDLOOP.

  • Why does right clinking on link and selecting open in new tab does not work?

    Why does right clinking on link and selecting open in new tab does not work?
    It opens up a blank page. The only way to make the link work is to click on the navigation bar in the new tab and press enter to reload the link.

    Do you have that problem when running in the Firefox SafeMode?<br/> ''A troubleshooting mode.''<br />
    1.You can open the Firefox 4.0 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut. <br />
    2. Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut to open it again.''
    If not, see this: <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • Upgraded to os7 and done my updates on the apps as they appear.. Any function to do with the iBook store is not working or visible.  The purchase at the end of a sample book doesn't work either.

    Upgraded to os7 and done my updates on the apps as they appear.. Any function to do with the iBook store is not working or visible.  The purchase at the end of a sample book doesn't work either. Anyone have a solution?

    Upgraded to os7 and done my updates on the apps as they appear.. Any function to do with the iBook store is not working or visible.  The purchase at the end of a sample book doesn't work either. Anyone have a solution?

  • Hi! I am having a problem with my dictation. It works fine with Greek but it does not work at all with English. Anyone knows why?

    hi! I am having a problem with my dictation. It works fine with Greek but it does not work at all with English. Anyone knows why?

    Have you changed the system voice to an English one in system preferences?

  • TS1292 How do I redeem a card with a code that does not work?  The support store takes me in circles?

    Help and support sends you in circles and does not help redeem a card with a code that does not work.

    Well, they have a website, but here is a link to their information about unlocking iPhones.
    http://www.att.com/esupport/article.jsp?sid=KB414532&cv=820#fbid=6d7EKuCF_dr
    You may not qualify for an unlock though.

  • [svn:fx-trunk] 5019: ASDoc updates to indicate that some Halo containers do not work with the Spark equiv (ControlBar does not work with Spark Panel/ AppControlBar does not work with Spark Application), and indicate that Canvas, Box, Tile, Panel have Spa

    Revision: 5019
    Author: [email protected]
    Date: 2009-02-19 13:17:21 -0800 (Thu, 19 Feb 2009)
    Log Message:
    ASDoc updates to indicate that some Halo containers do not work with the Spark equiv (ControlBar does not work with Spark Panel/AppControlBar does not work with Spark Application), and indicate that Canvas, Box, Tile, Panel have Spark equivs
    QE Notes: None
    Doc Notes: None
    Bugs: -
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Box.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Canvas.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ControlBar.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/HBox.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Tile.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/VBox.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as

    Hi DST
    This is a great effort and gesture. thank you on behalf of all the newbies.
    PJ

  • You must have connected the Time Capsule with a router that does not work with my direct cable from my ISP

    you must have connected the Time Capsule with a router that does not work with my direct cable from my ISP

    I tried to answer in your other post.. please stick to one thread ..
    What method of internet do you have.. is this fibre install.. if so the TC should just plug in and use dhcp in router mode.. press and hold the reset and it will go back to router mode by default.

  • HT1222 hello i have a problem with my fingerprint id its not working anymore like before his not recognised my finger anymore why ?

    hello i have a problem with my fingerprint id its not working anymore like before his not recognised my finger anymore why ?

    I have had to periodically delete and re-enter my fingerprint. The last update (7.1) may have improved that. You can delete by going to Settings > Touch ID & Passcode, enter your passcode and then tap "Turn Passcode Off" and then go back to the same area, put a passcode back on and then a fingerprint.

  • Command.text with ODBC escape sequence is not working in VC++, Bug in OLEDB ?

    Command.text with ODBC escape sequence is not working in VC++. The Code, which written in VB is working perfectly. Is there any different syntax in VC++ or bug in
    OLE DB provider ?. I am using OraOLEDB 8.1.7 version.
    Thanks
    Mani
    VB Code
    ' Enable PLSQLRSet property
    Cmd.Properties("PLSQLRSet") = True
    ' Stored Procedures returning resultsets must be called using the
    ' ODBC escape sequence for calling stored procedures.
    Cmd.CommandText = "{CALL corpuser.GetCorpUserRec(?, ?)}"
    Set Rst1 = Cmd.Execute
    VC++ Code (while execute it is giving error )
    pCommand->CommandText = "{CALL corpuser.GetCorpUserRec(?, ?)}";
    pRs1 = pCommand->Execute(NULL,NULL,adCmdStoredProc);

    Hi
    The odbc escape sequence for calling stored procedures works fine with VC++ also.
    You can check the sampe application at following url :
    http://otn.oracle.com/sample_code/tech/windows/ole_db/content.html
    Hope this helps
    Chandar

  • I have a iPhone4 acquired in Portugal. I will be moving to the EQUATOR (South America). Whenever I have visited the country before, with other cellphones, they did not work (different band) forcing me to buy a local cellphone. Will my iPhone4S work there?

    I have a iPhone4S acquired in Portugal. I will be moving to the EQUATOR (South America). Whenever I have visited the country before, with other cellphones, they did not work (different band) forcing me to buy a local cellphone. Will my iPhone4S work there?

    If it is unlocked it will work if you get a SIM from the carrier you will be using. Note that Apple does not and cannot unlock phones. Only the carrier it is presently locked to can unlock it.

  • Anyone had issues with on/off sleep button not working anymore

    Anyone had issues with on/off sleep button not working anymore?

    If there is Warranty or AppleCare make Genius reservation or set up Service and take or send to Apple for resolution. If no coverage, use virtual Lock Button, tap Settings App > General > Accessibility > Assistive Touch > ON > tap new white screen button > Device > Lock Screen. This can even turn OFF iPhone. To turn ON, connect iPhone to power, charger or USB of computer.

  • The music on my iPhone 4 with the new ios7 is not working. There are red  dots next to the selections and I can  not here any music when I touch the  spots. I just downloaded the iOS 7. What went wrong?  Everything else seems to be fine

    The music on my iPhone 4 is not working. There are red dots next to the selections and no sound occurs when they are touched.

    Can you play those songs in iTunes on your computer?
    Make sure they are all part of your iTunes library before you sync and that they were bought with the same AppleID you use on your phone.

  • TWO CRITICAL BUGS: 1) File, "Save Page As" and 2) right-click the picture and select "Save Image As", both do not work at all in Firefox 27, 28, and 29!

    Note: capitals are used only to highlight important words.
    PLEASE, TAKE THESE COMMENTS ON TWO CRITICAL BUGS VERY SERIOUSLY BECAUSE THE BUGS DESCRIBED BELOW ARE SO CRITICAL THAT I CANNOT USE THE LATEST VERSION OF FIREFOX UNLESS THEY DO NOT APPEAR IN THE LATEST VERSION AND THEREFORE I AM FORCED TO REVERT BACK TO FIREFOX 26.
    I have Windows 7 64-bit and Firefox 26. I could not install Firefox 27, 28, and 29 due to the persistent presence of the two critical bugs described below. I have 8 GB of RAM and an Intel quad-core processor and a lot of hard disk space available.
    I installed Firefox 27 and then Firefox 28 a while back and these two bugs described below were still present and now I have just checked again with Firefox 29 by installing it and yet again, these two bugs described below are present!! UNBELIEVABLE THAT THESE TWO CRITICAL BUGS ARE STILL PRESENT IN FIREFOX 29 WHEN I CLEARLY INFORMED YOU ABOUT THEM IN THE HELP, SUBMIT LINK OF FIREFOX!!
    I am forced to revert to Firefox 26!
    First, I use Windows 7 64-bit and I always use Firefox with at least 120 tabs opened. BUT I have 8 GB of RAM, an Intel core i7 quad-core processor and more than 1 TB of hard disk space. Consequently, I do not understand why I would have these two critical bugs.
    With Firefox 26, I also have at least 120 tabs opened when I start Firefox and I do not have the two critical bugs described below, therefore I do not believe that the number of tabs is the reason of the two critical bugs that are present in Firefox 27, 28, and 29.
    ---FIRST CRITICAL BUG:
    When I open ANY web page and do File, "Save Page As", the window that is supposed to open to locate the folder where I want to save this web page does NOT open at all, even if I wait a long time to see if it opens.
    Same problem happened with Firefox 27, 28, and now 29!! When I reverted back to Firefox 26, this problem did NOT happen anymore!
    ---SECOND CRITICAL BUG:
    When I use Google Images, for instance entering model in the search field of Google Images and then pressing enter.
    Then I select any picture, open to a new tab this selected picture, then open a new tab by selecting the option View for this picture. Then right-click the picture and select "Save Image As".
    Again, the window that is supposed to open to locate the folder where I want to save this picture does NOT open at all, even if I wait a long time to see if it opens.
    Same problem happened with Firefox 27, 28, and now 29!! When I reverted back to Firefox 26, this problem did NOT happen anymore!
    ---THESE TWO CRITICAL BUGS DO NOT APPEAR WHEN I USE INTERNET EXPLORER 11.
    I have no idea if you will be able to reproduce these two critical BUGS but I can assure you that they are not present when I use Firefox 26 and they are present when I use Firefox 27, 28, and 29. More, be aware that I have at least 100 tabs opened but I also have this same number of tabs opened in Firefox 26 and yet I do not experience these two critical bugs when I have Firefox 26!
    Once again, these two bugs touch at two vital, critical very basic functions of Firefox and therefore I will NOT be able to use any version above 26 if these two bugs are still present, as they are present in Firefox 27, 28, and now 29!!!
    Please, make it a priority to solve these two critical bugs. Thanks.
    I did read a post related to the same issues “Firefox stops responding when trying to "save page" or "save image" | Firefox Support Forum | Mozilla Support” at https://support.mozilla.org/en-US/questions/991630?esab=a&as=aaq
    I am still reading it again to try to figure out exactly what the person did to make his problems be solved, as the post is not clear at all on what solved the problems!
    In any case, all the suggestions proposed in this post do not work and I surely cannot do a system restore when it is obvious that the two bugs do not appear in Internet Explorer.

    First, I sent an email to the author of PhotoME to inform him of the serious issues his addon caused with Firefox latest versions.
    Now, for those of you who do not have the PhotoME addon and yet experience the same problem that I had and that I described above, I suggest the following strategy.
    As PhotoME did cause these problems with Firefox latest versions, I am pretty covinved other addons probably might cause these problems too. Therefore, adopt the following method.
    Test one addon at a time to see if this particular addon is behind your Firefox issues like the ones I had.
    So, disable one addon only at a time. Then close your Firefox and restart it from scratch and see if you still have your Firefox problems. You must restart the Firefox browser from scratch. If you still have these Firefox problems, re-enable the disabled addon, restart your Firefox (again!) and repeat the same method for every single addon that you have.
    Try to be selective by choosing first addons that are more likely to cause your Firefox problems such as not very well-known or not very popular addons (like it was the case for the PhotoME addon).
    If this method works or if it does not work, report it on this web page so that others can be helped with your comments.
    I hope this method will help you because I was really upset that I had these Firefox problems and I first thought it was the fault of Firefox, only to discover later that this PhotoME addon was the culprit and had caused me such upset.

Maybe you are looking for