Changing char in number

Hi,
I am trying to convert a chacter in number using sy-abcde function. It works fine. Since my string contains also space, I am using if-else-endif clause. When it is a space, the cursoe comes to "case iv_characters" and therafter it jumps out of "endif".
DATA:
        lv_result TYPE match_result,
        lv_n(2)  TYPE n ,
        iv_characters type string value ' ', "space
        ev_number type string .
   FIND first OCCURRENCE OF iv_characters IN sy-abcde IGNORING CASE RESULTS lv_result.
  IF sy-subrc = 0.
    ev_number = lv_result-offset.
  ELSE. "The cursor does not go in the case statement
     CASE iv_characters . "
      WHEN  '  '.
        ev_number = 26.
      WHEN '>'.
        ev_number = 27.
      WHEN '.'.
        ev_number = 28.
      WHEN '_'.
        ev_number = 29.
      WHEN '-'.
        ev_number = 30.
      WHEN '='.
        ev_number = 31.
      WHEN '<'.
        ev_number = 32.
    ENDCASE.
       ENDIF.
  lv_n = ev_number.  " then here comes the cursor
  ev_number = lv_n.
  write: ev_number.
Cheers

Try like this:
   CASE iv_characters . "
      WHEN '>'.
        ev_number = 27.
      WHEN '.'.
        ev_number = 28.
      WHEN '_'.
        ev_number = 29.
      WHEN '-'.
        ev_number = 30.
      WHEN '='.
        ev_number = 31.
      WHEN '<'.
        ev_number = 32.
      WHEN  space.
        ev_number = 26.
      WHEN  others.
        ev_number = 99.
   ENDCASE.
Regards,
Naimesh Patel

Similar Messages

  • Error message - ORA-00932: inconsistent datatypes: expected CHAR got NUMBER

    Here is my Report Query...
    select
    from   DW_RFA_JOBDATA
    where  FINISH_TIME >= :P1_START_DATE
    and FINISH_TIME < :P1_END_DATE
         AND RFA_FLAG = (CASE :P1_JOB_CLASSIFICATION WHEN '0' THEN 'LSF'
                                      WHEN '1' THEN 'NON-LSF'
                                      ELSE RFA_FLAG END)The column RFA_FLAG data type is NUMBER(*,0)... i am displaying LSF and Non-LSF in the select list box , but i get the error ORA-00932: inconsistent datatypes: expected CHAR got NUMBER >
    I have created static LOV with LSF display 0 return
    NON-LSF display 1 return..
    Could any body please help me in truble shooting the error ? how do i convert datatype into number i dont have any privileges to make changes to the table...

    Are there multiple columns in the table you are using from your LOV?
    Your LOV select is:
    select
    from   DW_RFA_JOBDATA
    where  FINISH_TIME >= :P1_START_DATE
    and FINISH_TIME < :P1_END_DATE
         AND RFA_FLAG = (CASE :P1_JOB_CLASSIFICATION WHEN '0' THEN 'LSF'
                                      WHEN '1' THEN 'NON-LSF'
                                      ELSE RFA_FLAG END)Maybe try this:
    select
    from   DW_RFA_JOBDATA
    where  FINISH_TIME >= :P1_START_DATE
    and FINISH_TIME < :P1_END_DATE
         AND TO_CHAR(RFA_FLAG) = DECODE(:P1_JOB_CLASSIFICATION,'0','LSF','1','NON-LSF',RFA_FLAG)

  • I can not view ANY videos on Vimeo, I have 'reset' the Ipad, original IOS 5, cleared the history and cookies, I have changed the DNS number to 8.8.8.8, I have worked on this for 2 days and still can't find a fix, HELP!!

    I can not view ANY videos on Vimeo, I have 'reset' the Ipad, original IOS 5, cleared the history and cookies, I haves changed the DNs number to 8.8.8.8, I have worked on this for 3 days now, HELP!!!!

    Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps BEFORE doing the reset.

  • I currently have Imessage turned off on my phone since there is no blocking feature on the Iphone 4.  If I change my phone number and turn on Imessage, how do I make sure I won't get Messages from person I have blocked?

    I have the Iphone 4 but before this I had a different phone and had blocked someone from contacting me via calls/texts.  Unbeknownst to me, when I got the Iphone 4, that I cannot block Imessages.   I have turned off Imessage for the time being but I'm seriously considering changing my phone number.  If I change the number with my carrier and turn Imessage back on,  what do I have to do to ensure that any previous messages don't come through and any future messages cannot be sent? 

    All the publicly available information is here:
    http://www.apple.com/ios/ios7
    There are links on that page to features.

  • I am trying to connect to FaceTime and I message on my ipad 2 but it wouldn't connect!Changing the DNA number is not working. Any ideas?

    I am trying to connect to FaceTime and I message but I am getting a message check my network setting.i tried changing the Dns number but it's not working.Any ideas

    Do other USB devices work on your MBP?
    Does this USB stick work on other MBPs?
    There is a possibility that the stick requires more power than the MBP delivers.  Try it on a powered hub.
    Ciao.

  • HT1918 I am unable to locate where to change the phone number that is associated with my itunes account.

    I am unable to locate where to change the phone number that is associated with my itunes account.  I have a new number and the old number is no longer accessible by me.  I've logged into my iTunes acct and it seems I can only change my appleID itself, my billing address info, and password and things like that.  I cannot find where to remove a number and add a new one.  I've gone to my mobile devices (iphone, ipad) as well as my mac and I'm getting a bit frustrated with it.  I'm sure there's a simple solution and I'm just missing it.  Going to settings>messages>send&receive....there is the old number and no option to make a correction.  I've unchecked it but why can't I add the new number?  On my iphone the ONLY option that shows up is my current number but when I set up my new ipad I have the issue described here.  I want this number completely removed from my account there has to be a way to get it out of the system.  
    Also when going to settings>facetime>you can be reached at:  shows email addresses as well as the OLD phone number with no option to make the correction, remove the incorrect number, or add a new number.  I figured this was tied in to my appleID since thats when it showed up (right when I signed in on my ipad).  So I went to itunes on my mac and went to my account and there I find AppleID Summary, itunes in the cloud, purchase history, and settings.  I've gone through each of those and am still unable to figure out where to change it.  Somebody PLEASE tell me where to find this data so I can change it.  I've seen multiple inquiries about this all over the internet but everyone's solution is to do exactly what I've already done.  No resolution to the real issue. 

    Apple will have it, but if there is ever a question/problem, the store that you made the exchange at will have it on record. 
    But if you're worried about it call 800-APL-CARE and see if they have it.

  • How to change a phone number that was set-up when ipad was being set-up. It was my wife's and not mine. want my number as the main number.

    How to change a phone number that was set-up when you first set Ipad up. Took wife's number instead of mine. Her number is on i-cloud and messaging, face time.

    Goto -settings-iCloud-delete account u will then have to set up a new iCloud account.if u do this it will delete anything u may have backed up in  iCloud on your old account.

  • I have set up a iTunes account but I have changed my number and now I can't download apps it keeps saying previous billing problem how do I change my phone number with out setting up a new iTunes

    How do I change my phone number on iTunes. On my phone just I can't download any apps due to a problem with the numbers not matching

    You're really posting in the wrong forum. you should be posting here ( https://discussions.apple.com/community/itunes/itunes_store ) Or calling apple support directly.

  • HT5622 My husband and I share the same apple id for our iphones, how do we change the phone number associated with our apple id to his phone number? He is getting my messages because the ipod has my number in it not his?

    My husband and I have iphones that use the ame apple ID, but different numbers and email addresses, how do we change the phone number that is associated with his ipod to his phone number?

    Use his ID for Settings>Messages>Send And Recieve and for Settings>FaceTime.
    If he does not have an ID then
    Create a NEW account using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card

  • I need to change my phone number on my business card. My card is in a PDF form. How can I change it?

    I need to change my phone number on my business card. I am using a Intel IMAC OSX 10.8. My card is in a pdf format.

    A JPG won't allow you to actually change the text, but you could blank it out & paste over it I suppose.
    Photoshop would only allow you to paste over it, not edit the text I think, but that may be your only option since whoever made it may have restricted editing rights.

  • HT1918 How do i change the phone number on my apple ID account so i can use messaging with my Ipod Touch 4th gen?

    How do I change my phone number on my Apple ID account? Not the number for billing. I got a new Ipod touch and when I was setting it up my emails where correct but the phone number was wrong. The gentlemen at the Apple Store told me just to go on my account on my computer and change it but i cant find where. Only part i know how to change is the billing number. Thanks.

    If you can remember them their current answers you can login here and change them : https://appleid.apple.com , click on 'Manage your Apple ID' and then 'Password and Security' on the left-hand side of your account's page
    If you can't remember their answers and you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can try going to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if the instructions on this user tip helps you get them reset : https://discussions.apple.com/docs/DOC-4551

  • How can I change the VAT number in my account?

    I want to change my VAT number in my account,
    how can I change it?

    Hi Dja Europe,
    If you select the following, you should be able to get Chat support who can assist:
    Creative Cloud
    Adobe ID and signing in
    Click on "Still need help? Contact us"
    Thanks,
    Eshant Jindal

  • How do I change the phone number that ipad is using for iMessage and FaceTime

    Since the latest iOS update my ipad uses my husbands phone number for iMessage and FaceTime. How do I change the phone number to match my iPhone?

    Sign out of FT and iMessage on both your iPad and your iPhone. Sign back in on the iPhone. Wait for everything to activate. Then, sign back in on the iPad using the same Apple ID.

  • How do i change the phone number for my apple id on my iphone5 ?

    how do i change my phone number under my apple id on an iphone5 ?

    To manage the Apple ID:
    https://appleid.apple.com

  • How do I change the phone number on imessage?

    I just updated to ios 6 and the update for mountain lion. What i cant seem to do is change the phone number on imessage from my wifes to mine on my personal mac pro. How do i do that?

    Hi,
    In the first Instance Messages allows you to Call from the Contacts list.
    On the second hand iCloud will sync your Contacts to the iPhone.
    If your My Card in the Contacts (Head and Shoulders iCon) then you  will not be calling your own iPhone or it will not be listed as the phone number in the iOS 6 and OS X 10.8.2 update changes.
    10:36 PM      Wednesday; September 19, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

Maybe you are looking for